Submission #319710

#TimeUsernameProblemLanguageResultExecution timeMemory
319710analyticalprogrammerOlivander (COCI18_olivander)C++14
50 / 50
1 ms492 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; vector<int> wands(n); vector<int> boxes(n); for(int& wand:wands) cin >> wand; for(int& box:boxes) cin >> box; sort(wands.begin(),wands.end()); sort(boxes.begin(),boxes.end()); string result = "DA"; for(int i = 0;i<n;i++){ if(wands[i]>boxes[i]){ result = "NE"; break; } } cout << result << "\n"; 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...