Submission #58938493


Source Code Expand

N,C=map(int,input().split())
T=list(map(int,input().split()))

cooltime=T[0]
count=1
for i in range(1,N):
    if abs(T[i]-cooltime)>=C:
        count+=1
        cooltime=T[i]

print(count)

Submission Info

Submission Time
Task A - Candy Button
User shinya01
Language Python (PyPy 3.10-v7.3.12)
Score 150
Code Size 198 Byte
Status AC
Exec Time 58 ms
Memory 76672 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 55 ms 76328 KiB
00_sample_01.txt AC 55 ms 76556 KiB
00_sample_02.txt AC 55 ms 76304 KiB
01_random_00.txt AC 55 ms 76672 KiB
01_random_01.txt AC 56 ms 76468 KiB
01_random_02.txt AC 56 ms 76340 KiB
01_random_03.txt AC 55 ms 76400 KiB
01_random_04.txt AC 57 ms 76496 KiB
01_random_05.txt AC 58 ms 76204 KiB
01_random_06.txt AC 56 ms 76196 KiB
01_random_07.txt AC 54 ms 76492 KiB
02_handmade_00.txt AC 54 ms 76616 KiB
02_handmade_01.txt AC 55 ms 76244 KiB
02_handmade_02.txt AC 55 ms 76440 KiB
02_handmade_03.txt AC 54 ms 76584 KiB
02_handmade_04.txt AC 54 ms 76452 KiB
02_handmade_05.txt AC 55 ms 76612 KiB