Submission #168298

#TimeUsernameProblemLanguageResultExecution timeMemory
168298muhi1112Olivander (COCI18_olivander)C++17
50 / 50
2 ms504 KiB
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define f1 first #define s2 second #define pb push_back #define mp make_pair #define ll long long #define fri(a) freopen(a,"r",stdin); #define fro(a) freopen(a,"w",stdout); const int N=1e5+5; int n,a; vector<int>v,v1; int main(){ //fri("in.txt"); //fro("out.txt"); ios_base::sync_with_stdio(false); cin.tie(NULL); cin>>n; for(int i=0;i<n;i++){ cin>>a; v.pb(a); } for(int i=0;i<n;i++){ cin>>a; v1.pb(a); } sort(v.begin(),v.end()); sort(v1.begin(),v1.end()); for(int i=0;i<n;i++){ if(v1[i]<v[i]){ cout<<"NE"<<endl; return 0; } } cout<<"DA"<<endl; return 0; }
#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...