Submission #1239417

#TimeUsernameProblemLanguageResultExecution timeMemory
1239417woeInfinite Race (EGOI24_infiniterace2)Pypy 3
Compilation error
0 ms0 KiB
7n = int(input())
e = int(input())
lap = 0
ahead = set()
for _ in range(e):
    x = int(input())
    if x > 0:
        if x in ahead:
            lap += 1
            ahead.clear()
        ahead.add(x)
    else:
        ahead.discard(-x)
print(lap)

Compilation message (stdout)

Compiling 'Main.py'...
***   File "Main.py", line 1
    7n = int(input())
    ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?


=======