Submission #54581422
Source Code Expand
Copy
#include<iostream>#include<vector>#include<algorithm>#include<vector>#include<cmath>#include<set>#include<unordered_map>#include<string>#include<unordered_set>#include<queue>#include<stack>#define rep(i,n) for(int i=0;i<n;i++)using namespace std;typedef long long ll;typedef unsigned long long ull;int main(){int n,t;cin>>n>>t;vector<int> a(n);for(auto& i:a)
#include<iostream> #include<vector> #include<algorithm> #include<vector> #include<cmath> #include<set> #include<unordered_map> #include<string> #include<unordered_set> #include<queue> #include<stack> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { int n,t; cin>>n>>t; vector<int> a(n); for(auto& i:a) cin>>i; vector<int> b(n); int cur=a[0]; for(int i=0;i<n;i++) { if(cur<=a[i]) { b[i]=a[i]+t; cur=b[i]; } else { b[i]=cur+t; cur=b[i]; } } for(auto i:b) cout<<i<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Ticket Counter |
User | turquoise |
Language | C++ 17 (gcc 12.2) |
Score | 200 |
Code Size | 761 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3672 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3524 KB |
00_sample_01.txt | AC | 1 ms | 3532 KB |
00_sample_02.txt | AC | 1 ms | 3488 KB |
01_random_00.txt | AC | 1 ms | 3536 KB |
01_random_01.txt | AC | 1 ms | 3476 KB |
01_random_02.txt | AC | 1 ms | 3556 KB |
01_random_03.txt | AC | 1 ms | 3672 KB |
01_random_04.txt | AC | 1 ms | 3488 KB |
01_random_05.txt | AC | 1 ms | 3452 KB |
01_random_06.txt | AC | 1 ms | 3472 KB |
01_random_07.txt | AC | 1 ms | 3400 KB |
01_random_08.txt | AC | 1 ms | 3528 KB |
01_random_09.txt | AC | 1 ms | 3604 KB |
01_random_10.txt | AC | 1 ms | 3540 KB |
01_random_11.txt | AC | 1 ms | 3480 KB |
01_random_12.txt | AC | 1 ms | 3496 KB |
01_random_13.txt | AC | 1 ms | 3608 KB |
01_random_14.txt | AC | 1 ms | 3536 KB |
01_random_15.txt | AC | 1 ms | 3468 KB |
02_handmade_00.txt | AC | 1 ms | 3488 KB |
02_handmade_01.txt | AC | 1 ms | 3464 KB |
02_handmade_02.txt | AC | 1 ms | 3492 KB |
02_handmade_03.txt | AC | 1 ms | 3400 KB |
02_handmade_04.txt | AC | 1 ms | 3540 KB |