Submission #18220981


Source Code Expand

Copy
N, K = map(int, input().split())

# a = []
# b = []
# for _ in range(N):
#     a_, b_  = map(int, input().split())
#     a.append(a_)
#     b.append(b_)
    
ab = [list(map(int, input().split())) for _ in range(N)]
    
time = 0
for _ in range(K):
    ab.sort()
    time += ab[0][0]
    ab[0][0] += ab[0][1]
    
print(time)

Submission Info

Submission Time
Task C - Factory
User Hakubi
Language PyPy3 (7.3.0)
Score 0
Code Size 341 Byte
Status TLE
Exec Time 2208 ms
Memory 85528 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 11
TLE × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_16.txt, subtask_1_17.txt, subtask_1_18.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt, subtask_1_8.txt, subtask_1_9.txt
Case Name Status Exec Time Memory
sample_01.txt AC 61 ms 61676 KB
sample_02.txt AC 255 ms 67372 KB
sample_03.txt AC 58 ms 67568 KB
subtask_1_1.txt AC 55 ms 64872 KB
subtask_1_10.txt TLE 2208 ms 77292 KB
subtask_1_11.txt AC 66 ms 61748 KB
subtask_1_12.txt AC 404 ms 85384 KB
subtask_1_13.txt AC 50 ms 61592 KB
subtask_1_14.txt TLE 2207 ms 73040 KB
subtask_1_15.txt TLE 2208 ms 85396 KB
subtask_1_16.txt AC 92 ms 67604 KB
subtask_1_17.txt AC 63 ms 67468 KB
subtask_1_18.txt TLE 2208 ms 85048 KB
subtask_1_2.txt TLE 2207 ms 70036 KB
subtask_1_3.txt AC 911 ms 76512 KB
subtask_1_4.txt TLE 2207 ms 68068 KB
subtask_1_5.txt TLE 2208 ms 85096 KB
subtask_1_6.txt TLE 2207 ms 69844 KB
subtask_1_7.txt AC 1732 ms 67464 KB
subtask_1_8.txt TLE 2208 ms 85528 KB
subtask_1_9.txt TLE 2208 ms 83568 KB