Submission #425863

#TimeUsernameProblemLanguageResultExecution timeMemory
425863Rouge_HugoToy Train (IOI17_train)C++14
0 / 100
8 ms1868 KiB
#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 (stderr)

train.cpp: In function 'std::vector<int> who_wins(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
train.cpp:24:13: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   24 |             else ans.pb(0);continue;
      |             ^~~~
train.cpp:24:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   24 |             else ans.pb(0);continue;
      |                            ^~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...