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;
multiset<int> s1, s2;
long long n, x, ok = 1;
int main (){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i=0;i<n;i++){
cin >> x;
s1.insert(x);
}
for (int i=0;i<n;i++){
cin >> x;
s2.insert(x);
}
set<int>:: iterator it1 = s1.begin();
set<int>:: iterator it2 = s2.begin();
for (int i=0;i<n;i++){
if (*it1 <= *it2){
it1++;
it2++;
}
else ok = 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... |