# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1240962 | aminabouakaz | Infinite Race (EGOI24_infiniterace2) | Pypy 3 | 187 ms | 52696 KiB |
def min_finish_crossings(n, e, events):
position = 0
laps = 0
for x in events:
if x > 0:
if position <= 0:
laps += 1
position += 1
else:
position -= 1
return laps
if __name__ == "__main__":
n = int(input())
e = int(input())
events = [int(input()) for _ in range(e)]
print(min_finish_crossings(n, e, events))
Compilation message (stdout)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |