-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathN.cc
40 lines (36 loc) · 740 Bytes
/
N.cc
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
#include <bits/stdc++.h>
using namespace std;
int main() {
int tc; cin >> tc;
while (tc--) {
vector<int> usa(3), russ(3);
int ans = 0;
int totu = 0, totr = 0;
for (int i = 0; i < 3; ++i) {
cin >> usa[i];
if (i) cout << " ";
cout << usa[i];
totu += usa[i];
}
for (int i = 0; i < 3; ++i) {
cin >> russ[i];
cout << " ";
cout << russ[i];
totr += russ[i];
}
cout << endl;
if (totu > totr)
ans |= 1;
if (usa > russ)
ans |= 2;
if (ans == 3)
cout << "both" << endl;
if (ans == 2)
cout << "color" << endl;
if (ans == 1)
cout << "count" << endl;
if (ans == 0)
cout << "none" << endl;
}
return 0;
}