QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#261575#7302. Walk of Length 6WhiteqwqAC ✓25ms7604kbC++201.5kb2023-11-23 00:07:062023-11-23 00:07:07

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3524kb

input:

3
011
101
110
4
0101
1010
0101
1010
6
011111
101111
110111
111011
111101
111110

output:

66
128
14910

result:

ok 3 number(s): "66 128 14910"

Test #2:

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

input:

1
0
2
01
10
3
011
100
100
3
011
101
110
4
0001
0001
0001
1110
4
0101
1001
0001
1110
4
0100
1001
0001
0110
4
0101
1011
0101
1110
4
0110
1001
1001
0110
4
0111
1011
1101
1110
5
01000
10111
01000
01000
01000
5
01111
10001
10000
10000
11000
5
01100
10110
11011
01100
00100
5
01111
10110
11010
11100
10000
...

output:

0
2
16
66
54
116
36
298
128
732
128
202
408
878
80
172
794
1372
56
372
668
190
2370
142
300
300
100
650
1216
432
4100
250
336
566
1072
988
1602
850
2648
446
1434
4438
160
264
524
1030
130
802
258
362
1380
518
1650
2372
3538
5460
488
106
234
892
1542
482
362
790
1326
2186
288
1176
1784
808
5232
7358
...

result:

ok 143 numbers

Test #3:

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

input:

20
01110111111111111111
10111111111011111111
11011111101111101111
11101110111011111111
01110111111011011011
11111011101111011110
11111101111111101111
11101110111111111111
11111111011111111111
11011011101111101111
11111111110111010111
10100111111011111111
11111111111101111110
11111111111110111111
111...

output:

11368772
12823048
16678042
17149212
18099376
18616410
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
19138700
191...

result:

ok 50 numbers

Test #4:

score: 0
Accepted
time: 2ms
memory: 3540kb

input:

50
01111111111101010111111110111111111111001110111111
10111111011010111101111111011111111111111111011111
11010101111111111110011110001111111111111111111111
11101111110101111110101111111111111111111101111111
11010111111101101111011111111101111111101111111110
111110111011111111111111111111111111111101...

output:

1250940348
1590514050
1984065786
2169894880
2338139630
2348971408
2399983250
2399983250
2389639440
2389639440
2399983250
2399983250
2399983250
2399983250
2399983250
2399983250
2399983250
2399983250
2399983250
2399983250

result:

ok 20 numbers

Test #5:

score: 0
Accepted
time: 25ms
memory: 7404kb

input:

1000
0110000100111110011111111011111111111111111010111011111111110111111111110111110011101111110111111110110111111111111011111100101111000111011011101111110011111101110110111011100111111101101110101111001011011101011101111101111111111111000110011011010111111111111111111010111011011110010111011111101...

output:

1943182464425962

result:

ok 1 number(s): "1943182464425962"

Test #6:

score: 0
Accepted
time: 22ms
memory: 7404kb

input:

1000
0111101111111111110111111111110011101111111101111011110111111110111011011101111110111111111111111111111111111110111110111110111101110110111111101111111111101101111111011011111111111111011111111111111111111011111111111111111110111111111111101111111101111011111111111111111111111111111000111111111...

output:

4406302098164568

result:

ok 1 number(s): "4406302098164568"

Test #7:

score: 0
Accepted
time: 20ms
memory: 7604kb

input:

1000
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111010111111111111111111111111111111111111111011111111111111111...

output:

7524709536316820

result:

ok 1 number(s): "7524709536316820"

Test #8:

score: 0
Accepted
time: 19ms
memory: 7404kb

input:

1000
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

8841456311725232

result:

ok 1 number(s): "8841456311725232"

Test #9:

score: 0
Accepted
time: 19ms
memory: 7552kb

input:

1000
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

8930014130020796

result:

ok 1 number(s): "8930014130020796"

Test #10:

score: 0
Accepted
time: 15ms
memory: 7408kb

input:

1000
0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

output:

8930204741115000

result:

ok 1 number(s): "8930204741115000"

Test #11:

score: 0
Accepted
time: 19ms
memory: 7400kb

input:

1000
0000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

55816

result:

ok 1 number(s): "55816"

Test #12:

score: 0
Accepted
time: 16ms
memory: 7480kb

input:

1000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

0

result:

ok 1 number(s): "0"

Extra Test:

score: 0
Extra Test Passed