Submission #19566240


Source Code Expand

Copy
n,t=map(int,input().split())
a=[int(input()) for _ in range(n)]

ans=0
pre=0
for i in range(n):
    if pre<a[i]:
        ans+=t
    else:
        ans+=t-(pre-a[i])
    pre=a[i]+t
print(ans)

Submission Info

Submission Time
Task B - 自動ドア
User oyaki
Language Python (3.8.2)
Score 100
Code Size 200 Byte
Status AC
Exec Time 171 ms
Memory 13124 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 50 / 50 50 / 50
Status
AC × 2
AC × 31
AC × 61
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt, subtask1_25.txt, subtask1_26.txt, subtask1_27.txt, subtask1_28.txt, subtask1_29.txt, sample_01.txt, sample_02.txt
Subtask2 sample_01.txt, sample_02.txt, sample_23.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt, subtask1_25.txt, subtask1_26.txt, subtask1_27.txt, subtask1_28.txt, subtask1_29.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt, subtask2_16.txt, subtask2_17.txt, subtask2_18.txt, subtask2_19.txt, subtask2_20.txt, subtask2_21.txt, subtask2_22.txt, subtask2_23.txt, subtask2_24.txt, subtask2_25.txt, subtask2_26.txt, subtask2_27.txt, subtask2_28.txt, subtask2_29.txt
Case Name Status Exec Time Memory
sample_01.txt AC 22 ms 9008 KB
sample_02.txt AC 21 ms 8904 KB
sample_23.txt AC 23 ms 9000 KB
subtask1_01.txt AC 147 ms 12084 KB
subtask1_02.txt AC 50 ms 9424 KB
subtask1_03.txt AC 138 ms 11964 KB
subtask1_04.txt AC 81 ms 10116 KB
subtask1_05.txt AC 52 ms 9436 KB
subtask1_06.txt AC 54 ms 9428 KB
subtask1_07.txt AC 147 ms 12408 KB
subtask1_08.txt AC 130 ms 12160 KB
subtask1_09.txt AC 92 ms 10980 KB
subtask1_10.txt AC 32 ms 9216 KB
subtask1_11.txt AC 86 ms 10748 KB
subtask1_12.txt AC 145 ms 12084 KB
subtask1_13.txt AC 139 ms 12088 KB
subtask1_14.txt AC 119 ms 11700 KB
subtask1_15.txt AC 167 ms 12952 KB
subtask1_16.txt AC 166 ms 12992 KB
subtask1_17.txt AC 166 ms 13044 KB
subtask1_18.txt AC 170 ms 12984 KB
subtask1_19.txt AC 166 ms 12808 KB
subtask1_20.txt AC 165 ms 12976 KB
subtask1_21.txt AC 165 ms 12996 KB
subtask1_22.txt AC 169 ms 12816 KB
subtask1_23.txt AC 164 ms 12984 KB
subtask1_24.txt AC 168 ms 12984 KB
subtask1_25.txt AC 166 ms 12816 KB
subtask1_26.txt AC 163 ms 12924 KB
subtask1_27.txt AC 163 ms 13060 KB
subtask1_28.txt AC 171 ms 12748 KB
subtask1_29.txt AC 171 ms 12852 KB
subtask2_01.txt AC 116 ms 11448 KB
subtask2_02.txt AC 99 ms 10876 KB
subtask2_03.txt AC 101 ms 10872 KB
subtask2_04.txt AC 38 ms 9344 KB
subtask2_05.txt AC 143 ms 12088 KB
subtask2_06.txt AC 65 ms 10072 KB
subtask2_07.txt AC 96 ms 11004 KB
subtask2_08.txt AC 52 ms 9608 KB
subtask2_09.txt AC 111 ms 11328 KB
subtask2_10.txt AC 163 ms 12592 KB
subtask2_11.txt AC 79 ms 10488 KB
subtask2_12.txt AC 109 ms 11348 KB
subtask2_13.txt AC 66 ms 9988 KB
subtask2_14.txt AC 51 ms 9596 KB
subtask2_15.txt AC 168 ms 12808 KB
subtask2_16.txt AC 168 ms 12988 KB
subtask2_17.txt AC 170 ms 13124 KB
subtask2_18.txt AC 170 ms 12812 KB
subtask2_19.txt AC 169 ms 12816 KB
subtask2_20.txt AC 165 ms 12820 KB
subtask2_21.txt AC 168 ms 13124 KB
subtask2_22.txt AC 165 ms 12992 KB
subtask2_23.txt AC 170 ms 12984 KB
subtask2_24.txt AC 167 ms 12924 KB
subtask2_25.txt AC 171 ms 12984 KB
subtask2_26.txt AC 166 ms 12932 KB
subtask2_27.txt AC 166 ms 13060 KB
subtask2_28.txt AC 165 ms 12744 KB
subtask2_29.txt AC 165 ms 12920 KB