Submission #1018465

# Submission time Handle Problem Language Result Execution time Memory
1018465 2024-07-10T05:47:42 Z vjudge1 Olivander (COCI18_olivander) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;

    int x[n], y[n];
    for (int i = 0; i < n; i ++){
        cin >> x[i];
    }
    for (int i = 0; i < n; i ++){
        cin >> y[i];
    }

    sort(x, x + n);
    sort(y, y + n);

    bool good = 1;
    for (int i = 0; i < n; i ++)
        good &= (x[i] <= y[i]);

    if (good) cout << "DA" << endl;
    else cout << "NE" << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct