-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2727_army.cpp
51 lines (45 loc) · 860 Bytes
/
2727_army.cpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Not AC, TLE
#include<iostream>
#include<vector>
using namespace std;
vector<int> g,mg;
int main()
{
int N,gs,mgs,i,j,temp,a,b;
cin>>N;
while(N--)
{
g.clear();
mg.clear();
cin>>gs>>mgs;
for(i=0;i<gs;i++)
{
cin>>temp;
g.push_back(temp);
}
for(i=0;i<mgs;i++)
{
cin>>temp;
mg.push_back(temp);
}
a=g[gs-1];
for(i=0;i<gs-1;i++)
{
if(g[i]>a)
a=g[i];
}
b=mg[mgs-1];
for(i=0;i<mgs-1;i++)
{
if(mg[i]>b)
b=mg[i];
}
if(a>=b)
cout<<"Godzilla\n";
else if(a<b)
cout<<"MechaGodzilla\n";
else
cout<<"uncertain\n";
}
return 0;
}