Submission #3252785


Source Code Expand

Copy
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <unordered_map>

using namespace std;
const int maxn = 102;

int n, m, X, Y, x, y;

int main()
{
	cin >> n >> m >> X >> Y;

	int maxx = -101;

	for (int i = 1; i <= n; ++i) {
		cin >> x;
		if (x > maxx)
			maxx = x;
	}

	// if (maxx >= Y) {
	// 	cout << "War" << endl;
	// 	return 0;
	// }

	int miny = 101;
	for (int i = 1; i <= m; ++i) {
		cin >> y;
		if (y < miny)
			miny = y;
	}

	for (int i = X+1; i <= Y; ++i)
	{
		if (i > maxx && i <= miny) {
			cout << "No War" << endl;
			return 0;
		}
	}

	// if (miny <= X || maxx >= miny)
	// 	cout << "War" << endl;
	// else 
	// 	cout << "No War" << endl;
	
	cout << "War" << endl;
	return 0;
}

Submission Info

Submission Time
Task B - 1 Dimensional World's Tale
User suzyz
Language C++14 (GCC 5.4.1)
Score 200
Code Size 809 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All Sample
Score / Max Score 200 / 200 0 / 0
Status
AC × 18
AC × 3
Set Name Test Cases
All hand1, hand2, max1, max2, max3, max4, max5, max6, 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 1 ms 256 KB
hand2 AC 1 ms 256 KB
max1 AC 1 ms 256 KB
max2 AC 1 ms 256 KB
max3 AC 1 ms 256 KB
max4 AC 1 ms 256 KB
max5 AC 1 ms 256 KB
max6 AC 1 ms 256 KB
max7 AC 1 ms 256 KB
max8 AC 1 ms 256 KB
normal1 AC 1 ms 256 KB
normal2 AC 1 ms 256 KB
normal3 AC 1 ms 256 KB
normal4 AC 1 ms 256 KB
normal5 AC 1 ms 256 KB
sample_01 AC 1 ms 256 KB
sample_02 AC 1 ms 256 KB
sample_03 AC 1 ms 256 KB