Task: | Pyramidi |
Sender: | Mahtimursu |
Submission time: | 2020-11-27 18:32:44 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#2 | ACCEPTED | 0.01 s | 1, 2 | details |
#3 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#4 | ACCEPTED | 0.01 s | 1, 2 | details |
#5 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#6 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#7 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#8 | ACCEPTED | 0.01 s | 1, 2 | details |
#9 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#10 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#11 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#12 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#13 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#14 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#15 | WRONG ANSWER | 0.01 s | 1, 2 | details |
#16 | WRONG ANSWER | 0.04 s | 2 | details |
#17 | WRONG ANSWER | 0.04 s | 2 | details |
#18 | WRONG ANSWER | 0.04 s | 2 | details |
#19 | WRONG ANSWER | 0.04 s | 2 | details |
#20 | WRONG ANSWER | 0.04 s | 2 | details |
Code
#include <bits/stdc++.h> typedef long long ll; #define M 1000000007 using namespace std; void test_case() { int n; cin >> n; vector<ll> v(n); for (int i = 0; i < n; ++i) { cin >> v[i]; } ll ans = 0; for (int i = 0; i < n / 2; ++i) { ans ^= v[i] ^ v[n - i - 1]; } if (n & 1) ans ^= v[n/2+1]; cout << ans; } void solve() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; ++i) { cin >> v[i]; } for (int l = n-1; l > 0; --l) { vector<int> nw(l); for (int i = 0; i < l; ++i) { nw[i] = v[i] ^ v[i+1]; } v = nw; } cout << v[0]; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t = 1; for (int i = 0; i < t; ++i) { test_case(); cout << "\n"; } return 0; }
Test details
Test 1
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1 80 |
correct output |
---|
80 |
user output |
---|
0 |
Test 2
Group: 1, 2
Verdict: ACCEPTED
input |
---|
2 69 91 |
correct output |
---|
30 |
user output |
---|
30 |
Test 3
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
3 47 74 75 |
correct output |
---|
100 |
user output |
---|
47 |
Test 4
Group: 1, 2
Verdict: ACCEPTED
input |
---|
4 94 22 100 43 |
correct output |
---|
7 |
user output |
---|
7 |
Test 5
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
5 50 82 47 40 51 |
correct output |
---|
1 |
user output |
---|
83 |
Test 6
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
6 90 27 98 85 47 14 |
correct output |
---|
96 |
user output |
---|
87 |
Test 7
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
7 55 82 52 9 65 90 86 |
correct output |
---|
20 |
user output |
---|
93 |
Test 8
Group: 1, 2
Verdict: ACCEPTED
input |
---|
8 45 52 52 95 40 85 3 46 |
correct output |
---|
34 |
user output |
---|
34 |
Test 9
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
9 77 16 59 32 22 41 87 89 78 |
correct output |
---|
3 |
user output |
---|
6 |
Test 10
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 59 78 34 26 71 9 82 68 80 74 |
correct output |
---|
111 |
user output |
---|
15 |
Test 11
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
100 100 6 10 53 84 80 7 87 3 82 26... |
correct output |
---|
91 |
user output |
---|
30 |
Test 12
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
100 25 18 62 51 79 55 71 33 21 29 ... |
correct output |
---|
58 |
user output |
---|
4 |
Test 13
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
100 3 20 19 60 11 84 94 79 63 59 9... |
correct output |
---|
124 |
user output |
---|
90 |
Test 14
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
100 99 86 42 2 97 78 8 12 98 7 98 ... |
correct output |
---|
49 |
user output |
---|
66 |
Test 15
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
100 19 19 14 30 80 53 21 18 26 85 ... |
correct output |
---|
42 |
user output |
---|
61 |
Test 16
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 852837035 608724072 368935143 ... |
correct output |
---|
680579671 |
user output |
---|
878977855 |
Test 17
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 255817977 550740070 115276527 ... |
correct output |
---|
177586289 |
user output |
---|
984868109 |
Test 18
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 30889540 9467827 526159961 367... |
correct output |
---|
439343644 |
user output |
---|
318954387 |
Test 19
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 421000302 598694653 199802169 ... |
correct output |
---|
184880259 |
user output |
---|
251156530 |
Test 20
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 578873143 289492857 855880936 ... |
correct output |
---|
937457144 |
user output |
---|
672902978 |