Submission #19565747


Source Code Expand

Copy
import itertools
n, t = map(int, input().split())
a = [int(input()) for _ in range(n)]
cnt =0
for i in range(n-1):
  if a[i]+t<a[i+1]:
    cnt +=a[i+1]-a[i]-t
print(a[-1]+t-cnt-a[0])

Submission Info

Submission Time
Task B - 自動ドア
User ricetta
Language Python (3.8.2)
Score 100
Code Size 189 Byte
Status AC
Exec Time 157 ms
Memory 13044 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 28 ms 8988 KB
sample_02.txt AC 25 ms 9040 KB
sample_23.txt AC 20 ms 9080 KB
subtask1_01.txt AC 134 ms 12260 KB
subtask1_02.txt AC 50 ms 9736 KB
subtask1_03.txt AC 125 ms 12060 KB
subtask1_04.txt AC 77 ms 10116 KB
subtask1_05.txt AC 52 ms 9436 KB
subtask1_06.txt AC 54 ms 9520 KB
subtask1_07.txt AC 137 ms 12224 KB
subtask1_08.txt AC 123 ms 12160 KB
subtask1_09.txt AC 92 ms 10736 KB
subtask1_10.txt AC 34 ms 9076 KB
subtask1_11.txt AC 92 ms 10644 KB
subtask1_12.txt AC 134 ms 12384 KB
subtask1_13.txt AC 127 ms 12096 KB
subtask1_14.txt AC 109 ms 11552 KB
subtask1_15.txt AC 154 ms 12992 KB
subtask1_16.txt AC 151 ms 13004 KB
subtask1_17.txt AC 156 ms 12924 KB
subtask1_18.txt AC 156 ms 12948 KB
subtask1_19.txt AC 153 ms 12900 KB
subtask1_20.txt AC 152 ms 13032 KB
subtask1_21.txt AC 152 ms 13008 KB
subtask1_22.txt AC 157 ms 12984 KB
subtask1_23.txt AC 153 ms 12976 KB
subtask1_24.txt AC 155 ms 12940 KB
subtask1_25.txt AC 155 ms 12812 KB
subtask1_26.txt AC 150 ms 12876 KB
subtask1_27.txt AC 155 ms 12872 KB
subtask1_28.txt AC 154 ms 12744 KB
subtask1_29.txt AC 156 ms 12880 KB
subtask2_01.txt AC 105 ms 11292 KB
subtask2_02.txt AC 94 ms 11044 KB
subtask2_03.txt AC 92 ms 11040 KB
subtask2_04.txt AC 37 ms 9084 KB
subtask2_05.txt AC 132 ms 12384 KB
subtask2_06.txt AC 60 ms 10096 KB
subtask2_07.txt AC 91 ms 10932 KB
subtask2_08.txt AC 50 ms 9320 KB
subtask2_09.txt AC 100 ms 11388 KB
subtask2_10.txt AC 147 ms 12584 KB
subtask2_11.txt AC 74 ms 10552 KB
subtask2_12.txt AC 104 ms 11216 KB
subtask2_13.txt AC 64 ms 9992 KB
subtask2_14.txt AC 52 ms 9432 KB
subtask2_15.txt AC 152 ms 12936 KB
subtask2_16.txt AC 154 ms 12948 KB
subtask2_17.txt AC 155 ms 12976 KB
subtask2_18.txt AC 150 ms 13004 KB
subtask2_19.txt AC 154 ms 13028 KB
subtask2_20.txt AC 151 ms 12808 KB
subtask2_21.txt AC 156 ms 12980 KB
subtask2_22.txt AC 157 ms 12980 KB
subtask2_23.txt AC 155 ms 12812 KB
subtask2_24.txt AC 152 ms 12816 KB
subtask2_25.txt AC 154 ms 12812 KB
subtask2_26.txt AC 152 ms 12744 KB
subtask2_27.txt AC 153 ms 13044 KB
subtask2_28.txt AC 155 ms 12844 KB
subtask2_29.txt AC 149 ms 12844 KB