Submission #1043193

#TimeUsernameProblemLanguageResultExecution timeMemory
1043193model_codeInfinite Race (EGOI24_infiniterace2)Pypy 3
100 / 100
236 ms36048 KiB
N = int(input()) Q = int(input()) lap = 0 last = {} for _ in range(Q): x = int(input()) if x > 0: if x in last: if last[x] == lap: lap += 1 last[x] = lap elif -x in last: del last[-x] print(lap)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...