Submission #87590

#TimeUsernameProblemLanguageResultExecution timeMemory
87590AntonioDakiOlivander (COCI18_olivander)C++14
0 / 50
2 ms652 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m = 0, ok = 1, t = 0; cin >> n; long long x[n], y[n]; for(long long i = 0; i < n; ++i) cin >> x[i]; for(long long i = 0; i < n; ++i) cin >> y[i]; for(long long i = 0; i < n; ++i){ while(x[i] > y[t] and t < n) ++t; m = t - 1; for(long long j = t; j < n; ++j){ if(x[i] <= y[j] and x[i] > y[m]) m = j; if(x[i] == y[j]) j = n; } y[m] = 0; if(m == n) ok = 0; m = 0; t = 0; } if(ok) cout << "Da"; else cout << "Ne"; return 0; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...