Submission #726056

#TimeUsernameProblemLanguageResultExecution timeMemory
726056Black_HawkOlivander (COCI18_olivander)C++17
50 / 50
1 ms324 KiB
#include <bits/stdc++.h> using namespace std; void solve() { int n, x; cin >> n; vector<int> w(n), b(n); for (int i = 0; i < n; i++) cin >> w[i]; for (int i = 0; i < n; i++) cin >> b[i]; sort(w.begin(), w.end()); sort(b.begin(), b.end()); for (int i = 0; i < n; i++) { if (w[i] > b[i]) { cout << "NE"; return; } } cout << "DA"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; // cin >> t; while (t--) solve(); return 0; }

Compilation message (stderr)

olivander.cpp: In function 'void solve()':
olivander.cpp:7:12: warning: unused variable 'x' [-Wunused-variable]
    7 |     int n, x;
      |            ^
#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...