Submission #58932150


Source Code Expand

import sys
input = sys.stdin.readline

N, C = map(int, input().split())
T = list(map(int, input().split()))
ans = 0
prev = -10**18

for Ti in T:
    if Ti-prev>=C:
        ans += 1
        prev = Ti
    
print(ans)

Submission Info

Submission Time
Task A - Candy Button
User roaris_cp
Language Python (PyPy 3.10-v7.3.12)
Score 150
Code Size 227 Byte
Status AC
Exec Time 58 ms
Memory 76896 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 56 ms 76476 KiB
00_sample_01.txt AC 56 ms 76556 KiB
00_sample_02.txt AC 56 ms 76768 KiB
01_random_00.txt AC 56 ms 76612 KiB
01_random_01.txt AC 57 ms 76620 KiB
01_random_02.txt AC 57 ms 76480 KiB
01_random_03.txt AC 57 ms 76404 KiB
01_random_04.txt AC 56 ms 76696 KiB
01_random_05.txt AC 57 ms 76444 KiB
01_random_06.txt AC 56 ms 76612 KiB
01_random_07.txt AC 56 ms 76476 KiB
02_handmade_00.txt AC 57 ms 76608 KiB
02_handmade_01.txt AC 57 ms 76896 KiB
02_handmade_02.txt AC 58 ms 76616 KiB
02_handmade_03.txt AC 57 ms 76600 KiB
02_handmade_04.txt AC 56 ms 76596 KiB
02_handmade_05.txt AC 56 ms 76860 KiB