-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2018ClonedCCf.cpp
More file actions
46 lines (43 loc) · 799 Bytes
/
2018ClonedCCf.cpp
File metadata and controls
46 lines (43 loc) · 799 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
44
45
46
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll Mod = 1000000007;
const int Maxn = 1000010;
int a[Maxn];
inline int read()
{
int fl = 1, rt = 0;
char ch = getchar();
while (ch < '0' || ch > '9')
{
if (ch == '-')
fl = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
{
rt = rt * 10 + ch - '0';
ch = getchar();
}
return fl * rt;
}
void Solve()
{
int T;
T = read();
for (int t = 1; t <= T; t++)
{
int n = read();
for (int i = 1; i <= n; i++)
a[i] = read();
int ans = 0;
for (int i = 1; i <= n; i++)
ans ^= max(0, a[i] - 2);
printf("Case %d: %d\n", t, ans);
}
}
int main()
{
Solve();
return 0;
}