41852023-03-15 23:04:07tomi7Radar (70 pont)cpp11Wrong answer 0/70116ms10012 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;


int main() {
	int n, m;
    cin>>n>>m;
    vector<pair<long long, long long>> a(n);
    vector<pair<long long, long long>> c(m);
    int smallest=0;
    for(int i=0;i<n;i++){
        cin>>a[i].first;
        a[i].second=i+1;
    }
    for(int i=0;i<m;i++){
        cin>>c[i].first;
        c[i].second=i+1;
    }
    sort(a.begin(), a.end());
    sort(c.begin(), c.end());
    if(a[0]>c[m-1]){
        cout<<"YES"<<'\n';
    }else{
        cout<<"NO"<<'\n'<<a[0].second<<'\n'<<c[m-1].second<<'\n';
    }
}
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/03ms1808 KiB
2Wrong answer0/03ms2008 KiB
3Wrong answer0/53ms2244 KiB
4Wrong answer0/52ms2328 KiB
5Wrong answer0/53ms2460 KiB
6Wrong answer0/53ms2828 KiB
7Wrong answer0/53ms3016 KiB
8Wrong answer0/53ms3120 KiB
9Wrong answer0/53ms3344 KiB
10Wrong answer0/546ms9672 KiB
11Wrong answer0/545ms9624 KiB
12Wrong answer0/564ms6940 KiB
13Wrong answer0/564ms6940 KiB
14Wrong answer0/5116ms9664 KiB
15Wrong answer0/5116ms9936 KiB
16Wrong answer0/5116ms10012 KiB