QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#103053 | #6380. LaLa and Divination Magic | cmll02 | TL | 248ms | 48568kb | C++23 | 10.9kb | 2023-05-04 08:19:49 | 2023-05-04 08:19:50 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 17ms
memory: 3148kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #2:
score: 0
Accepted
time: 12ms
memory: 3028kb
input:
3 3 101 011 111
output:
2 2 2 4 0 1 4
result:
ok Kout = 2, Kans = 6
Test #3:
score: 0
Accepted
time: 16ms
memory: 3220kb
input:
2 1 0 1
output:
0
result:
ok Kout = 0, Kans = 0
Test #4:
score: 0
Accepted
time: 17ms
memory: 3028kb
input:
2 1 0 1
output:
0
result:
ok Kout = 0, Kans = 0
Test #5:
score: 0
Accepted
time: 17ms
memory: 3092kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #6:
score: 0
Accepted
time: 17ms
memory: 3220kb
input:
2 1 0 1
output:
0
result:
ok Kout = 0, Kans = 0
Test #7:
score: 0
Accepted
time: 16ms
memory: 3148kb
input:
2 1 0 1
output:
0
result:
ok Kout = 0, Kans = 0
Test #8:
score: 0
Accepted
time: 16ms
memory: 2948kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #9:
score: 0
Accepted
time: 17ms
memory: 3224kb
input:
1 1 1
output:
1 0 0 4
result:
ok Kout = 1, Kans = 1
Test #10:
score: 0
Accepted
time: 17ms
memory: 2996kb
input:
1 1 0
output:
1 0 0 1
result:
ok Kout = 1, Kans = 1
Test #11:
score: 0
Accepted
time: 13ms
memory: 2948kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #12:
score: 0
Accepted
time: 16ms
memory: 3056kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #13:
score: 0
Accepted
time: 17ms
memory: 3028kb
input:
2 4 0111 0010
output:
4 0 0 1 2 2 4 1 3 2 1 3 3
result:
ok Kout = 4, Kans = 15
Test #14:
score: 0
Accepted
time: 16ms
memory: 2948kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #15:
score: 0
Accepted
time: 12ms
memory: 3108kb
input:
4 2 10 11 01 00
output:
0
result:
ok Kout = 0, Kans = 0
Test #16:
score: 0
Accepted
time: 12ms
memory: 3000kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #17:
score: 0
Accepted
time: 13ms
memory: 3084kb
input:
2 4 0010 1000
output:
4 1 1 1 3 3 1 0 2 4 0 2 1
result:
ok Kout = 4, Kans = 15
Test #18:
score: 0
Accepted
time: 14ms
memory: 3068kb
input:
2 5 11101 00000
output:
13 3 3 1 0 1 2 0 1 3 0 2 2 0 2 3 0 4 2 0 4 3 1 2 2 1 2 3 1 4 2 1 4 3 2 4 2 2 4 3
result:
ok Kout = 13, Kans = 21
Test #19:
score: 0
Accepted
time: 13ms
memory: 2860kb
input:
5 4 0010 1001 0011 0101 1011
output:
-1
result:
ok Kout = -1, Kans = -1
Test #20:
score: 0
Accepted
time: 12ms
memory: 3048kb
input:
3 2 01 00 10
output:
1 0 1 1
result:
ok Kout = 1, Kans = 1
Test #21:
score: 0
Accepted
time: 16ms
memory: 3020kb
input:
3 2 10 11 00
output:
1 0 1 2
result:
ok Kout = 1, Kans = 1
Test #22:
score: 0
Accepted
time: 17ms
memory: 3012kb
input:
2 1 0 1
output:
0
result:
ok Kout = 0, Kans = 0
Test #23:
score: 0
Accepted
time: 16ms
memory: 3012kb
input:
3 27 111010110011101010011110110 010001110100000110100101101 000011111000000010011111001
output:
-1
result:
ok Kout = -1, Kans = -1
Test #24:
score: 0
Accepted
time: 13ms
memory: 3276kb
input:
3 7 1000100 0001100 0101111
output:
16 2 2 1 4 4 4 0 1 1 0 3 4 0 3 1 0 5 1 0 6 1 1 3 3 1 5 2 1 5 3 1 6 2 1 6 3 3 5 2 3 6 2 5 6 2 5 6 3
result:
ok Kout = 16, Kans = 39
Test #25:
score: 0
Accepted
time: 16ms
memory: 3140kb
input:
1 19 1010110011001101000
output:
19 0 0 4 1 1 1 2 2 4 3 3 1 4 4 4 5 5 4 6 6 1 7 7 1 8 8 4 9 9 4 10 10 1 11 11 1 12 12 4 13 13 4 14 14 1 15 15 4 16 16 1 17 17 1 18 18 1
result:
ok Kout = 19, Kans = 532
Test #26:
score: 0
Accepted
time: 10ms
memory: 3068kb
input:
5 32 10101101001001001101111100100110 00110110010111010101011000011010 01010101110100000110001000010100 11010011000110101101110001011111 00111001110011110000000010000111
output:
-1
result:
ok Kout = -1, Kans = -1
Test #27:
score: 0
Accepted
time: 17ms
memory: 3224kb
input:
3 12 110010101000 110001011000 110101011001
output:
28 0 0 4 1 1 4 2 2 1 8 8 4 9 9 1 10 10 1 3 4 1 3 5 3 3 6 1 3 7 3 3 11 2 3 11 3 4 5 4 4 5 1 4 6 2 4 6 3 4 7 4 4 7 1 4 11 1 5 6 4 5 6 1 5 7 2 5 7 3 5 11 2 6 7 4 6 7 1 6 11 1 7 11 2
result:
ok Kout = 28, Kans = 145
Test #28:
score: 0
Accepted
time: 15ms
memory: 2928kb
input:
3 25 1110100100011100101100111 0100000001011101101010101 0111110111111001001110111
output:
-1
result:
ok Kout = -1, Kans = -1
Test #29:
score: 0
Accepted
time: 17ms
memory: 3032kb
input:
1 5 10110
output:
5 0 0 4 1 1 1 2 2 4 3 3 4 4 4 1
result:
ok Kout = 5, Kans = 35
Test #30:
score: 0
Accepted
time: 13ms
memory: 3020kb
input:
5 17 01011100010100110 01001101111011001 00100111001101010 10101000001010110 00101011010010001
output:
-1
result:
ok Kout = -1, Kans = -1
Test #31:
score: 0
Accepted
time: 17ms
memory: 3076kb
input:
3 30 010100010011100011010001010100 011111100101001100010101010010 011000010111111111000101101110
output:
-1
result:
ok Kout = -1, Kans = -1
Test #32:
score: 0
Accepted
time: 17ms
memory: 3092kb
input:
5 30 110010101001001100010110010000 011011111000011001101000100000 110101010111000000100100111000 001111011110101101101001101011 101100001101011110101010110000
output:
-1
result:
ok Kout = -1, Kans = -1
Test #33:
score: 0
Accepted
time: 13ms
memory: 2904kb
input:
10 10 0110101111 1100100000 1000101100 1000010101 1001011101 1011101101 1011111011 0101010000 0111011010 1111010110
output:
-1
result:
ok Kout = -1, Kans = -1
Test #34:
score: 0
Accepted
time: 16ms
memory: 2936kb
input:
9 10 1000001101 0110010110 1011101111 1010001110 1110001000 1001110110 1101010010 0001011111 1000010100
output:
-1
result:
ok Kout = -1, Kans = -1
Test #35:
score: 0
Accepted
time: 16ms
memory: 2992kb
input:
3 5 11111 01000 01100
output:
10 1 1 4 0 2 3 0 3 2 0 3 3 0 4 2 0 4 3 2 3 2 2 4 2 3 4 2 3 4 3
result:
ok Kout = 10, Kans = 18
Test #36:
score: 0
Accepted
time: 17ms
memory: 2920kb
input:
7 9 000010100 101001100 110010111 000000110 100010101 101000100 101101100
output:
-1
result:
ok Kout = -1, Kans = -1
Test #37:
score: 0
Accepted
time: 16ms
memory: 3240kb
input:
1 4 0000
output:
4 0 0 1 1 1 1 2 2 1 3 3 1
result:
ok Kout = 4, Kans = 22
Test #38:
score: 0
Accepted
time: 16ms
memory: 2892kb
input:
9 8 10011110 10111101 11001010 01000101 10110011 00101001 00101100 11010110 01000000
output:
-1
result:
ok Kout = -1, Kans = -1
Test #39:
score: 0
Accepted
time: 17ms
memory: 2832kb
input:
3 10 0000000111 1011011111 0101111010
output:
-1
result:
ok Kout = -1, Kans = -1
Test #40:
score: 0
Accepted
time: 17ms
memory: 3000kb
input:
2 1 1 0
output:
0
result:
ok Kout = 0, Kans = 0
Test #41:
score: 0
Accepted
time: 16ms
memory: 3240kb
input:
1 5 00110
output:
5 0 0 1 1 1 1 2 2 4 3 3 4 4 4 1
result:
ok Kout = 5, Kans = 35
Test #42:
score: 0
Accepted
time: 17ms
memory: 2964kb
input:
6 9 100101111 100001110 100101010 001101000 101100010 010101110
output:
-1
result:
ok Kout = -1, Kans = -1
Test #43:
score: 0
Accepted
time: 73ms
memory: 16396kb
input:
6 836 001111110001001001101010101010011100010100100100111110110100101000100100000000011101110001011100111111111001101111111101101110010011000100100111111101011010101101011101010000100011100011000011111011011110000001010101001101110100001111111001000110111000010110001100110010010000101011001010101100...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #44:
score: 0
Accepted
time: 44ms
memory: 9052kb
input:
1 1680 00110010011001010101000101001110100010100110000110011101101101011011011011011011000000100100001111110111011001000010100101111110011000011110001000000001001010010110001011101000000110011010000001101010010000101111000010110001001010000010001010110000110111011011001011010011100111110000100110110...
output:
1680 0 0 1 1 1 1 2 2 4 3 3 4 4 4 1 5 5 1 6 6 4 7 7 1 8 8 1 9 9 4 10 10 4 11 11 1 12 12 1 13 13 4 14 14 1 15 15 4 16 16 1 17 17 4 18 18 1 19 19 4 20 20 1 21 21 1 22 22 1 23 23 4 24 24 1 25 25 4 26 26 1 27 27 1 28 28 4 29 29 4 30 30 4 31 31 1 32 32 4 33 33 1 34 34 1 35 35 1 36 36 4 37 37 1 38 38 4 39 ...
result:
ok Kout = 1680, Kans = 4232760
Test #45:
score: 0
Accepted
time: 37ms
memory: 9668kb
input:
5 525 010011011010110111000101111001010011110110100011110111000110010010000011011011110001110100110101101111111001100010010011011011011101110010011011001111110100010011011001010111011001100011001000101100111000000100010100011011011110101010000011101110001001000000100101000000101011101010110101010110...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #46:
score: 0
Accepted
time: 159ms
memory: 30492kb
input:
9 1369 10111110110000010001000001110000001000010000101111010111111000100001001011101000101011000111001000010110010100011001110101100010000010000010100010011100110011000011110001001001010100010100001111111000111110100100010000100100110111110101100011010100000011000011010111111101011001011001010010110...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #47:
score: 0
Accepted
time: 182ms
memory: 38600kb
input:
7 1509 10100001100101000101100011100001010001111101001010100101000010000100010000100110001011000011111000111100011100000110100100011010011111011100111010101011110111011011100100101110011000110111100101101011010101100011101011110001011101001011010100000011001001110100111101101001100110101111011010011...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #48:
score: 0
Accepted
time: 11ms
memory: 4200kb
input:
1 354 101000111100100010011000000111001111100100100101111010100100101010111001011110011010111111010010101111101101101010100011010000011011010101000011010000001101110011011000101101111011111001011010111100100001100000110000110011101011010011110011001100101100011101100010101001100101110011001011001011...
output:
354 0 0 4 1 1 1 2 2 4 3 3 1 4 4 1 5 5 1 6 6 4 7 7 4 8 8 4 9 9 4 10 10 1 11 11 1 12 12 4 13 13 1 14 14 1 15 15 1 16 16 4 17 17 1 18 18 1 19 19 4 20 20 4 21 21 1 22 22 1 23 23 1 24 24 1 25 25 1 26 26 1 27 27 4 28 28 4 29 29 4 30 30 1 31 31 1 32 32 4 33 33 4 34 34 4 35 35 4 36 36 4 37 37 1 38 38 1 39 3...
result:
ok Kout = 354, Kans = 187797
Test #49:
score: 0
Accepted
time: 100ms
memory: 21400kb
input:
5 1006 00111100011111100001101011101101000101000011011000111111110010111011001101010000100011001000000111001011010000001110010000101000010111100101100101101000110000011011101010111110101110100110000011001000010000011111000001011111101010110011100110010011010000000000100000111101000001000100101110100...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #50:
score: 0
Accepted
time: 248ms
memory: 48568kb
input:
9 1851 11000110100010011010000110010000010111101010100110011010100101110011100000101101001010000010001011111110100001101000001101111011011011011110010110000111001101110011001011111001110001011101100110111111100101100101000110010001011001100101010111100000101111010110010000110111010100011010111101110...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #51:
score: 0
Accepted
time: 54ms
memory: 12960kb
input:
7 695 001100011101000101000011101100000101000000010110110101110110100101010100100111101110100100110101110100111000011000000101111101010100010010101011100101111001100001101111000111000111010110101101001111110111110001010011011111110111111010101010100100111010101010100111110011001100101100110010111101...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #52:
score: 0
Accepted
time: 19ms
memory: 5124kb
input:
8 231 010111111111010000001100101001011111011010100101010100111010100110111011111111101110001100001001101110001001000000001110010010010110011001011110100110110110101100101110101100101011000001101111101001110000101110110010000100111101010 00010011100001101010000101100000110001010100100010110011011111...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #53:
score: 0
Accepted
time: 181ms
memory: 23716kb
input:
1751 1586 01101110101110010111101111101010000000001010101101111100000001001100010101101011011111100010010111010010010010111101000011101101010110011100010001111110110011001111111111010000101011010111101110010101010011100110001111101111010000001111101111101011110100011101101100000011100110100110000000...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #54:
score: 0
Accepted
time: 82ms
memory: 21496kb
input:
1879 942 000110000110010111010100001100110100110111110010011011100000001111011000110000000001110001001111110000010000110101111011101001001110000101111111101100101100110111111011001011001101101000011000000011110000011111111000010111000000001011101101110100011111101000110101000010011110101011110001111...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #55:
score: 0
Accepted
time: 81ms
memory: 12404kb
input:
599 1083 111111011111001001100010010111010010011010111001100010011000101111110011111111000001001000000011110101011100100100000000001010100100011010010111010111011101010101010011001101100101011001110010111100000110111001000000100001111110000011001000100111100000110100100110010001011100101101111000110...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #56:
score: 0
Accepted
time: 225ms
memory: 17232kb
input:
727 1927 001101011110100000000001100011110010101101011100011010001000111100001001110000111101111101101111111101011111110111010100110000100011110110001110011000101001001001001100101110111111111000011110111110010111110111111101000010011011000010111011010110100110101010100111010011110101000111101000001...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #57:
score: 0
Accepted
time: 49ms
memory: 7276kb
input:
151 772 0011100000111101101010100111100010111101101001001010101000110100000010101010011001011010111110011100101101011110010000101110111011001110111110110011011001111101010011010110111011010011011001111101001100111001110110111001011010110100000000010101110000101011101001001110111011000000100100010000...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #58:
score: 0
Accepted
time: 68ms
memory: 9044kb
input:
279 912 1101101011000001010100111010110010110011000101001111100000100001110011010010001101010100000111011101111010100010100011001010010100110111000000001010010110111000110100010011101010011111010001011011100011011101101100110001111011101010000011000111001010001010110110000111001001100100100111100001...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #59:
score: 0
Accepted
time: 28ms
memory: 14704kb
input:
1704 460 011100111111111110111100000010110110000111101010010100101100011011110101100111010000101111110001100100110111010100110011000011001100111101110110001010010010111110110000000000100111110110011000011110010101100101011011001001111010110010110011110011011100110111010111110111100010110010000101110...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #60:
score: 0
Accepted
time: 30ms
memory: 10952kb
input:
1128 409 110010110101001111011001011001011000001111001001010001010110111111101101000111111110110110000111100001000010110010110010111001101111010010100000100000011100110010001010010010010000101100011010010111011110111010010010010110101100001001111111100111100000111010010001101010010011100010001110001...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #61:
score: 0
Accepted
time: 114ms
memory: 18312kb
input:
1256 1253 00001111110000100001010011101010110110011010100000000010110000001011100101111001010101010001001100100011010101101100110100101011100100101101000111001010001010011101100000101101110100111100111101100100110100110010010000011001111100111111011111101101001111101000111111100010101111101111001001...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #62:
score: 0
Accepted
time: 89ms
memory: 19396kb
input:
1537 1004 11100001111000100101010000101010000001010011001001110010100111110000000100110110010100111001010100001110001101111111111010001101001100110100110011100010001001110111111110110110111111000110011100000101100010110111110000000110011010001100100111111111011100110000101110010111111011110101000111...
output:
-1
result:
ok Kout = -1, Kans = -1
Test #63:
score: -100
Time Limit Exceeded
input:
2000 2000 00111010010010101011100101011110001000011110110110001001100001011010001110101110010111011100100111000011111100100110100110110000111111110010111100011110000000000010100010000001000100111000001110111111011101111010100110001111100111001100001001101011011101001011101000111011001011000101111101...
output:
1997002 709 709 4 0 1 2 0 2 4 0 3 4 0 4 1 0 5 2 0 6 4 0 7 2 0 8 3 0 9 4 0 10 2 0 11 2 0 12 4 0 13 2 0 14 4 0 15 3 0 16 4 0 17 2 0 18 4 0 19 4 0 20 4 0 21 2 0 22 2 0 23 1 0 24 2 0 25 4 0 26 2 0 27 4 0 28 4 0 29 1 0 30 4 0 31 3 0 32 2 0 33 2 0 34 4 0 35 3 0 36 2 0 37 2 0 38 3 0 39 4 0 40 1 0 41 4 0 42...