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>
#define inf INT_MAX
#define sc(a) scanf("%d",&a)
#define scc(a,b) scanf("%d %d",&a,&b)
#define sccc(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define pf(a) printf("%d",a)
#define pff(a,b) printf("%d %d",a,b)
#define pfff(a,b,c) printf("%d %d %d",a,b,c)
#define pb(a) push_back(a)
#define em empty()
#define fr front()
#define cl clear()
#define sz size()
#define mp(a,b) make_pair(a,b)
#define fri(b) freopen(b,"r",stdin)
#define fro(b) freopen(b,"w",stdout)
/*
ID: uslusam1
TASK: test
LANG: C++
*/
using namespace std;
vector<int> vec1;
vector<int> vec2;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
int a;
sc(a);
vec1.pb(a);
}
for(int i=1;i<=n;i++){
int b;
sc(b);
vec2.pb(b);
}
sort(vec1.begin(),vec1.end());
sort(vec2.begin(),vec2.end());
for(int i=0;i<n;i++){
if(vec1[i]>vec2[i]){
cout<<"NE"<<endl;
return 0;
}
}
cout<<"DA"<<endl;
return 0;
return 0;
}
Compilation message (stderr)
olivander.cpp: In function 'int main()':
olivander.cpp:3:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define sc(a) scanf("%d",&a)
~~~~~^~~~~~~~~
olivander.cpp:33:3: note: in expansion of macro 'sc'
sc(a);
^~
olivander.cpp:3:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define sc(a) scanf("%d",&a)
~~~~~^~~~~~~~~
olivander.cpp:38:3: note: in expansion of macro 'sc'
sc(b);
^~
# | 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... |