Submission #3251346


Source Code Expand

Copy
#include <iostream>
#include <vector>
#include <utility>
#include <numeric>
#include <functional>
#include <stdio.h>
#include <math.h>
#include <string>
#include <algorithm>
#include <deque>
#include <queue>
#include <map>

#define rep(i, m, n) for (int (i)(m); (i)<(n); ++(i))
#define repr(i, m, n) for (int (i)(m - 1); (i)>=(n); --(i))
#define repv(i, v) for (unsigned (i)(0); (i)<(v.size()); ++(i))
#define all(v) (v).begin(), (v).end()
#define sortv(v) sort(all(v))
#define sortgi(v) sort(all(v), greater<int>())
#define sortgd(v) sort(all(v), greater<double>())
#define sortgll(v) sort(all(v), greater<ll>())
#define debug(x) cerr << #x << ": " << x << '\n'

using namespace std;
using pii = pair<int, int>;
using pss = pair<string, string>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using ll = long long;
using pllll = pair<ll, ll>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using vpii = vector<pii>;
using pqi = priority_queue<int>;
using pqd = priority_queue<double>;
using pqll = priority_queue<ll>;
using pqvi = priority_queue<vi>;
using pqvll = priority_queue<vll>;


int main() {
	int n, m;
	int max_x;
	int min_y;
	cin >> n >> m >> max_x >> min_y;
	rep(i, 0, n) {
		int xx;
		cin >> xx;
		max_x = max(max_x, xx);
	}
	rep(i, 0, m) {
		int yy;
		cin >> yy;
		min_y = min(min_y, yy);
	}
	if (max_x < min_y) {
		cout << "No War" << endl;
	}
	else {
		cout << "War" << endl;
	}
}

Submission Info

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

Test Cases

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