QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#208768#2117. Pandemia [B]qsceszthn0 17ms4148kbC++141.2kb2023-10-09 20:48:432023-10-09 20:48:44

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 1
Accepted
time: 0ms
memory: 3808kb

input:

3
8
00110100
10
1001000010
4
0000

output:

5
7
0

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

165
3
001
5
01100
3
011
5
00111
11
00011011100
4
1110
5
00000
3
011
11
10111111011
11
00010100100
9
100000110
2
11
4
1000
5
11000
3
001
4
1001
1
0
3
110
10
0000001011
5
11100
2
01
7
0100000
8
10000001
3
001
1
0
1
0
4
1010
2
11
9
001100101
8
01001100
12
001110101000
8
10110011
2
01
5
00111
11
1101001...

output:

1
3
2
3
7
3
0
2
10
7
5
2
1
2
1
3
0
2
4
3
1
2
3
1
0
0
3
2
7
6
8
7
1
3
8
2
4
9
2
2
6
7
8
8
3
7
3
11
3
1
5
2
5
2
6
2
2
5
4
10
1
1
5
0
1
11
0
4
0
0
2
9
0
0
9
1
1
4
6
4
5
0
2
2
3
8
5
5
6
1
7
8
5
8
2
9
4
2
6
1
3
0
10
7
3
2
0
7
7
9
7
10
5
0
2
2
4
1
2
2
2
8
5
7
1
1
4
6
8
0
9
8
3
1
11
3
5
10
3
6
2
8
2
2
9
3
...

result:

ok 165 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

104
10
0101101110
10
1110100100
8
10110101
8
10110010
11
11000111000
9
001011010
10
0101001010
10
1001000110
11
11011000010
9
001100001
9
000100110
12
011010100101
8
10010101
9
000010101
11
11001001010
8
10100010
8
00110010
10
1000100010
11
00011100111
8
11100010
11
11101100101
11
11110110110
8
1110...

output:

9
8
7
7
7
7
9
8
8
6
6
11
7
5
10
6
6
8
8
6
10
10
7
3
7
4
9
5
7
9
5
4
7
8
10
11
7
5
5
8
11
7
6
9
7
7
4
8
9
8
10
9
9
8
6
10
6
8
6
9
6
9
7
8
8
7
11
11
7
6
8
9
7
7
7
8
9
11
7
7
8
10
10
10
11
7
3
8
7
5
10
6
8
8
5
10
5
5
8
7
8
6
6
1

result:

ok 104 lines

Test #4:

score: -1
Wrong Answer
time: 0ms
memory: 3880kb

input:

92
12
011000110100
10
0100011000
10
1010000000
10
1100010001
10
0000010000
10
0100000101
12
100100100101
12
101011010000
12
010000100001
10
0000001100
11
00011001000
11
10100000100
12
000010001010
11
00010111101
11
00100100100
11
00001010101
12
100001110010
12
100100111000
11
00001001001
11
01001000...

output:

10
7
3
8
2
6
11
8
9
3
6
7
8
8
8
7
9
9
7
5
7
7
9
8
11
3
8
8
6
5
7
2
9
6
5
8
8
8
8
5
5
10
8
8
7
7
3
4
0
6
6
10
7
8
10
8
6
9
6
7
9
2
4
7
8
7
10
8
2
4
8
9
6
5
6
5
9
9
4
7
1
8
7
8
5
6
8
0
8
7
9
5

result:

wrong answer 1st lines differ - expected: '9', found: '10'

Subtask #2:

score: 0
Wrong Answer

Test #7:

score: 1
Accepted
time: 0ms
memory: 3584kb

input:

156
2
00
4
1011
5
01100
3
100
3
010
9
111100110
6
110101
7
1001001
10
0111100011
1
0
3
010
12
001010010000
11
00110001001
8
11111111
5
00011
8
11101011
8
00000011
5
10101
3
100
8
00000101
7
1101000
3
010
2
10
10
1011110110
8
11010000
4
1001
3
101
1
0
1
0
8
10010010
12
011101110000
12
100101110001
11...

output:

0
3
3
1
2
8
5
6
8
0
2
7
8
8
2
7
2
4
1
3
4
2
1
9
4
3
2
0
0
7
8
10
8
9
4
7
2
2
3
8
9
2
4
9
2
2
8
2
6
6
6
8
0
6
0
2
1
5
9
6
6
2
1
1
2
1
11
11
9
7
2
4
1
0
10
0
5
10
1
2
0
0
9
6
1
11
5
7
5
0
6
8
0
7
2
6
7
5
7
4
1
0
0
9
1
4
1
4
6
5
9
7
6
5
8
3
8
1
4
4
5
8
0
7
1
2
1
5
1
4
4
5
1
7
11
9
2
6
3
4
0
2
1
2
10
9
...

result:

ok 156 lines

Test #8:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

97
9
001111001
9
010011011
10
1110110011
10
0010110001
11
01100100110
10
0100110111
11
01101110101
12
100111000100
11
01100100101
12
011011000110
11
01110011101
10
0101010101
11
01011100001
9
001110100
10
1110100100
11
00011011001
12
101101101100
9
101111011
11
01100110011
10
1001001010
9
011101101
...

output:

7
8
9
7
10
9
10
9
10
10
10
9
8
6
8
8
10
8
10
9
8
6
10
4
8
9
9
9
3
8
9
8
8
8
6
9
11
11
9
9
9
9
5
11
7
9
10
8
8
6
8
8
8
9
9
6
9
10
7
9
8
8
6
10
8
10
5
9
9
7
8
8
7
9
9
9
9
4
7
10
8
8
8
9
6
10
7
11
6
9
8
7
7
9
9
8
6

result:

ok 97 lines

Test #9:

score: -1
Wrong Answer
time: 0ms
memory: 3656kb

input:

90
10
0001000100
12
001010000101
10
0000011000
11
10100100000
11
10101010011
11
10100010110
11
10001100000
10
0000101011
12
001000000001
12
000001001000
12
000001010101
10
1000000110
12
101011000000
12
000000000000
12
000001000001
11
10101110001
12
010100010001
11
00010011000
10
0000110000
10
000100...

output:

6
9
3
6
10
9
5
6
5
5
7
5
6
0
5
9
10
6
3
7
7
10
6
1
6
3
8
6
6
2
2
5
5
3
5
4
7
6
2
8
3
8
4
5
8
9
4
9
0
2
6
2
5
5
7
2
8
7
3
6
2
2
5
0
10
8
9
0
5
3
2
3
4
4
7
6
7
6
5
9
7
5
6
5
7
5
7
10
3
5

result:

wrong answer 20th lines differ - expected: '6', found: '7'

Subtask #3:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 0ms
memory: 3644kb

input:

187
52
1000111101110110110011011100100110100101001100101101
46
1100000110010100010101001000111101000000000110
62
00100011110000011000111010111111101100111101001001010011110111
76
1110001111001101110001011000100100001111110100010010100000111100011110101101
22
0001110010111010010011
22
001111000010110...

output:

50
37
58
72
19
19
33
49
84
47
17
94
23
57
81
57
83
80
76
38
87
53
78
88
33
25
31
1
86
69
0
48
4
57
63
63
56
22
53
17
90
22
73
40
76
37
95
11
34
63
13
77
81
41
38
2
86
16
90
9
1
45
42
44
34
40
58
93
61
29
25
79
21
56
70
61
13
49
90
57
53
94
43
81
45
83
63
58
59
56
54
66
41
81
9
25
31
2
14
43
19
65
87...

result:

wrong answer 7th lines differ - expected: '32', found: '33'

Subtask #4:

score: 0
Wrong Answer

Test #23:

score: 0
Wrong Answer
time: 1ms
memory: 3656kb

input:

191
58
0010001101010001101010001110000000011010010110111110100000
95
10101101001110010000111101000111010110010000111101001000000011110000000000111010010000010101111
38
11111000100001001111001101000111111000
55
1111010100011100001100110100101010010000100000001001110
92
1100110101100111010101010001101...

output:

49
84
34
49
90
7
81
56
81
47
54
6
39
70
14
89
89
35
64
39
45
72
3
74
43
68
46
33
45
65
30
53
45
53
9
76
72
22
32
83
37
77
9
54
29
46
49
83
16
17
19
35
8
93
63
68
47
16
88
7
56
6
85
93
22
71
36
19
17
89
19
40
92
2
89
37
31
7
5
20
77
8
83
41
93
1
92
2
9
88
46
29
67
18
78
46
40
18
18
4
80
19
67
96
30
3...

result:

wrong answer 1st lines differ - expected: '48', found: '49'

Subtask #5:

score: 0
Wrong Answer

Test #33:

score: 0
Wrong Answer
time: 2ms
memory: 3844kb

input:

419
340
0000110110111010111011000011010010001011101000101010110110111010001100110110101011111010110000001010111010100110000011000100011010011010101000110111011000110001000010001011111110001100100101100001001000110010111100100011010101100111101101001111111011101010001011100110000010000111110100011010...

output:

334
107
10
282
417
407
326
326
188
169
41
152
14
78
80
108
490
302
231
399
393
37
492
251
399
90
425
144
157
26
66
67
448
117
438
342
16
416
109
280
19
374
160
100
446
7
435
195
307
225
414
492
79
343
38
257
196
348
64
450
255
249
432
290
259
38
152
377
137
278
8
358
259
25
389
84
156
457
216
74
166...

result:

wrong answer 1st lines differ - expected: '333', found: '334'

Subtask #6:

score: 0
Wrong Answer

Test #44:

score: 0
Wrong Answer
time: 0ms
memory: 3596kb

input:

402
278
01101101111000111010111110001110100011001000000011100001000100110111000000001000100100100011110000001001010001101010010110001101101100001001111011110001111100100100101110000011011101000001100100011100111111011111011011011100110011111111111100111001001011000001110001000010010001
115
010001111...

output:

269
110
235
278
143
415
486
47
183
418
410
231
69
343
360
127
55
273
348
274
451
229
25
89
0
374
335
372
55
396
129
440
8
432
171
301
182
244
391
168
261
380
49
326
233
6
489
242
275
421
80
57
201
299
442
457
333
426
191
319
112
129
227
360
113
270
380
15
162
417
462
335
71
432
364
81
327
399
103
92...

result:

wrong answer 12th lines differ - expected: '229', found: '231'

Subtask #7:

score: 0
Wrong Answer

Test #55:

score: 1
Accepted
time: 4ms
memory: 3796kb

input:

13
28591
111011011111010101011001111100110001010110011100101010011001010001010110001001100111100110001100011000000011011110011010100000100110010111110111001101010110100000010011000100101001011010000110010110001100110111101000101101011001100101101000110000110011110000001101101111110110110010001000010...

output:

28562
3405
12475
19029
16539
22928
10610
26329
9288
16613
8205
6234
19504

result:

ok 13 lines

Test #56:

score: 0
Accepted
time: 3ms
memory: 4060kb

input:

7
30000
1111110110001100111010111111011111111111001101100111111010111101011011101101110111110111111110110111111101001110101010110111011010111111101111101110110111011101101110111011111101111101110011011110011100101110001111111111111100011111111111111101111111010111111010101111101111011101110011111111...

output:

29994
29991
29993
29992
29993
29991
19997

result:

ok 7 lines

Test #57:

score: -1
Wrong Answer
time: 0ms
memory: 3756kb

input:

7
29999
1000000000000000001001010000000000000110000010101100000001100000000000001000000010010000000100100010101010001100000010000010001010100100000001000001000110000000000000100000011000000001000000000000000000000000000000100000000100010010000101000001001001001010010000000000000000100100000000000000...

output:

29825
29864
29839
29871
29847
29844
19860

result:

wrong answer 3rd lines differ - expected: '29837', found: '29839'

Subtask #8:

score: 0
Wrong Answer

Test #68:

score: 1
Accepted
time: 4ms
memory: 3656kb

input:

7
30000
0000000001110010001001100101001101000001001011100001001000000010010010010001011000100100100100100100110001011000111110100010101011100101000001000011011000001100011001000000011101101000100000011100000110000100011010011001000100001100101110000001100010100000001000000111100110000100101110000001...

output:

29946
29943
29944
29944
29936
29937
19960

result:

ok 7 lines

Test #69:

score: -1
Wrong Answer
time: 5ms
memory: 3592kb

input:

10092
1
1
2
10
3
101
3
100
3
010
4
1001
4
1010
4
0001
4
0010
5
10101
5
10001
5
10010
5
10100
5
01010
5
00001
5
00010
5
00100
6
101001
6
100001
6
101010
6
100010
6
100100
6
010010
6
000101
6
010100
6
000001
6
010000
6
001000
7
1010101
7
1001001
7
1000101
7
1000001
7
0100101
7
1000010
7
1010100
7
0101...

output:

1
1
2
1
2
3
3
1
2
4
3
4
3
4
1
2
2
5
3
5
4
4
5
3
4
1
2
2
6
6
5
3
6
4
5
6
4
5
4
5
3
4
4
1
2
2
2
7
6
5
3
7
7
6
4
6
7
5
5
5
6
4
6
4
5
5
3
4
4
1
2
2
2
8
8
7
7
6
5
3
8
7
6
4
7
8
7
8
6
7
5
5
6
7
5
6
5
6
6
4
6
6
4
5
5
3
4
4
4
1
2
2
2
2
9
9
8
7
7
6
5
3
9
9
8
8
7
6
4
8
9
7
8
7
7
5
5
7
8
7
8
6
8
5
6
6
7
7
5
6
...

result:

wrong answer 63rd lines differ - expected: '5', found: '6'

Subtask #9:

score: 0
Wrong Answer

Test #80:

score: 0
Wrong Answer
time: 15ms
memory: 4148kb

input:

23
66986
110000001011100111000101100110011000111010011000100100011100010110000011010111011011001000100110110101100010000110101000111010000110000100110101011010100111000011111001000101010101101010111011111110101001001011011010001001101011110111100100110110010100000100010011111011110011010110010011100...

output:

66963
1065
1931
31387
73868
60564
2576
7650
82367
46212
42769
25516
58535
21318
82200
47104
95979
85137
83905
41655
18423
6640
15699

result:

wrong answer 23rd lines differ - expected: '15697', found: '15699'

Subtask #10:

score: 0
Wrong Answer

Test #93:

score: 0
Wrong Answer
time: 17ms
memory: 4052kb

input:

11
100000
00010101001000000000000000000101000000011010000000000100011101010011110000111100111100001001100000101110000100110001100001000100011111000110110000110000100111010010101100000100001101000101000010101000001000100000000100011111000001000100001000100100000111001000101011000101000010001001011000...

output:

99933
99938
99938
99922
99909
99936
99929
99935
99922
99920
6

result:

wrong answer 3rd lines differ - expected: '99934', found: '99938'