-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1186.cpp
More file actions
43 lines (40 loc) · 998 Bytes
/
Copy path1186.cpp
File metadata and controls
43 lines (40 loc) · 998 Bytes
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
/**
* ____
* ____ ___ ____ ________ __/ __/
* / __ `__ \/ __ `/ ___/ / / / /_
* / / / / / / /_/ / / / /_/ / __/
* /_/ /_/ /_/\__,_/_/ \__,_/_/
*
* @link : https://the-redback.com
*/
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define inf 1e9
#define eps 1e-9
#define NN 111
int a[NN];
int main() {
ios_base::sync_with_stdio(false);
int t = 1, tc;
int k, l, n, i;
cin >> tc;
while (tc--) {
cin >> n;
int res = 0;
for (i = 0; i < n; i++) cin >> a[i];
for (i = 0; i < n; i++) {
cin >> k;
k = abs(a[i] - k) - 1;
res ^= k;
}
if (res)
printf("Case %d: white wins\n", t++);
else
printf("Case %d: black wins\n", t++);
}
return 0;
}