QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#596041#8825. Puzzle: Summon3un_larryfunc AC ✓85ms7608kbC++143.4kb2024-09-28 15:00:332024-09-28 15:00:34

詳細信息

Test #1:

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

input:

5
2
?1??
??1?
4
1???????
???2???2
5
??????????
??????????
6
1212????????
????????1212
7
?2?1?????1?2??
?????1???????2

output:

impossible
242
12101210
00020002
2121212121
2121212121
0000000000
12121212
121212120000
000000001212
21
12010202010201
00020101020102

result:

ok all is correct (5 test cases)

Test #2:

score: 0
Accepted
time: 10ms
memory: 7520kb

input:

1
100000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (1 test case)

Test #3:

score: 0
Accepted
time: 7ms
memory: 7516kb

input:

1
100000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (1 test case)

Test #4:

score: 0
Accepted
time: 7ms
memory: 7500kb

input:

1
100000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (1 test case)

Test #5:

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

input:

1
100000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (1 test case)

Test #6:

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

input:

2
49999
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (2 test cases)

Test #7:

score: 0
Accepted
time: 10ms
memory: 5612kb

input:

2
49999
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (2 test cases)

Test #8:

score: 0
Accepted
time: 5ms
memory: 5584kb

input:

2
49999
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (2 test cases)

Test #9:

score: 0
Accepted
time: 6ms
memory: 5768kb

input:

2
49999
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (2 test cases)

Test #10:

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

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212123333333333333333333333333333333333333333333333333...

result:

ok all is correct (200 test cases)

Test #11:

score: 0
Accepted
time: 63ms
memory: 4148kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #12:

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

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #13:

score: 0
Accepted
time: 23ms
memory: 3812kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #14:

score: 0
Accepted
time: 9ms
memory: 3748kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (200 test cases)

Test #15:

score: 0
Accepted
time: 8ms
memory: 3780kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (100 test cases)

Test #16:

score: 0
Accepted
time: 64ms
memory: 3728kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (200 test cases)

Test #17:

score: 0
Accepted
time: 68ms
memory: 3836kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (100 test cases)

Test #18:

score: 0
Accepted
time: 21ms
memory: 3748kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #19:

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

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
2121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (100 test cases)

Test #20:

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

input:

200
5000
???2???????????????????????????????????????1???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (200 test cases)

Test #21:

score: 0
Accepted
time: 11ms
memory: 3788kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
21212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #22:

score: 0
Accepted
time: 59ms
memory: 3760kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #23:

score: 0
Accepted
time: 66ms
memory: 3760kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #24:

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

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
21212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #25:

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

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (100 test cases)

Test #26:

score: 0
Accepted
time: 7ms
memory: 3792kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
2121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #27:

score: 0
Accepted
time: 9ms
memory: 3824kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
121212121212121212121212121212121212121212121214242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424...

result:

ok all is correct (100 test cases)

Test #28:

score: 0
Accepted
time: 59ms
memory: 3804kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #29:

score: 0
Accepted
time: 55ms
memory: 3860kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #30:

score: 0
Accepted
time: 23ms
memory: 3824kb

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121213333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333...

result:

ok all is correct (200 test cases)

Test #31:

score: 0
Accepted
time: 26ms
memory: 3868kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (100 test cases)

Test #32:

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

input:

200
5000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (200 test cases)

Test #33:

score: 0
Accepted
time: 12ms
memory: 4028kb

input:

100
10000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (100 test cases)

Test #34:

score: 0
Accepted
time: 51ms
memory: 5072kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (20 test cases)

Test #35:

score: 0
Accepted
time: 70ms
memory: 6736kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (10 test cases)

Test #36:

score: 0
Accepted
time: 24ms
memory: 4816kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #37:

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

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #38:

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

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
2121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (20 test cases)

Test #39:

score: 0
Accepted
time: 6ms
memory: 3824kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible

result:

ok all is correct (10 test cases)

Test #40:

score: 0
Accepted
time: 72ms
memory: 5508kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #41:

score: 0
Accepted
time: 59ms
memory: 6976kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #42:

score: 0
Accepted
time: 30ms
memory: 5364kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (20 test cases)

Test #43:

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

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
2121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (10 test cases)

Test #44:

score: 0
Accepted
time: 17ms
memory: 4452kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (20 test cases)

Test #45:

score: 0
Accepted
time: 10ms
memory: 5936kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (10 test cases)

Test #46:

score: 0
Accepted
time: 57ms
memory: 5212kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #47:

score: 0
Accepted
time: 61ms
memory: 7220kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #48:

score: 0
Accepted
time: 28ms
memory: 5164kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #49:

score: 0
Accepted
time: 26ms
memory: 6932kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (10 test cases)

Test #50:

score: 0
Accepted
time: 18ms
memory: 5248kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
21212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #51:

score: 0
Accepted
time: 9ms
memory: 3760kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible

result:

ok all is correct (10 test cases)

Test #52:

score: 0
Accepted
time: 71ms
memory: 5188kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212...

result:

ok all is correct (20 test cases)

Test #53:

score: 0
Accepted
time: 54ms
memory: 6860kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #54:

score: 0
Accepted
time: 21ms
memory: 4692kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #55:

score: 0
Accepted
time: 26ms
memory: 6480kb

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
21212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #56:

score: 0
Accepted
time: 17ms
memory: 4644kb

input:

20
50000
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
12121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (20 test cases)

Test #57:

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

input:

10
100000
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...

output:

impossible
impossible
21212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121...

result:

ok all is correct (10 test cases)

Test #58:

score: 0
Accepted
time: 47ms
memory: 3652kb

input:

100000
1
??
2?
1
??
12
1
1?
2?
1
1?
??
1
1?
1?
1
1?
2?
1
?2
?1
1
?1
??
1
1?
??
1
??
?1
1
??
12
1
??
21
1
??
2?
1
1?
??
1
1?
??
1
?1
?2
1
2?
2?
1
??
?1
1
21
??
1
??
?1
1
2?
1?
1
?2
??
1
2?
2?
1
2?
2?
1
??
?1
1
1?
??
1
?2
?2
1
2?
?1
1
2?
1?
1
2?
1?
1
2?
1?
1
??
2?
1
??
12
1
1?
?2
1
??
?1
1
2?
?1
1
??
...

output:

1
01
20
0
00
12
1
10
20
12
12
00
impossible
1
10
20
2
02
01
21
21
00
12
12
00
2
20
01
0
00
12
0
00
21
1
01
20
12
12
00
12
12
00
1
01
02
impossible
2
20
01
21
21
00
2
20
01
2
20
10
12
12
00
impossible
impossible
2
20
01
12
12
00
impossible
2
20
01
2
20
10
2
20
10
2
20
10
1
01
20
0
00
12
1
10
02
2
20
...

result:

ok all is correct (100000 test cases)

Test #59:

score: 0
Accepted
time: 81ms
memory: 3888kb

input:

20000
50
?????????????????????????2??????????????????????????????????????????????????????????????????????????
?????2??????????????????????????????????????????????????????????????????????????????????????????????
50
?????????????????????????????2??????2?????????????????????????????????????????????????...

output:

1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212133333
1212101212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212
0000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
imp...

result:

ok all is correct (20000 test cases)

Test #60:

score: 0
Accepted
time: 27ms
memory: 3812kb

input:

100000
1
2?
2?
1
?2
?2
1
21
??
1
21
21
1
2?
2?
1
21
21
1
?1
?1
1
?2
?2
1
?2
?2
1
2?
2?
1
?1
?1
1
12
12
1
1?
??
1
?1
?1
1
?1
?1
1
12
?2
1
?2
?2
1
1?
2?
1
1?
2?
1
12
12
1
?2
?2
1
2?
1?
1
12
?2
1
1?
2?
1
?2
?2
1
21
2?
1
?1
?1
1
2?
1?
1
2?
21
1
?2
?2
1
?2
?1
1
12
1?
1
?1
?1
1
12
12
1
12
12
1
1?
1?
1
?2
...

output:

impossible
impossible
21
21
00
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
12
12
00
impossible
impossible
impossible
impossible
1
10
20
1
10
20
impossible
impossible
2
20
10
impossible
1
10
20
impossible
impossible
impossible
2
20
10
impossible
...

result:

ok all is correct (100000 test cases)

Test #61:

score: 0
Accepted
time: 33ms
memory: 3664kb

input:

20000
50
???????????????????????1??????????????????????????????1?????????????????????????????????????????????
???????????????????????????????1??????????????2???????????????????????1???????????????1?????????????
50
?????????1?????????????????????????1???1??????????????????????????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
21212121212121212196
2020202020202020202020102020202020202020201020202020202020201020202020202020102121212121212121212101
1010101010101010101010201010101010101010102010101010101010102010101010101010200000000000000000000020
impossible
21212121308...

result:

ok all is correct (20000 test cases)

Test #62:

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

input:

100000
1
21
21
1
12
12
1
2?
1?
1
1?
2?
1
21
21
1
12
12
1
12
1?
1
1?
2?
1
21
21
1
2?
21
1
?2
?2
1
?2
?2
1
12
12
1
12
12
1
21
21
1
2?
1?
1
21
21
1
2?
2?
1
2?
2?
1
2?
1?
1
1?
1?
1
?1
?2
1
21
21
1
?2
?2
1
?1
?1
1
12
12
1
21
21
1
2?
2?
1
21
21
1
21
21
1
2?
1?
1
1?
1?
1
1?
2?
1
21
?1
1
?2
?2
1
21
21
1
?1
...

output:

impossible
impossible
2
20
10
1
10
20
impossible
impossible
impossible
1
10
20
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
2
20
10
impossible
1
01
02
impossible
impossible
impossible
impossible
impossible
impossible
impossible...

result:

ok all is correct (100000 test cases)

Test #63:

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

input:

20000
50
???????1???????????????????2?2???????????????2?????????????1????????????????????????2???????????????
???????????????????????????2?????????????????????????1?????????????1??????2???????????????1?????????
50
?????????????????????????????????1?????????????????2???1????1?????????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
21212121212201
212121212121210101020...

result:

ok all is correct (20000 test cases)

Test #64:

score: 0
Accepted
time: 45ms
memory: 3676kb

input:

100000
1
?2
1?
1
2?
?1
1
?1
?1
1
2?
??
1
?2
?1
1
??
21
1
?1
2?
1
??
2?
1
2?
?1
1
?2
??
1
21
??
1
??
2?
1
??
21
1
??
21
1
1?
?2
1
21
??
1
2?
1?
1
21
??
1
?2
?1
1
2?
??
1
??
21
1
?1
?2
1
??
2?
1
2?
??
1
21
??
1
1?
??
1
?2
??
1
??
?2
1
?1
2?
1
?2
1?
1
?2
?2
1
?1
?1
1
??
21
1
2?
??
1
1?
2?
1
1?
1?
1
1?
...

output:

2
02
10
2
20
01
impossible
21
21
00
2
02
01
0
00
21
1
01
20
1
01
20
2
20
01
12
12
00
21
21
00
1
01
20
0
00
21
0
00
21
1
10
02
21
21
00
2
20
10
21
21
00
2
02
01
21
21
00
0
00
21
1
01
02
1
01
20
21
21
00
21
21
00
12
12
00
12
12
00
1
01
02
1
01
20
2
02
10
impossible
impossible
0
00
21
21
21
00
1
10
20
...

result:

ok all is correct (100000 test cases)

Test #65:

score: 0
Accepted
time: 80ms
memory: 3596kb

input:

20000
50
????????????????????????????????????????????????????????????????????????????????????????????????????
???????????1???????????????????????????????????????????????????????????????????????????2????????????
50
?????????????????2????????????????????????????????????????????????????????????????????...

output:

21212121212121212121212121212121212121212121212121212121212121233333333346
2121212121202121212121212121212121212121212121212121212121212121212121212121212121212101020202020202
0000000000010000000000000000000000000000000000000000000000000000000000000000000000000002010101010101
21212121212121212121212...

result:

ok all is correct (20000 test cases)

Test #66:

score: 0
Accepted
time: 23ms
memory: 3676kb

input:

100000
1
2?
2?
1
21
2?
1
2?
1?
1
12
??
1
1?
2?
1
2?
1?
1
?1
?1
1
?2
12
1
?2
?2
1
21
21
1
21
21
1
21
2?
1
?2
?1
1
2?
2?
1
12
12
1
2?
2?
1
2?
21
1
21
?1
1
?2
?2
1
2?
1?
1
?1
?1
1
21
21
1
?2
?2
1
12
12
1
1?
12
1
21
?1
1
?2
?1
1
?2
12
1
?1
21
1
21
?1
1
?1
?2
1
2?
2?
1
2?
2?
1
21
?1
1
?1
?1
1
21
21
1
21
...

output:

impossible
impossible
2
20
10
12
12
00
1
10
20
2
20
10
impossible
impossible
impossible
impossible
impossible
impossible
2
02
01
impossible
impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
impossible
impossible
impossible
2
02
01
impossible
impossible
i...

result:

ok all is correct (100000 test cases)

Test #67:

score: 0
Accepted
time: 33ms
memory: 3824kb

input:

20000
50
?????????2????????????????????????????????????????????????????????2?????????1???????????????????????
??????????????????????????????1?2???????????????????????????????????????????????1???????????????????
50
?????????????????????????????????1????????????????????????????2???2???????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
233
2020202020202020202020102020202020202020202020202020202020201020202020202020202020202020202010210121
1010101010101010101010201010101010101010101010101010101010102010101010101010101010101010101020002000
impossible
212121...

result:

ok all is correct (20000 test cases)

Test #68:

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

input:

100000
1
?2
?2
1
2?
2?
1
12
12
1
21
21
1
21
21
1
?2
?1
1
?1
?2
1
1?
12
1
?1
?2
1
12
12
1
1?
2?
1
?1
?2
1
21
21
1
?1
?1
1
21
21
1
12
12
1
2?
1?
1
?2
?1
1
?1
?1
1
1?
12
1
?1
?2
1
12
12
1
?2
?2
1
1?
2?
1
?2
?2
1
21
21
1
21
21
1
12
12
1
21
21
1
21
21
1
?1
?2
1
21
21
1
21
21
1
21
21
1
1?
2?
1
21
21
1
21
...

output:

impossible
impossible
impossible
impossible
impossible
2
02
01
1
01
02
impossible
1
01
02
impossible
1
10
20
1
01
02
impossible
impossible
impossible
impossible
2
20
10
2
02
01
impossible
impossible
1
01
02
impossible
impossible
1
10
20
impossible
impossible
impossible
impossible
impossible
impossib...

result:

ok all is correct (100000 test cases)

Test #69:

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

input:

20000
50
????????????1??????????????????????????????????22?????????????1???????????????????????????????2?????
1???????1????????????????????2?2??????????????????????????1???????????????2???????????2?????????????
50
???????2?????????????????????2?????????????1????????????????????????????????????????1?...

output:

impossible
impossible
impossible
impossible
1226363636421
2020202010202010202020102020202020201020102020202020202020201020212121212101212121212121012121212121
1010101020101020101010201010101010102010201010101010101010102010000000000020000000000000200000000000
impossible
12121212121213333333333333545...

result:

ok all is correct (20000 test cases)

Test #70:

score: 0
Accepted
time: 45ms
memory: 3644kb

input:

100000
1
?1
?1
1
1?
1?
1
2?
1?
1
??
?2
1
?1
?2
1
?1
??
1
?2
??
1
1?
??
1
2?
2?
1
1?
??
1
2?
??
1
?2
?1
1
2?
?1
1
2?
2?
1
??
2?
1
2?
2?
1
?2
?2
1
2?
??
1
??
2?
1
?1
2?
1
2?
?1
1
??
?1
1
2?
?1
1
??
21
1
1?
1?
1
2?
2?
1
1?
??
1
2?
2?
1
??
1?
1
?2
??
1
2?
2?
1
1?
1?
1
?1
?1
1
?2
?2
1
??
?2
1
?2
?2
1
2?
...

output:

impossible
impossible
2
20
10
1
01
02
1
01
02
21
21
00
12
12
00
12
12
00
impossible
12
12
00
21
21
00
2
02
01
2
20
01
impossible
1
01
20
impossible
impossible
21
21
00
1
01
20
1
01
20
2
20
01
2
20
01
2
20
01
0
00
21
impossible
impossible
12
12
00
impossible
2
20
10
12
12
00
impossible
impossible
imp...

result:

ok all is correct (100000 test cases)

Test #71:

score: 0
Accepted
time: 82ms
memory: 3652kb

input:

20000
50
??????????????????????????????????????????????????????????????????????1?????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????2???
50
??????????????????????????????????????????????????????????????????????????????????????...

output:

212121212121212121212313
2020202020202020202020202020202020202020202020202020202020202020202020102121212121212121212121210121
1010101010101010101010101010101010101010101010101010101010101010101010200000000000000000000000002000
12121212121212121212121213345454545454545454545454
1212121212121212121212...

result:

ok all is correct (20000 test cases)

Test #72:

score: 0
Accepted
time: 27ms
memory: 3580kb

input:

100000
1
?1
?1
1
2?
21
1
1?
2?
1
?1
?2
1
?1
?2
1
21
21
1
21
?1
1
1?
1?
1
12
??
1
2?
21
1
21
2?
1
1?
1?
1
1?
2?
1
?2
12
1
?2
?2
1
1?
2?
1
2?
2?
1
12
12
1
?1
?2
1
1?
12
1
?2
?1
1
?1
?2
1
1?
2?
1
?2
?1
1
?1
?1
1
1?
1?
1
1?
?2
1
1?
1?
1
1?
2?
1
21
21
1
?2
?2
1
21
21
1
?2
?1
1
21
2?
1
2?
1?
1
?2
?2
1
1?
...

output:

impossible
impossible
1
10
20
1
01
02
1
01
02
impossible
impossible
impossible
12
12
00
impossible
impossible
impossible
1
10
20
impossible
impossible
1
10
20
impossible
impossible
1
01
02
impossible
2
02
01
1
01
02
1
10
20
2
02
01
impossible
impossible
1
10
02
impossible
1
10
20
impossible
impossib...

result:

ok all is correct (100000 test cases)

Test #73:

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

input:

20000
50
?????????2???2???????2??????????????????????????????????????????????2???????2???????????????????????
????????????????????????????????????????????????????????????????????????????????1???????????????????
50
?????????2?????????????????1??????????????????????????????????????????????????????????...

output:

impossible
impossible
214242424242424242500
2121212121212121212021212121212121212121202102020201020202020202020202020202020202020202020202020202
0000000000000000000100000000000000000000010001010102010101010101010101010101010101010101010101010101
impossible
2121212121295
21212121212120010202020202020...

result:

ok all is correct (20000 test cases)

Test #74:

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

input:

100000
1
12
?2
1
?1
?1
1
12
12
1
?2
?2
1
21
21
1
2?
1?
1
21
21
1
21
21
1
21
21
1
2?
1?
1
?2
?1
1
21
21
1
21
21
1
21
21
1
2?
1?
1
?1
?2
1
21
21
1
12
12
1
21
21
1
2?
2?
1
21
21
1
12
12
1
?1
?1
1
2?
1?
1
12
12
1
2?
2?
1
21
21
1
12
1?
1
12
12
1
?2
12
1
12
12
1
2?
2?
1
21
21
1
?2
?2
1
12
12
1
?1
?1
1
?2
...

output:

impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
2
20
10
2
02
01
impossible
impossible
impossible
2
20
10
1
01
02
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
impossible
impossible...

result:

ok all is correct (100000 test cases)

Test #75:

score: 0
Accepted
time: 24ms
memory: 3624kb

input:

20000
50
???1???1????????????????2?????????????????????2?????????????????2?????????????????????????????1?????
????????????????2?????????????????????????????????2????????????????1????2???????????????????????????
50
???????????????????????1????????????????2???????????????????????????????????????1?????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2121212121212142426363636363670
2020202020202020101020202020202020200212121212121202121212121212121212121212121212021212121212121212
10101010101010102020101010101010101010000000000000100000000000000000...

result:

ok all is correct (20000 test cases)

Test #76:

score: 0
Accepted
time: 45ms
memory: 3576kb

input:

100000
1
2?
2?
1
2?
??
1
??
?2
1
2?
?1
1
2?
1?
1
??
2?
1
21
??
1
?1
?2
1
2?
2?
1
2?
?1
1
1?
1?
1
1?
1?
1
??
12
1
1?
2?
1
2?
1?
1
?2
?2
1
1?
?2
1
1?
?2
1
?1
??
1
2?
2?
1
1?
?2
1
1?
?2
1
2?
??
1
2?
1?
1
12
??
1
?2
?2
1
?2
1?
1
??
1?
1
12
??
1
1?
1?
1
??
21
1
?1
?2
1
2?
1?
1
??
1?
1
??
?1
1
1?
?2
1
?1
...

output:

impossible
21
21
00
1
01
02
2
20
01
2
20
10
1
01
20
21
21
00
1
01
02
impossible
2
20
01
impossible
impossible
0
00
12
1
10
20
2
20
10
impossible
1
10
02
1
10
02
21
21
00
impossible
1
10
02
1
10
02
21
21
00
2
20
10
12
12
00
impossible
2
02
10
2
20
10
12
12
00
impossible
0
00
21
1
01
02
2
20
10
2
20
1...

result:

ok all is correct (100000 test cases)

Test #77:

score: 0
Accepted
time: 85ms
memory: 3692kb

input:

20000
50
????????????????????????????????????????????????????????????1???????????????????1???????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????
50
??????????????????????????????????????????????????????????????????????????????????????...

output:

1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212
1212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok all is correct (20000 test cases)

Test #78:

score: 0
Accepted
time: 27ms
memory: 3576kb

input:

100000
1
?1
?2
1
21
21
1
?2
?2
1
2?
2?
1
1?
2?
1
21
?1
1
?1
?1
1
21
2?
1
12
12
1
1?
2?
1
?2
?2
1
21
21
1
?2
?1
1
1?
1?
1
?2
1?
1
?2
12
1
12
1?
1
1?
1?
1
2?
1?
1
12
1?
1
12
12
1
2?
2?
1
21
?1
1
21
?1
1
1?
1?
1
?2
12
1
2?
1?
1
?1
?1
1
1?
2?
1
?1
21
1
?1
?2
1
?2
?1
1
2?
1?
1
12
12
1
2?
1?
1
12
1?
1
?2
...

output:

1
01
02
impossible
impossible
impossible
1
10
20
impossible
impossible
impossible
impossible
1
10
20
impossible
impossible
2
02
01
impossible
2
02
10
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
1
10
20
impos...

result:

ok all is correct (100000 test cases)

Test #79:

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

input:

20000
50
???1?????2???????????????????????????????????????????2????????????????????????????????????????2?????
?????????1????????????????????????????????????????????????????????????2?????????????????????????????
50
???????????????????1??????????????????????????????????????????????????????????????????...

output:

impossible
impossible
1212121212121224263659699092120
2121212121202121212121212101212021212120212121212101212121212121212101212121212121212121212121212121
0000000000010000000000000020000100000001000000000020000000000000000020000000000000000000000000000000
impossible
1214242424242424242424293
2020202...

result:

ok all is correct (20000 test cases)

Test #80:

score: 0
Accepted
time: 23ms
memory: 3636kb

input:

100000
1
2?
2?
1
21
21
1
2?
2?
1
2?
1?
1
21
21
1
1?
1?
1
21
21
1
?1
?1
1
21
21
1
?1
?2
1
2?
1?
1
2?
1?
1
?1
?1
1
21
21
1
2?
1?
1
1?
1?
1
2?
1?
1
21
21
1
21
?1
1
12
12
1
12
12
1
12
12
1
21
21
1
1?
1?
1
12
12
1
2?
1?
1
2?
2?
1
21
21
1
2?
2?
1
?1
?2
1
21
21
1
1?
12
1
2?
2?
1
?2
?2
1
21
21
1
12
12
1
21
...

output:

impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
impossible
impossible
1
01
02
2
20
10
2
20
10
impossible
impossible
2
20
10
impossible
2
20
10
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2
20
10
impossible
impossible
impossible
1
...

result:

ok all is correct (100000 test cases)

Test #81:

score: 0
Accepted
time: 24ms
memory: 3624kb

input:

20000
50
?1???????1????????????????????2?????????????????????????????????????2???????????????????????????????
?2?????????????1???1????????????????????????????????????????????????1???2?????????????1???????1?????
50
???????????????????????2??????????????????2???????2??????????????1????????????????????...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
2121212242424365758909112...

result:

ok all is correct (20000 test cases)

Extra Test:

score: 0
Extra Test Passed