# TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

60.0% (9/15)

13.5% (12/89)

# Description

#include<iostream>
using namespace std;

const int MAXN = 10101;
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
int A[MAXN], B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z;
int long_tree;

int main() {
cin >> long_tree;
cin >> T;
while (T --> 0) {
cin >> N;
x = (1 << 16) - 1, y = 0, z = 0;
for (i = 0; i < N; ++i) {
cin >> A[i];
x &= A[i];
y |= A[i];
z ^= A[i];
}

cout << x << ' ' << y << ' ' << z << endl;
for (i = 0; i < N; ++i) {
cout << A[i] % A[0] << ' ';
}
cout << endl;
}
return 0;
}


77
3
5
5 4 3 2 1
1
1
2
7122 334

0 7 1
0 4 3 2 1
1 1 1
0
322 7134 6812
0 334

# Problem Source

TIOJ April Fools Day Contest 2022

No. Testdata Range Constraints Score
1 0 範例測資。 0
2 1 $longtree = 77$ 1
3 1~2 $longtree = 49$ 6
4 1~3 $longtree = 42$ 7
5 1~4 $longtree = 38$ 7
6 1~5 $longtree = 36$ 7
7 1~6 $longtree = 34$ 7
8 1~7 $longtree = 32$ 14
9 1~8 $longtree = 29$ 49
10 1~9 $longtree = 27$ 2

# Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 100 262144 65536 1
1 100 262144 65536 2 3 4 5 6 7 8 9 10
2 100 262144 65536 3 4 5 6 7 8 9 10
3 100 262144 65536 4 5 6 7 8 9 10
4 100 262144 65536 5 6 7 8 9 10
5 100 262144 65536 6 7 8 9 10
6 100 262144 65536 7 8 9 10
7 100 262144 65536 8 9 10
8 100 262144 65536 9 10
9 100 262144 65536 10