Submission #1991545
Source Code Expand
#include <bits/stdc++.h> using namespace std; int N, T, ans; int main(void) { cin >> N >> T; int nowTime[200000]; for (int i = 0; i < N; i++) { cin >> nowTime[i]; } for (int i = 1; i < N; i++) { ans += min(T, nowTime[i]-nowTime[i-1]); } cout << ans+T << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Sentou |
User | kage |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 337 Byte |
Status | AC |
Exec Time | 107 ms |
Memory | 1024 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 1 ms | 256 KB |
example1 | AC | 1 ms | 256 KB |
example2 | AC | 1 ms | 256 KB |
example3 | AC | 1 ms | 256 KB |
example4 | AC | 1 ms | 256 KB |
maxrand0 | AC | 106 ms | 1024 KB |
maxrand1 | AC | 107 ms | 1024 KB |
maxrand2 | AC | 105 ms | 1024 KB |
rand0 | AC | 1 ms | 256 KB |
rand1 | AC | 1 ms | 256 KB |
rand2 | AC | 1 ms | 256 KB |
rand3 | AC | 1 ms | 256 KB |
rand4 | AC | 1 ms | 256 KB |