Table of Contents

SolutionImplementation

Solution

Official Analysis

Implementation

Time Complexity: O(N)\mathcal{O}(N)

Python

data = open("crossroad.in").read().strip().split("\n")
n = int(data[0])
observations = [list(map(int, data[i + 1].split(" "))) for i in range(n)]
locations = [""] * 10
crossings = 0
for i in range(n):

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!