Task: | Jack and the Beanbag |
Sender: | #dt-lapset |
Submission time: | 2016-11-12 13:10:09 +0200 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.06 s | details |
#2 | WRONG ANSWER | 0.05 s | details |
#3 | WRONG ANSWER | 0.05 s | details |
#4 | ACCEPTED | 0.06 s | details |
#5 | ACCEPTED | 0.05 s | details |
#6 | WRONG ANSWER | 0.05 s | details |
#7 | WRONG ANSWER | 0.05 s | details |
#8 | WRONG ANSWER | 0.05 s | details |
#9 | WRONG ANSWER | 0.06 s | details |
#10 | WRONG ANSWER | 0.05 s | details |
#11 | WRONG ANSWER | 0.07 s | details |
#12 | ACCEPTED | 0.06 s | details |
#13 | ACCEPTED | 0.07 s | details |
#14 | WRONG ANSWER | 0.05 s | details |
#15 | WRONG ANSWER | 0.06 s | details |
#16 | WRONG ANSWER | 0.06 s | details |
#17 | WRONG ANSWER | 0.06 s | details |
#18 | ACCEPTED | 0.05 s | details |
#19 | ACCEPTED | 0.06 s | details |
#20 | WRONG ANSWER | 0.06 s | details |
#21 | WRONG ANSWER | 0.05 s | details |
#22 | WRONG ANSWER | 0.06 s | details |
#23 | WRONG ANSWER | 0.06 s | details |
#24 | WRONG ANSWER | 0.06 s | details |
#25 | WRONG ANSWER | 0.06 s | details |
#26 | ACCEPTED | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:22:22: warning: 'minidx' may be used uninitialized in this function [-Wmaybe-uninitialized] v[minidx] = 0; ^
Code
#include <bits/stdc++.h> using namespace std; int main () { int b; cin >> b; int v[b]; for (int i = 0; i < b; ++i) cin >> v[i]; int t; cin >> t; for (int i = 0; i < t; ++i) { int m; cin >> m; int minidx, minv = 111; for (int j = 0; j < m; ++j) { int idx; cin >> idx; idx--; if (v[idx] < minv) minv = v[idx], minidx = idx; } v[minidx] = 0; } int sum = 0; for (int i = 0; i < b; ++i) { sum += v[i]; } cout << sum; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
13 34 46 39 35 30 44 35 41 38 41 ... |
correct output |
---|
441 |
user output |
---|
383 |
Test 2
Verdict: WRONG ANSWER
input |
---|
13 20 19 24 25 29 27 29 27 33 18 ... |
correct output |
---|
189 |
user output |
---|
166 |
Test 3
Verdict: WRONG ANSWER
input |
---|
16 30 17 22 26 24 29 26 27 16 25 ... |
correct output |
---|
390 |
user output |
---|
378 |
Test 4
Verdict: ACCEPTED
input |
---|
13 36 22 20 19 19 23 21 30 26 21 ... |
correct output |
---|
201 |
user output |
---|
201 |
Test 5
Verdict: ACCEPTED
input |
---|
2 46 46 95 2 1 2 1 2 ... |
correct output |
---|
0 |
user output |
---|
0 |
Test 6
Verdict: WRONG ANSWER
input |
---|
11 36 31 33 47 44 31 40 40 37 22 ... |
correct output |
---|
259 |
user output |
---|
204 |
Test 7
Verdict: WRONG ANSWER
input |
---|
5 76 72 66 58 68 18 5 3 2 5 4 1 4 3 5 1 4 ... |
correct output |
---|
214 |
user output |
---|
148 |
Test 8
Verdict: WRONG ANSWER
input |
---|
12 22 19 25 16 20 22 26 16 20 11 ... |
correct output |
---|
184 |
user output |
---|
157 |
Test 9
Verdict: WRONG ANSWER
input |
---|
14 24 27 24 22 33 23 28 24 27 17 ... |
correct output |
---|
303 |
user output |
---|
261 |
Test 10
Verdict: WRONG ANSWER
input |
---|
20 20 21 27 25 18 23 22 22 25 21 ... |
correct output |
---|
332 |
user output |
---|
260 |
Test 11
Verdict: WRONG ANSWER
input |
---|
13 18 14 26 40 25 21 25 29 42 28 ... |
correct output |
---|
229 |
user output |
---|
218 |
Test 12
Verdict: ACCEPTED
input |
---|
5 28 23 33 19 22 30 4 1 2 5 4 3 2 1 3 ... |
correct output |
---|
61 |
user output |
---|
61 |
Test 13
Verdict: ACCEPTED
input |
---|
6 39 54 37 56 40 46 48 4 4 2 6 5 4 6 3 4 1 ... |
correct output |
---|
102 |
user output |
---|
102 |
Test 14
Verdict: WRONG ANSWER
input |
---|
20 14 24 26 19 20 18 14 17 27 23 ... |
correct output |
---|
322 |
user output |
---|
284 |
Test 15
Verdict: WRONG ANSWER
input |
---|
20 10 11 5 6 4 10 5 5 8 7 7 10 5 ... |
correct output |
---|
120 |
user output |
---|
112 |
Test 16
Verdict: WRONG ANSWER
input |
---|
20 15 25 23 25 27 25 25 19 15 26 ... |
correct output |
---|
384 |
user output |
---|
354 |
Test 17
Verdict: WRONG ANSWER
input |
---|
20 1 0 5 2 1 1 1 1 1 2 2 1 2 2 0 ... |
correct output |
---|
25 |
user output |
---|
23 |
Test 18
Verdict: ACCEPTED
input |
---|
20 0 0 0 0 0 1 1 0 0 1 1 1 1 2 0 ... |
correct output |
---|
8 |
user output |
---|
8 |
Test 19
Verdict: ACCEPTED
input |
---|
20 24 15 26 23 28 25 25 29 24 21 ... |
correct output |
---|
453 |
user output |
---|
453 |
Test 20
Verdict: WRONG ANSWER
input |
---|
12 35 34 44 50 76 80 72 63 65 67 ... |
correct output |
---|
450 |
user output |
---|
365 |
Test 21
Verdict: WRONG ANSWER
input |
---|
14 1 3 2 3 3 5 2 1 1 5 6 0 2 4 89 12 13 6 9 2 10 4 8 7 3 11 1 5 11 8 10 2 13 6 9 1 5 11 3 14 ... |
correct output |
---|
26 |
user output |
---|
21 |
Test 22
Verdict: WRONG ANSWER
input |
---|
18 40 31 37 30 31 59 62 53 58 57 ... |
correct output |
---|
793 |
user output |
---|
763 |
Test 23
Verdict: WRONG ANSWER
input |
---|
7 20 28 42 34 33 41 46 11 5 3 7 5 4 1 6 4 3 6 5 7 1 ... |
correct output |
---|
174 |
user output |
---|
154 |
Test 24
Verdict: WRONG ANSWER
input |
---|
7 15 15 16 14 23 13 16 44 5 5 6 1 4 2 4 6 3 5 7 ... |
correct output |
---|
54 |
user output |
---|
39 |
Test 25
Verdict: WRONG ANSWER
input |
---|
5 24 32 19 18 20 85 3 2 5 4 4 2 3 1 5 ... |
correct output |
---|
51 |
user output |
---|
32 |
Test 26
Verdict: ACCEPTED
input |
---|
2 100 99 49 1 1 1 1 ... |
correct output |
---|
0 |
user output |
---|
0 |