Submission #19724266


Source Code Expand

Copy
N, M, T = map(int, input().split())

Z = N

xy = [map(int, input().split()) for _ in range(M)]
A, B = [list(i) for i in zip(*xy)]

A.insert(0, 0)
B.insert(0, 0)

print(A)
print(B)


for i in range(M):
    N = N - (A[i+1] - B[i])
    
    if N <= 0:
        print("No")
        exit()
    print(N)
    
    N = N + (B[i+1] - A[i+1])
    if N >= Z:
        N = Z
    print(N)
    
N = N - (T - B[-1])

print(N)

if N <= 0:
    print("No")
else:
    print("Yes")

Submission Info

Submission Time
Task B - Smartphone Addiction
User Claus
Language Python (3.8.2)
Score 0
Code Size 493 Byte
Status WA
Exec Time 31 ms
Memory 9528 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
WA × 5
WA × 21
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
All handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
Case Name Status Exec Time Memory
handmade_00.txt WA 18 ms 8920 KB
handmade_01.txt WA 22 ms 9076 KB
random_00.txt WA 24 ms 9496 KB
random_01.txt WA 31 ms 9488 KB
random_02.txt WA 27 ms 9528 KB
random_03.txt WA 23 ms 9392 KB
random_04.txt WA 21 ms 9140 KB
random_05.txt WA 18 ms 9180 KB
random_06.txt WA 20 ms 9028 KB
random_07.txt WA 26 ms 8892 KB
random_08.txt WA 21 ms 9280 KB
random_09.txt WA 26 ms 9200 KB
random_10.txt WA 20 ms 9244 KB
random_11.txt WA 30 ms 9380 KB
random_12.txt WA 28 ms 9320 KB
random_13.txt WA 28 ms 9520 KB
sample_01.txt WA 18 ms 9028 KB
sample_02.txt WA 17 ms 9180 KB
sample_03.txt WA 22 ms 9144 KB
sample_04.txt WA 19 ms 8928 KB
sample_05.txt WA 23 ms 9076 KB