41842023-03-15 23:03:06tomi7Radar (70 pont)cpp11Wrong answer 0/70112ms6832 KiB
// Source: https://usaco.guide/general/io

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


int main() {
	int n, m;
    cin>>n>>m;
    vector<pair<int, int>> a(n);
    vector<pair<int, int>> 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/03ms1812 KiB
2Wrong answer0/03ms2052 KiB
3Wrong answer0/53ms2272 KiB
4Wrong answer0/53ms2476 KiB
5Wrong answer0/52ms2560 KiB
6Wrong answer0/53ms2844 KiB
7Wrong answer0/53ms2864 KiB
8Wrong answer0/53ms3000 KiB
9Wrong answer0/53ms3088 KiB
10Wrong answer0/545ms5956 KiB
11Wrong answer0/545ms6024 KiB
12Wrong answer0/563ms4936 KiB
13Wrong answer0/561ms4984 KiB
14Wrong answer0/5111ms6496 KiB
15Wrong answer0/5111ms6832 KiB
16Wrong answer0/5112ms6732 KiB