Submission #1387483


Source Code Expand

# -*- coding: utf-8 -*-
import math
import sys
import itertools
import numpy as np

n, t = map(int, input().split())
tmp = list(map(int, input().split()))
a = np.array(tmp)

ret = t
for i in range(1, n):
    if a[i] - a[i-1] <= t:
        ret += a[i] - a[i-1]
    else:
        ret += t

print(ret)

Submission Info

Submission Time
Task C - Sentou
User hamko
Language Python (3.4.3)
Score 300
Code Size 317 Byte
Status AC
Exec Time 643 ms
Memory 34224 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 5
AC × 13
Set Name Test Cases
Sample example0, example1, example2, example3, example4
All example0, example1, example2, example3, example4, maxrand0, maxrand1, maxrand2, rand0, rand1, rand2, rand3, rand4
Case Name Status Exec Time Memory
example0 AC 149 ms 12380 KB
example1 AC 149 ms 12380 KB
example2 AC 150 ms 12380 KB
example3 AC 149 ms 12380 KB
example4 AC 149 ms 12380 KB
maxrand0 AC 631 ms 34216 KB
maxrand1 AC 604 ms 34172 KB
maxrand2 AC 643 ms 34224 KB
rand0 AC 151 ms 12376 KB
rand1 AC 158 ms 12380 KB
rand2 AC 150 ms 12380 KB
rand3 AC 151 ms 12380 KB
rand4 AC 148 ms 12380 KB