# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425863 | 2021-06-13T12:04:30 Z | Rouge_Hugo | Toy Train (IOI17_train) | C++14 | 8 ms | 1868 KB |
#include<bits/stdc++.h> #include "train.h" #define ll long long #define fi first #define se second #define pb push_back using namespace std;int n,m; vector<int>ans; const int N=5090; int vis[N]; vector<int>v[N]; int r[N]; vector<int> who_wins(vector<int> A,vector<int> R,vector<int> u,vector<int> uu) { n=R.size();m=u.size(); for(int i=0;i<n;i++) r[i]=R[i]; for(int i=0;i<m;i++) v[u[i]].pb(uu[i]); for(int i=n-1;i>-1;i--) { if(v[i][0]==i) { if(R[i])ans.pb(1); else ans.pb(0);continue; } ans.pb(ans.back()); } reverse(ans.begin(),ans.end()); return ans; } /* 4 4 0 0 0 0 0 0 0 1 0 1 1 2 2 2 3 3 */
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 844 KB | 3rd lines differ - on the 14th token, expected: '1', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 588 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 8 ms | 1868 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 6 ms | 1612 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 8 ms | 1868 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 844 KB | 3rd lines differ - on the 14th token, expected: '1', found: '0' |
2 | Halted | 0 ms | 0 KB | - |