Task: | Pukkitappelu battle royale |
Sender: | aalto2024e_005 |
Submission time: | 2024-09-30 17:39:31 +0300 |
Language: | C++ (C++20) |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
#4 | ACCEPTED | 0.00 s | details |
#5 | ACCEPTED | 0.00 s | details |
#6 | ACCEPTED | 0.00 s | details |
#7 | ACCEPTED | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | ACCEPTED | 0.00 s | details |
#10 | ACCEPTED | 0.00 s | details |
#11 | ACCEPTED | 0.00 s | details |
#12 | ACCEPTED | 0.00 s | details |
#13 | ACCEPTED | 0.00 s | details |
#14 | ACCEPTED | 0.00 s | details |
#15 | ACCEPTED | 0.00 s | details |
#16 | ACCEPTED | 0.00 s | details |
#17 | ACCEPTED | 0.00 s | details |
#18 | ACCEPTED | 0.00 s | details |
#19 | ACCEPTED | 0.00 s | details |
#20 | ACCEPTED | 0.00 s | details |
#21 | ACCEPTED | 0.00 s | details |
#22 | ACCEPTED | 0.00 s | details |
#23 | ACCEPTED | 0.00 s | details |
#24 | ACCEPTED | 0.00 s | details |
#25 | ACCEPTED | 0.00 s | details |
#26 | ACCEPTED | 0.00 s | details |
#27 | ACCEPTED | 0.00 s | details |
#28 | ACCEPTED | 0.00 s | details |
#29 | ACCEPTED | 0.00 s | details |
#30 | ACCEPTED | 0.00 s | details |
#31 | ACCEPTED | 0.00 s | details |
#32 | ACCEPTED | 0.00 s | details |
#33 | ACCEPTED | 0.00 s | details |
#34 | ACCEPTED | 0.00 s | details |
#35 | ACCEPTED | 0.00 s | details |
#36 | ACCEPTED | 0.00 s | details |
#37 | ACCEPTED | 0.00 s | details |
#38 | ACCEPTED | 0.00 s | details |
#39 | ACCEPTED | 0.00 s | details |
#40 | ACCEPTED | 0.00 s | details |
#41 | ACCEPTED | 0.00 s | details |
#42 | ACCEPTED | 0.00 s | details |
#43 | ACCEPTED | 0.00 s | details |
#44 | ACCEPTED | 0.00 s | details |
#45 | ACCEPTED | 0.00 s | details |
#46 | ACCEPTED | 0.00 s | details |
#47 | ACCEPTED | 0.00 s | details |
#48 | ACCEPTED | 0.00 s | details |
#49 | ACCEPTED | 0.00 s | details |
#50 | ACCEPTED | 0.00 s | details |
#51 | ACCEPTED | 0.00 s | details |
#52 | ACCEPTED | 0.00 s | details |
#53 | ACCEPTED | 0.00 s | details |
#54 | ACCEPTED | 0.00 s | details |
#55 | ACCEPTED | 0.00 s | details |
#56 | ACCEPTED | 0.00 s | details |
#57 | ACCEPTED | 0.01 s | details |
#58 | ACCEPTED | 0.00 s | details |
#59 | ACCEPTED | 0.00 s | details |
#60 | ACCEPTED | 0.00 s | details |
#61 | ACCEPTED | 0.00 s | details |
#62 | ACCEPTED | 0.00 s | details |
#63 | ACCEPTED | 0.00 s | details |
#64 | ACCEPTED | 0.00 s | details |
#65 | ACCEPTED | 0.00 s | details |
#66 | ACCEPTED | 0.00 s | details |
#67 | ACCEPTED | 0.00 s | details |
#68 | ACCEPTED | 0.00 s | details |
#69 | ACCEPTED | 0.00 s | details |
#70 | ACCEPTED | 0.00 s | details |
#71 | ACCEPTED | 0.01 s | details |
#72 | ACCEPTED | 0.00 s | details |
#73 | ACCEPTED | 0.00 s | details |
#74 | ACCEPTED | 0.00 s | details |
#75 | ACCEPTED | 0.00 s | details |
#76 | ACCEPTED | 0.00 s | details |
#77 | ACCEPTED | 0.00 s | details |
#78 | ACCEPTED | 0.00 s | details |
#79 | ACCEPTED | 0.00 s | details |
#80 | ACCEPTED | 0.05 s | details |
#81 | ACCEPTED | 0.05 s | details |
#82 | ACCEPTED | 0.05 s | details |
#83 | ACCEPTED | 0.05 s | details |
#84 | ACCEPTED | 0.06 s | details |
#85 | ACCEPTED | 0.05 s | details |
#86 | ACCEPTED | 0.05 s | details |
#87 | ACCEPTED | 0.04 s | details |
#88 | ACCEPTED | 0.05 s | details |
#89 | ACCEPTED | 0.04 s | details |
Code
#include <iostream> #include <vector> #include <string> #include <math.h> using namespace std; int main() { long long n, x; cin >> n >> x; vector<bool> v = vector<bool>(n); for (int i = 0; i < n; ++i){ int aux; cin >> aux; v[i] = (aux % 2 == 0); } int winner = 0; for (int i = 1; i < n;++i){ if (v[i-1] != v[i]) winner = i; } cout << winner+1 << endl; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 14 10 |
correct output |
---|
1 |
user output |
---|
1 |
Test 2
Verdict: ACCEPTED
input |
---|
2 10 1 2 |
correct output |
---|
2 |
user output |
---|
2 |
Test 3
Verdict: ACCEPTED
input |
---|
2 7 3 5 |
correct output |
---|
1 |
user output |
---|
1 |
Test 4
Verdict: ACCEPTED
input |
---|
2 13 4 12 |
correct output |
---|
1 |
user output |
---|
1 |
Test 5
Verdict: ACCEPTED
input |
---|
2 12 6 10 |
correct output |
---|
1 |
user output |
---|
1 |
Test 6
Verdict: ACCEPTED
input |
---|
2 6 3 6 |
correct output |
---|
2 |
user output |
---|
2 |
Test 7
Verdict: ACCEPTED
input |
---|
2 19 6 15 |
correct output |
---|
2 |
user output |
---|
2 |
Test 8
Verdict: ACCEPTED
input |
---|
2 16 2 14 |
correct output |
---|
1 |
user output |
---|
1 |
Test 9
Verdict: ACCEPTED
input |
---|
2 20 11 13 |
correct output |
---|
1 |
user output |
---|
1 |
Test 10
Verdict: ACCEPTED
input |
---|
2 17 7 15 |
correct output |
---|
1 |
user output |
---|
1 |
Test 11
Verdict: ACCEPTED
input |
---|
2 18 7 18 |
correct output |
---|
2 |
user output |
---|
2 |
Test 12
Verdict: ACCEPTED
input |
---|
3 8 1 6 8 |
correct output |
---|
2 |
user output |
---|
2 |
Test 13
Verdict: ACCEPTED
input |
---|
3 20 11 13 15 |
correct output |
---|
1 |
user output |
---|
1 |
Test 14
Verdict: ACCEPTED
input |
---|
3 8 3 6 8 |
correct output |
---|
2 |
user output |
---|
2 |
Test 15
Verdict: ACCEPTED
input |
---|
3 14 5 8 10 |
correct output |
---|
2 |
user output |
---|
2 |
Test 16
Verdict: ACCEPTED
input |
---|
3 3 1 2 3 |
correct output |
---|
3 |
user output |
---|
3 |
Test 17
Verdict: ACCEPTED
input |
---|
3 7 1 6 7 |
correct output |
---|
3 |
user output |
---|
3 |
Test 18
Verdict: ACCEPTED
input |
---|
3 12 3 10 11 |
correct output |
---|
3 |
user output |
---|
3 |
Test 19
Verdict: ACCEPTED
input |
---|
3 3 1 2 3 |
correct output |
---|
3 |
user output |
---|
3 |
Test 20
Verdict: ACCEPTED
input |
---|
3 3 1 2 3 |
correct output |
---|
3 |
user output |
---|
3 |
Test 21
Verdict: ACCEPTED
input |
---|
3 15 1 4 5 |
correct output |
---|
3 |
user output |
---|
3 |
Test 22
Verdict: ACCEPTED
input |
---|
3 10 6 8 9 |
correct output |
---|
3 |
user output |
---|
3 |
Test 23
Verdict: ACCEPTED
input |
---|
3 13 8 9 12 |
correct output |
---|
3 |
user output |
---|
3 |
Test 24
Verdict: ACCEPTED
input |
---|
4 20 2 8 13 14 |
correct output |
---|
4 |
user output |
---|
4 |
Test 25
Verdict: ACCEPTED
input |
---|
4 20 12 13 14 18 |
correct output |
---|
3 |
user output |
---|
3 |
Test 26
Verdict: ACCEPTED
input |
---|
4 13 2 4 12 13 |
correct output |
---|
4 |
user output |
---|
4 |
Test 27
Verdict: ACCEPTED
input |
---|
4 13 1 3 7 13 |
correct output |
---|
1 |
user output |
---|
1 |
Test 28
Verdict: ACCEPTED
input |
---|
4 16 5 7 8 15 |
correct output |
---|
4 |
user output |
---|
4 |
Test 29
Verdict: ACCEPTED
input |
---|
4 11 7 8 10 11 |
correct output |
---|
4 |
user output |
---|
4 |
Test 30
Verdict: ACCEPTED
input |
---|
5 13 6 8 10 11 12 |
correct output |
---|
5 |
user output |
---|
5 |
Test 31
Verdict: ACCEPTED
input |
---|
5 11 1 2 4 8 11 |
correct output |
---|
5 |
user output |
---|
5 |
Test 32
Verdict: ACCEPTED
input |
---|
5 11 1 3 5 7 11 |
correct output |
---|
1 |
user output |
---|
1 |
Test 33
Verdict: ACCEPTED
input |
---|
5 13 1 2 4 10 11 |
correct output |
---|
5 |
user output |
---|
5 |
Test 34
Verdict: ACCEPTED
input |
---|
5 20 4 11 18 19 20 |
correct output |
---|
5 |
user output |
---|
5 |
Test 35
Verdict: ACCEPTED
input |
---|
5 8 1 2 3 7 8 |
correct output |
---|
5 |
user output |
---|
5 |
Test 36
Verdict: ACCEPTED
input |
---|
5 19 2 4 7 16 19 |
correct output |
---|
5 |
user output |
---|
5 |
Test 37
Verdict: ACCEPTED
input |
---|
5 6 2 3 4 5 6 |
correct output |
---|
5 |
user output |
---|
5 |
Test 38
Verdict: ACCEPTED
input |
---|
5 18 1 5 7 16 18 |
correct output |
---|
4 |
user output |
---|
4 |
Test 39
Verdict: ACCEPTED
input |
---|
5 5 1 2 3 4 5 |
correct output |
---|
5 |
user output |
---|
5 |
Test 40
Verdict: ACCEPTED
input |
---|
10 16 1 5 7 8 9 10 11 12 14 15 |
correct output |
---|
10 |
user output |
---|
10 |
Test 41
Verdict: ACCEPTED
input |
---|
10 14 1 2 3 4 5 6 8 10 11 14 |
correct output |
---|
10 |
user output |
---|
10 |
Test 42
Verdict: ACCEPTED
input |
---|
10 14 1 2 3 5 6 7 8 9 10 14 |
correct output |
---|
9 |
user output |
---|
9 |
Test 43
Verdict: ACCEPTED
input |
---|
10 16 1 2 3 5 7 9 10 12 14 15 |
correct output |
---|
10 |
user output |
---|
10 |
Test 44
Verdict: ACCEPTED
input |
---|
10 20 4 5 11 12 13 14 15 18 19 20 |
correct output |
---|
10 |
user output |
---|
10 |
Test 45
Verdict: ACCEPTED
input |
---|
10 12 1 2 3 5 6 7 8 10 11 12 |
correct output |
---|
10 |
user output |
---|
10 |
Test 46
Verdict: ACCEPTED
input |
---|
10 19 1 2 3 4 7 8 11 12 16 19 |
correct output |
---|
10 |
user output |
---|
10 |
Test 47
Verdict: ACCEPTED
input |
---|
10 10 1 2 3 4 5 6 7 8 9 10 |
correct output |
---|
10 |
user output |
---|
10 |
Test 48
Verdict: ACCEPTED
input |
---|
10 19 1 5 8 9 11 12 15 16 17 19 |
correct output |
---|
9 |
user output |
---|
9 |
Test 49
Verdict: ACCEPTED
input |
---|
10 10 1 2 3 4 5 6 7 8 9 10 |
correct output |
---|
10 |
user output |
---|
10 |
Test 50
Verdict: ACCEPTED
input |
---|
100 589284111 11528796 12405338 23576564 347... |
correct output |
---|
100 |
user output |
---|
100 |
Test 51
Verdict: ACCEPTED
input |
---|
100 447774061 54585 8727508 9242273 13069870... |
correct output |
---|
98 |
user output |
---|
98 |
Test 52
Verdict: ACCEPTED
input |
---|
100 468146062 12372478 31155934 38008300 391... |
correct output |
---|
99 |
user output |
---|
99 |
Test 53
Verdict: ACCEPTED
input |
---|
100 591414846 11503156 12648374 14184172 147... |
correct output |
---|
94 |
user output |
---|
94 |
Test 54
Verdict: ACCEPTED
input |
---|
100 967035023 5539596 6689688 9648746 204276... |
correct output |
---|
92 |
user output |
---|
92 |
Test 55
Verdict: ACCEPTED
input |
---|
100 238363452 391838 528333 1368439 3479103 ... |
correct output |
---|
95 |
user output |
---|
95 |
Test 56
Verdict: ACCEPTED
input |
---|
100 958701382 44771412 58491554 63972355 689... |
correct output |
---|
97 |
user output |
---|
97 |
Test 57
Verdict: ACCEPTED
input |
---|
100 81935503 1314125 2056565 5446047 595110... |
correct output |
---|
100 |
user output |
---|
100 |
Test 58
Verdict: ACCEPTED
input |
---|
100 937837780 11934038 12239373 22850648 308... |
correct output |
---|
100 |
user output |
---|
100 |
Test 59
Verdict: ACCEPTED
input |
---|
100 11139267 84150 148618 432268 440149 520... |
correct output |
---|
100 |
user output |
---|
100 |
Test 60
Verdict: ACCEPTED
input |
---|
200 589284211 2880992 5740962 8327109 115287... |
correct output |
---|
200 |
user output |
---|
200 |
Test 61
Verdict: ACCEPTED
input |
---|
200 447774161 54585 1369773 4298783 5568757 ... |
correct output |
---|
199 |
user output |
---|
199 |
Test 62
Verdict: ACCEPTED
input |
---|
200 468146162 2645901 6212116 12193387 12372... |
correct output |
---|
200 |
user output |
---|
200 |
Test 63
Verdict: ACCEPTED
input |
---|
200 591414946 11503156 12648374 13023409 141... |
correct output |
---|
197 |
user output |
---|
197 |
Test 64
Verdict: ACCEPTED
input |
---|
200 967035123 3142409 4210032 5539596 668968... |
correct output |
---|
200 |
user output |
---|
200 |
Test 65
Verdict: ACCEPTED
input |
---|
200 238363552 391838 528333 1368439 2951457 ... |
correct output |
---|
200 |
user output |
---|
200 |
Test 66
Verdict: ACCEPTED
input |
---|
200 958701482 915344 26318971 39308105 44426... |
correct output |
---|
200 |
user output |
---|
200 |
Test 67
Verdict: ACCEPTED
input |
---|
200 81935603 117854 1314125 2056565 3274591... |
correct output |
---|
200 |
user output |
---|
200 |
Test 68
Verdict: ACCEPTED
input |
---|
200 937837880 798751 8921056 9526547 1193403... |
correct output |
---|
200 |
user output |
---|
200 |
Test 69
Verdict: ACCEPTED
input |
---|
200 11139367 50914 81279 84150 90865 148618... |
correct output |
---|
200 |
user output |
---|
200 |
Test 70
Verdict: ACCEPTED
input |
---|
1000 589285011 33962 2483784 2880992 4837424 ... |
correct output |
---|
998 |
user output |
---|
998 |
Test 71
Verdict: ACCEPTED
input |
---|
1000 447774961 54585 191853 483557 1369773 14... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 72
Verdict: ACCEPTED
input |
---|
1000 468146962 58977 735268 898440 1184659 12... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 73
Verdict: ACCEPTED
input |
---|
1000 591415746 293786 457427 1304174 2617747 ... |
correct output |
---|
995 |
user output |
---|
995 |
Test 74
Verdict: ACCEPTED
input |
---|
1000 967035923 838480 973536 1455856 3142409 ... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 75
Verdict: ACCEPTED
input |
---|
1000 238364352 91364 391838 528333 959636 117... |
correct output |
---|
998 |
user output |
---|
998 |
Test 76
Verdict: ACCEPTED
input |
---|
1000 958702282 557448 915344 2438616 2817236 ... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 77
Verdict: ACCEPTED
input |
---|
1000 81936403 117854 134799 153186 216760 34... |
correct output |
---|
999 |
user output |
---|
999 |
Test 78
Verdict: ACCEPTED
input |
---|
1000 937838680 798751 996213 1265361 2336515 ... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 79
Verdict: ACCEPTED
input |
---|
1000 11140167 3811 29493 33378 46013 50914 5... |
correct output |
---|
1000 |
user output |
---|
1000 |
Test 80
Verdict: ACCEPTED
input |
---|
100000 589384011 2462 12290 14854 19988 28400 3... |
correct output |
---|
99996 |
user output |
---|
99996 |
Test 81
Verdict: ACCEPTED
input |
---|
100000 447873961 324 4948 5149 18319 22491 2468... |
correct output |
---|
100000 |
user output |
---|
100000 |
Test 82
Verdict: ACCEPTED
input |
---|
100000 468245962 9543 11563 11899 20558 24392 2... |
correct output |
---|
100000 |
user output |
---|
100000 |
Test 83
Verdict: ACCEPTED
input |
---|
100000 591514746 7688 9041 14326 23056 27308 28... |
correct output |
---|
99998 |
user output |
---|
99998 |
Test 84
Verdict: ACCEPTED
input |
---|
100000 967134923 1024 2994 6645 24256 27426 329... |
correct output |
---|
99997 |
user output |
---|
99997 |
Test 85
Verdict: ACCEPTED
input |
---|
100000 238463352 675 900 4012 15115 15476 22069... |
correct output |
---|
100000 |
user output |
---|
100000 |
Test 86
Verdict: ACCEPTED
input |
---|
100000 958801282 7177 18494 20083 35163 36876 4... |
correct output |
---|
99999 |
user output |
---|
99999 |
Test 87
Verdict: ACCEPTED
input |
---|
100000 82035403 237 539 626 1804 2747 3269 358... |
correct output |
---|
100000 |
user output |
---|
100000 |
Test 88
Verdict: ACCEPTED
input |
---|
100000 937937680 1191 7701 13173 20679 24337 30... |
correct output |
---|
100000 |
user output |
---|
100000 |
Test 89
Verdict: ACCEPTED
input |
---|
100000 11239167 70 124 318 547 595 692 784 880... |
correct output |
---|
99999 |
user output |
---|
99999 |