Submission #406715

#TimeUsernameProblemLanguageResultExecution timeMemory
406715wiwihoToy Train (IOI17_train)C++14
0 / 100
6 ms700 KiB
#include "train.h" #include<bits/stdc++.h> #define printv(a, b) { \ for(auto pv : a) b << pv << " "; \ b << "\n"; \ } #define mp make_pair #define F first #define S second #define iter(a) a.begin(), a.end() #define lsort(a) sort(iter(a)) #define eb emplace_back using namespace std; typedef long long ll; using pii = pair<int, int>; const ll MAX = 1LL << 60; ostream& operator<<(ostream& o, pii p){ return o << '(' << p.F << ',' << p.S << ')'; } vector<int> who_wins(vector<int> a, vector<int> r, vector<int> u, vector<int> v) { int n = a.size(); vector<int> ans(n); int p = 0; for(int i = 0; i < n; i++){ if(u[i] != v[i]) continue; while(p <= i){ ans[p] = r[i]; p++; } } return ans; }
#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...