41962023-03-16 05:34:45tomi7Radar (70 pont)cpp11Wrong answer 0/70118ms9220 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/03ms1684 KiB
2Wrong answer0/03ms1932 KiB
3Wrong answer0/53ms2160 KiB
4Wrong answer0/53ms2144 KiB
5Wrong answer0/53ms2600 KiB
6Wrong answer0/53ms2492 KiB
7Wrong answer0/53ms2540 KiB
8Wrong answer0/53ms2532 KiB
9Wrong answer0/53ms2664 KiB
10Wrong answer0/546ms8960 KiB
11Wrong answer0/546ms8904 KiB
12Wrong answer0/565ms6172 KiB
13Wrong answer0/564ms6176 KiB
14Wrong answer0/5118ms8900 KiB
15Wrong answer0/5118ms9080 KiB
16Wrong answer0/5118ms9220 KiB