Submission #4152396


Source Code Expand

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=1000000007;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };


int main() {
	int n,m,x,y;
	int x1[105],y1[105];
	int max1=0,min1=0;
	cin >> n >> m >> x >> y;
	for(int i=0;i<n;i++){
		cin >> x1[i];
	}
	for(int i=0;i<m;i++){
		cin >> y1[i];
	}

	sort(x1,x1+n);
	sort(y1,y1+m);
	max1=x1[n-1];
	min1=y1[0];
	for(int i=x+1;i<y+1;i++){
		if(i>max1&&i<=min1){
			cout<<"No War"<<endl;
			return 0;
		}
	}

	cout<<"War"<<endl;

}

Submission Info

Submission Time
Task B - 1 Dimensional World's Tale
User Cytus
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1082 Byte
Status AC
Exec Time 8 ms
Memory 764 KiB

Judge Result

Set Name All Sample
Score / Max Score 200 / 200 0 / 0
Status
AC × 17
AC × 3
Set Name Test Cases
All hand1, hand2, max1, max2, max3, max4, max5, max7, max8, normal1, normal2, normal3, normal4, normal5, sample_01, sample_02, sample_03
Sample sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
hand1 AC 8 ms 764 KiB
hand2 AC 1 ms 256 KiB
max1 AC 1 ms 256 KiB
max2 AC 1 ms 256 KiB
max3 AC 1 ms 256 KiB
max4 AC 1 ms 256 KiB
max5 AC 1 ms 256 KiB
max7 AC 1 ms 256 KiB
max8 AC 1 ms 256 KiB
normal1 AC 1 ms 256 KiB
normal2 AC 1 ms 256 KiB
normal3 AC 1 ms 256 KiB
normal4 AC 1 ms 256 KiB
normal5 AC 1 ms 256 KiB
sample_01 AC 1 ms 256 KiB
sample_02 AC 1 ms 256 KiB
sample_03 AC 1 ms 256 KiB