QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#682032#6442. Secret of Tianqiu ValleyZhangYiDeWA 1ms4104kbC++232.0kb2024-10-27 13:36:182024-10-27 13:36:20

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3820kb

input:

2
5
00000
3
001

output:

7
1 3 2 3 4 3 5
0

result:

ok all puzzle solved (2 test cases)

Test #2:

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

input:

7
3
000
3
100
3
010
3
110
3
001
3
101
3
011

output:

1
3
0
0
0
0
0
0

result:

ok all puzzle solved (7 test cases)

Test #3:

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

input:

15
4
0000
4
1000
4
0100
4
1100
4
0010
4
1010
4
0110
4
1110
4
0001
4
1001
4
0101
4
1101
4
0011
4
1011
4
0111

output:

4
1 3 4 2
1
3
1
4
4
4 1 4 2
1
1
2
2 4
4
1 2 1 3
3
4 3 1
1
2
4
2 1 2 4
2
1 3
3
3 4 2
4
2 3 2 4
3
2 3 1
3
1 2 4

result:

ok all puzzle solved (15 test cases)

Test #4:

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

input:

31
5
00000
5
10000
5
01000
5
11000
5
00100
5
10100
5
01100
5
11100
5
00010
5
10010
5
01010
5
11010
5
00110
5
10110
5
01110
5
11110
5
00001
5
10001
5
01001
5
11001
5
00101
5
10101
5
01101
5
11101
5
00011
5
10011
5
01011
5
11011
5
00111
5
10111
5
01111

output:

7
1 3 2 3 4 3 5
2
2 5
2
1 3
1
4
2
2 4
3
2 3 1
1
5
6
4 3 2 1 2 5
2
3 5
3
5 4 1
3
3 4 2
4
5 1 5 2
1
1
4
2 3 2 4
6
1 2 3 4 3 5
5
5 1 2 1 3
2
1 4
1
3
3
1 2 5
6
3 2 3 4 3 5
3
4 5 3
4
2 1 2 5
4
1 2 1 3
5
4 5 1 5 2
1
2
6
2 1 2 3 2 4
4
3 4 3 5
5
3 2 1 2 5
6
1 5 1 2 1 3
5
2 3 4 3 5
5
1 2 3 2 4

result:

ok all puzzle solved (31 test cases)

Test #5:

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

input:

63
6
000000
6
100000
6
010000
6
110000
6
001000
6
101000
6
011000
6
111000
6
000100
6
100100
6
010100
6
110100
6
001100
6
101100
6
011100
6
111100
6
000010
6
100010
6
010010
6
110010
6
001010
6
101010
6
011010
6
111010
6
000110
6
100110
6
010110
6
110110
6
001110
6
101110
6
011110
6
111110
6
000001
...

output:

2
3 6
0
0
0
0
0
0
1
5
0
2
3 5
0
0
0
0
1
6
0
0
0
2
4 6
0
0
3
4 5 3
0
0
0
0
0
4
3 4 3 5
5
6 2 3 2 4
0
0
0
0
0
0
1
4
6
4 3 4 5 4 6
0
0
0
0
0
3
5 6 4
0
0
4
2 3 2 4
0
0
0
1
3
0
0
0
0
4
4 5 4 6
0
5
3 4 5 4 6
0
0
0
0
0
0

result:

ok all puzzle solved (63 test cases)

Test #6:

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

input:

127
7
0000000
7
1000000
7
0100000
7
1100000
7
0010000
7
1010000
7
0110000
7
1110000
7
0001000
7
1001000
7
0101000
7
1101000
7
0011000
7
1011000
7
0111000
7
1111000
7
0000100
7
1000100
7
0100100
7
1100100
7
0010100
7
1010100
7
0110100
7
1110100
7
0001100
7
1001100
7
0101100
7
1101100
7
0011100
7
1011...

output:

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

result:

ok all puzzle solved (127 test cases)

Test #7:

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

input:

255
8
00000000
8
10000000
8
01000000
8
11000000
8
00100000
8
10100000
8
01100000
8
11100000
8
00010000
8
10010000
8
01010000
8
11010000
8
00110000
8
10110000
8
01110000
8
11110000
8
00001000
8
10001000
8
01001000
8
11001000
8
00101000
8
10101000
8
01101000
8
11101000
8
00011000
8
10011000
8
01011000...

output:

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

result:

ok all puzzle solved (255 test cases)

Test #8:

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

input:

511
9
000000000
9
100000000
9
010000000
9
110000000
9
001000000
9
101000000
9
011000000
9
111000000
9
000100000
9
100100000
9
010100000
9
110100000
9
001100000
9
101100000
9
011100000
9
111100000
9
000010000
9
100010000
9
010010000
9
110010000
9
001010000
9
101010000
9
011010000
9
111010000
9
000110...

output:

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

result:

ok all puzzle solved (511 test cases)

Test #9:

score: -100
Wrong Answer
time: 1ms
memory: 3684kb

input:

1023
10
0000000000
10
1000000000
10
0100000000
10
1100000000
10
0010000000
10
1010000000
10
0110000000
10
1110000000
10
0001000000
10
1001000000
10
0101000000
10
1101000000
10
0011000000
10
1011000000
10
0111000000
10
1111000000
10
0000100000
10
1000100000
10
0100100000
10
1100100000
10
0010100000
1...

output:

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

result:

wrong answer puzzle unsolved (test case 317)