제출 #72889

#제출 시각아이디문제언어결과실행 시간메모리
72889mr_banana장난감 기차 (IOI17_train)C++17
5 / 100
30 ms25644 KiB
#include "train.h" #include<bits/stdc++.h> using namespace std; const int MN=5000+100; bool g[MN][MN]; vector<int> who_wins(vector<int> a,vector<int> r,vector<int> u,vector<int> v) { vector<int> res(a.size()); int n=a.size(),m=v.size(); for(int i=0;i<m;i++){ g[u[i]][v[i]]=1; } for(int i=n-1;i>=0;i--){ if(a[i]){ if(r[i] && g[i][i]){ res[i]=1; } else if(g[i][i+1]){ res[i]=res[i+1]; } else{ res[i]=0; } } else{ if(r[i]==0 && g[i][i]){ res[i]=0; } else if(g[i][i+1]){ res[i]=res[i+1]; } else{ res[i]=1; } } } return res; }
#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...