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 <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int N,M,mayorbank,mayorsalary;
int main(){
while(cin>>N>>M){
mayorbank=mayorsalary=0;
int banknotes[N];
int salary[M];
for(int a=0;a<N;a++){
cin>>banknotes[a];
if(banknotes[a]>mayorbank){
mayorbank=banknotes[a];
}
}
for(int b=0;b<M;b++){
cin>>salary[b];
if(salary[b]>mayorsalary){
mayorsalary=salary[b];
}
}
if(mayorbank>=mayorsalary) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
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... |