Submission #2412815


Source Code Expand

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;

int main(){
  int n, T;
  cin >> n >> T;
  int a, b;
  long long ans = T;
  for(int i = 0; i < n; i++){
    cin >> a;
    ans += min(T, a - b);
    b = a;
  }
  cout << ans << endl;
}

Submission Info

Submission Time
Task C - Sentou
User Pellier
Language C++14 (GCC 5.4.1)
Score 0
Code Size 268 Byte
Status WA
Exec Time 107 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
WA × 5
WA × 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 WA 1 ms 256 KB
example1 WA 1 ms 256 KB
example2 WA 1 ms 256 KB
example3 WA 1 ms 256 KB
example4 WA 1 ms 256 KB
maxrand0 WA 105 ms 256 KB
maxrand1 WA 107 ms 256 KB
maxrand2 WA 105 ms 256 KB
rand0 WA 1 ms 256 KB
rand1 WA 1 ms 256 KB
rand2 WA 1 ms 256 KB
rand3 WA 1 ms 256 KB
rand4 WA 1 ms 256 KB