Submission #1091089

#TimeUsernameProblemLanguageResultExecution timeMemory
1091089vjudge1Potatoes and fertilizers (LMIO19_bulves)Cpython 3
24 / 100
817 ms49324 KiB
n = int(input()) a = [0] * n b = [0] * n for i in range(n): x, y = map(int, input().split()) a[i] = x b[i] = y # subtask 1 only ans = 0 extra = 0 for i in range(n): ans += abs(extra) extra += a[i] - b[i] print(ans)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...