Submission #3434875
Source Code Expand
#include<iostream> #include<cmath> using namespace std; int main() { int n,m; int X,Y; int xc[100],yc[100]; cin >> n >> m >> X >> Y; for(int i=0;i<n;i++) { cin >> xc[i]; } for(int i=0;i<m;i++) { cin >> yc[i]; } int zl = -101,zr = 101; for(int i=0;i<n;i++) { zl = max(zl,xc[i]); } for(int i=0;i<m;i++) { zr = min(zr,yc[i]); } //cout << zl << " " << zr << endl; if(zr <= zl) { cout << "War" << endl; return 0; } if(zl <= X || zr > Y) { cout << "War" << endl; return 0; } cout << "No War" << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Maximize the Formula |
User | marumine51 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 611 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | All | Sample | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 100 | 0 / 0 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
All | sample_01, sample_02, sample_03, testcase1, testcase2, testcase3, testcase4, testcase5, testcase6, testcase7 |
Sample | sample_01, sample_02, sample_03 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01 | WA | 1 ms | 256 KB |
sample_02 | WA | 1 ms | 256 KB |
sample_03 | WA | 1 ms | 256 KB |
testcase1 | WA | 1 ms | 256 KB |
testcase2 | WA | 1 ms | 256 KB |
testcase3 | WA | 1 ms | 256 KB |
testcase4 | WA | 1 ms | 256 KB |
testcase5 | WA | 1 ms | 256 KB |
testcase6 | WA | 1 ms | 256 KB |
testcase7 | WA | 1 ms | 256 KB |