41832023-03-15 23:00:51tomi7Radar (70 pont)cpp11Wrong answer 0/70112ms6964 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/03ms1808 KiB
2Wrong answer0/03ms2052 KiB
3Wrong answer0/53ms2264 KiB
4Wrong answer0/53ms2460 KiB
5Wrong answer0/53ms2512 KiB
6Wrong answer0/53ms2644 KiB
7Wrong answer0/53ms2884 KiB
8Wrong answer0/53ms2972 KiB
9Wrong answer0/53ms3200 KiB
10Wrong answer0/545ms6448 KiB
11Wrong answer0/545ms6636 KiB
12Wrong answer0/563ms5180 KiB
13Wrong answer0/561ms5392 KiB
14Wrong answer0/5112ms6964 KiB
15Wrong answer0/5111ms6904 KiB
16Wrong answer0/5112ms6904 KiB