This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, ok = 1, m = 0;
cin >> n;
long long x[102], y[102];
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);
for(int i = 0; i < n; ++i){
for(int j = 0; j <= n; ++j){
if(x[i] <= y[j]){
m = j;
j = n + 1;
}
if(j == n) ok = 0;
}
y[m] = 0;
m = 0;
}
if(ok) cout << "DA";
else cout << "NE";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |