Submission #847861

#TimeUsernameProblemLanguageResultExecution timeMemory
847861vjudge1Unija (COCI17_unija)Cpython 3
0 / 100
1050 ms65536 KiB
import sys input_data = sys.stdin.read().split() n = int(input_data.pop(0)) heights = [0] * 5000006 for _ in range(n): x = int(input_data.pop(0)) y = int(input_data.pop(0)) heights[x // 2] = max(heights[x // 2], y) res = 0 for i in range(5000000, 0, -1): heights[i] = max(heights[i], heights[i + 1]) res += heights[i] print(res << 1)
#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...
#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...