-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.cpp
More file actions
30 lines (27 loc) · 670 Bytes
/
Copy pathA.cpp
File metadata and controls
30 lines (27 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <bits/stdc++.h>
using namespace std;
#define sep ' '
#define endl '\n'
#define FOR(x, y, z) for(int z = x; z < y; z++)
#define FORR(x, y, z) for(int z = x; z >= y; z--)
typedef long long ll;
typedef long double ld;
typedef string str;
int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int na, nb, k, m, ma, mi;
cin >> na >> nb >> k >> m;
FOR(0, na, i) {
int temp;
cin >> temp;
if (i == k - 1) mi = temp;
}
FOR(0, nb, i) {
int temp;
cin >> temp;
if (i == nb - m) ma = temp;
}
// cerr << mi << sep << ma << endl;
cout << (ma > mi ? "YES" : "NO");
return 0;
}