-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path110b-2.cpp
More file actions
32 lines (31 loc) · 709 Bytes
/
110b-2.cpp
File metadata and controls
32 lines (31 loc) · 709 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
31
32
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n + 1); i++)
typedef long long ll;
int main(){
int N,M,X,Y;
cin >> N >> M >> X >> Y;
vector<int> x(N);
vector<int> y(M);
rep(i,N){
int xs;
cin >> xs;
x[i] = xs;
}
rep(i,M){
int ys;
cin >> ys;
y[i] = ys;
}
sort(x.begin(),x.end());
sort(y.begin(),y.end());
string ans = "War";
for(int i = -100; i < 100; i++){
if(i <= X || Y < i) continue;
if(i <= x[N -1] || y[0] < i ) continue;
ans = "No War";
}
cout << ans << endl;
return 0;
}