QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#88021#5134. Jagged Skylinexiaowuc1AC ✓95ms3484kbC++172.2kb2023-03-14 23:04:192023-03-14 23:05:10

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1 1
sky

output:

? 1 1
! 1 0

result:

ok Used 1 queries

Test #2:

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

input:

1 1
building

output:

? 1 1
! 1 1

result:

ok Used 1 queries

Test #3:

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

input:

2 1
sky
sky

output:

? 2 1
? 1 1
! 1 0

result:

ok Used 2 queries

Test #4:

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

input:

2 1
building

output:

? 2 1
! 2 1

result:

ok Used 1 queries

Test #5:

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

input:

2 1000000000000000000
sky
sky

output:

? 2 1
? 1 1
! 1 0

result:

ok Used 2 queries

Test #6:

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

input:

2 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky

output:

? 2 1
? 2 500000000000000001
? 2 250000000000000001
? 2 125000000000000001
? 2 62500000000000001
? 2 31250000000000001
? 2 15625000000000001
? 2 7812500000000001
? 2 3906250000000001
? 2 1953125000000001
? 2 976562500000001
? 2 488281250000001
? 2 244140625000001
? 2 122070312500001
? 2 610351562500...

result:

ok Used 61 queries

Test #7:

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

input:

3 3
sky
building
sky
sky

output:

? 3 1
? 1 1
? 1 2
? 2 2
! 1 1

result:

ok Used 4 queries

Test #8:

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

input:

5 5
building
building
building
building

output:

? 3 1
? 3 3
? 3 4
? 3 5
! 3 5

result:

ok Used 4 queries

Test #9:

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

input:

8 4
building
sky
sky
building
sky
building
sky
sky
sky
sky
sky
sky

output:

? 2 1
? 2 3
? 2 2
? 7 2
? 7 3
? 6 3
? 6 4
? 3 4
? 5 4
? 1 4
? 8 4
? 4 4
! 6 3

result:

ok Used 12 queries

Test #10:

score: 0
Accepted
time: 4ms
memory: 3340kb

input:

10 100
building
sky
sky
building
sky
sky
building
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
sky
sky
sky
sky
sky

output:

? 2 1
? 2 51
? 2 26
? 2 13
? 2 19
? 2 16
? 2 14
? 2 15
? 7 15
? 9 15
? 9 58
? 9 36
? 9 25
? 9 30
? 9 27
? 9 26
? 3 27
? 3 64
? 3 82
? 3 73
? 3 68
? 3 70
? 3 71
? 3 72
? 5 72
? 10 72
? 8 72
? 8 86
? 8 79
? 8 75
? 8 73
? 4 73
? 6 73
? 1 73
! 8 72

result:

ok Used 34 queries

Test #11:

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

input:

100 1000
building
building
sky
sky
sky
building
building
building
sky
building
building
sky
sky
sky
building
building
building
sky
sky
building
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
b...

output:

? 64 1
? 64 501
? 64 751
? 64 626
? 64 563
? 64 532
? 64 547
? 64 555
? 64 559
? 64 557
? 64 558
? 99 559
? 24 559
? 85 559
? 41 559
? 41 780
? 41 890
? 41 945
? 41 917
? 41 903
? 41 910
? 41 913
? 41 911
? 56 911
? 45 911
? 89 911
? 38 911
? 62 911
? 81 911
? 11 911
? 29 911
? 88 911
? 87 911
? 35 ...

result:

ok Used 125 queries

Test #12:

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

input:

100 10
building
building
sky
building
sky
sky
building
building
sky
sky
sky
building

output:

? 64 1
? 64 6
? 64 8
? 64 7
? 99 8
? 24 8
? 85 8
? 85 9
? 85 10
? 41 10
? 56 10
? 45 10
! 45 10

result:

ok Used 12 queries

Test #13:

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

input:

1 98
building
building
building
sky
building
sky
sky

output:

? 1 1
? 1 50
? 1 74
? 1 86
? 1 80
? 1 83
? 1 81
! 1 80

result:

ok Used 7 queries

Test #14:

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

input:

899 2794
building
sky
sky
sky
sky
building
building
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
building
building
building
sky
building
sky
building
building
building
building
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
building
sky
build...

output:

? 270 1
? 270 1398
? 270 699
? 270 350
? 270 175
? 270 88
? 270 131
? 270 153
? 270 142
? 270 136
? 270 133
? 270 132
? 786 132
? 481 132
? 481 1463
? 481 797
? 481 1130
? 481 963
? 481 880
? 481 921
? 481 942
? 481 952
? 481 957
? 481 954
? 481 955
? 141 955
? 141 1875
? 141 2335
? 141 2565
? 141 2...

result:

ok Used 954 queries

Test #15:

score: 0
Accepted
time: 4ms
memory: 3336kb

input:

6370 86
building
sky
sky
sky
building
building
sky
building
sky
building
building
building
building
building
building
building
sky
building
building
building
building
sky
sky
sky
sky
sky
sky
sky
building
building
sky
building
building
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
...

output:

? 5795 1
? 5795 44
? 5795 22
? 5795 11
? 5795 6
? 5795 8
? 5795 9
? 3457 9
? 3457 48
? 3457 28
? 3457 38
? 3457 43
? 3457 45
? 3457 46
? 3457 47
? 3186 48
? 3186 67
? 3186 57
? 3186 62
? 3186 64
? 3186 65
? 3186 66
? 1348 66
? 1745 66
? 1046 66
? 1534 66
? 1044 66
? 730 66
? 2086 66
? 2086 76
? 2086...

result:

ok Used 79 queries

Test #16:

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

input:

3647 2089
sky
building
building
sky
sky
building
sky
building
building
sky
building
building
sky
building
sky
sky
sky
sky
sky
building
building
building
sky
building
sky
building
building
building
sky
building
sky
building
sky
sky
building
building
sky
sky
sky
sky
building
building
building
building...

output:

? 1257 1
? 3458 1
? 3458 1045
? 3458 1567
? 3458 1306
? 3458 1175
? 3458 1240
? 3458 1207
? 3458 1223
? 3458 1231
? 3458 1227
? 3458 1229
? 3458 1230
? 2927 1230
? 2927 1660
? 2927 1445
? 2927 1337
? 2927 1283
? 2927 1256
? 2927 1243
? 2927 1249
? 2927 1252
? 2927 1254
? 2927 1253
? 141 1254
? 1746 ...

result:

ok Used 2255 queries

Test #17:

score: 0
Accepted
time: 4ms
memory: 3344kb

input:

3813 63935448
building
sky
building
building
sky
building
sky
sky
building
building
building
building
building
building
building
building
sky
sky
building
building
sky
sky
sky
building
building
sky
sky
sky
sky
building
sky
building
sky
sky
building
building
sky
sky
sky
sky
building
building
building...

output:

? 1257 1
? 1257 31967725
? 1257 15983863
? 1257 23975794
? 1257 27971759
? 1257 25973776
? 1257 26972767
? 1257 26473271
? 1257 26223523
? 1257 26348397
? 1257 26410834
? 1257 26442052
? 1257 26457661
? 1257 26465466
? 1257 26469368
? 1257 26471319
? 1257 26472295
? 1257 26471807
? 1257 26471563
? 1...

result:

ok Used 4056 queries

Test #18:

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

input:

3689 531350850216
building
building
building
building
building
sky
building
sky
building
building
building
building
sky
sky
sky
sky
sky
building
building
building
building
building
sky
building
sky
building
sky
sky
building
sky
sky
building
sky
building
building
building
building
sky
building
sky
sk...

output:

? 1257 1
? 1257 265675425109
? 1257 398513137663
? 1257 464931993940
? 1257 498141422078
? 1257 514746136147
? 1257 506443779112
? 1257 510594957629
? 1257 508519368370
? 1257 509557162999
? 1257 510076060314
? 1257 510335508971
? 1257 510465233300
? 1257 510400371135
? 1257 510367940053
? 1257 5103...

result:

ok Used 3952 queries

Test #19:

score: 0
Accepted
time: 48ms
memory: 3372kb

input:

10000 1000000000000000000
building
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
sky
building
sky
building
building
building
sky
sky
building
building
sky
building
building
sky
building
sky
building
building
building
building
sky
sky
building
sky
building
...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 93750000000000001
? 5795 78125000000000001
? 5795 70312500000000001
? 5795 74218750000000001
? 5795 72265625000000001
? 5795 71289062500000001
? 5795 71777343750000001
? 5795 720214...

result:

ok Used 10579 queries

Test #20:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
sky
sky
building
sky
sky
b...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10538 queries

Test #21:

score: 0
Accepted
time: 53ms
memory: 3472kb

input:

10000 1000000000000000000
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
s...

output:

? 5795 1
? 3457 1
? 3457 500000000000000001
? 3457 250000000000000001
? 3457 125000000000000001
? 3457 62500000000000001
? 3457 31250000000000001
? 3457 15625000000000001
? 3457 7812500000000001
? 3457 3906250000000001
? 3457 1953125000000001
? 3457 976562500000001
? 3457 488281250000001
? 3457 2441...

result:

ok Used 10059 queries

Test #22:

score: 0
Accepted
time: 37ms
memory: 3392kb

input:

10000 1000000000000000000
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sk...

output:

? 5795 1
? 3457 1
? 3186 1
? 6968 1
? 1745 1
? 1046 1
? 1534 1
? 8443 1
? 730 1
? 2086 1
? 7012 1
? 7215 1
? 3535 1
? 527 1
? 735 1
? 7902 1
? 2310 1
? 423 1
? 883 1
? 8772 1
? 5574 1
? 6396 1
? 4870 1
? 8791 1
? 112 1
? 8616 1
? 4777 1
? 7887 1
? 7171 1
? 4311 1
? 2672 1
? 5849 1
? 9573 1
? 9957 1
...

result:

ok Used 10059 queries

Test #23:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
sky
sky
sky
sky
sky
sky...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10059 queries

Test #24:

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

input:

10000 1000000000000000000
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 875000000000000001
? 5795 937500000000000001
? 5795 968750000000000001
? 5795 984375000000000001
? 5795 992187500000000001
? 5795 996093750000000001
? 5795 998046875000000001
? 5795 999023437500000001
? 5795 999511718750000001
? 579...

result:

ok Used 9028 queries

Test #25:

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

input:

8 4
building
sky
building
sky
building
building

output:

? 2 1
? 2 3
? 2 2
? 7 3
? 6 3
? 6 4
! 6 4

result:

ok Used 6 queries

Test #26:

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

input:

8 4
sky
sky
building
sky
sky
building
building
building

output:

? 2 1
? 7 1
? 6 1
? 6 3
? 6 2
? 3 2
? 3 3
? 3 4
! 3 4

result:

ok Used 8 queries

Test #27:

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

input:

3 3
building
building
building

output:

? 3 1
? 3 2
? 3 3
! 3 3

result:

ok Used 3 queries

Test #28:

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

input:

3 3
sky
building
building
building

output:

? 3 1
? 1 1
? 1 2
? 1 3
! 1 3

result:

ok Used 4 queries

Test #29:

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

input:

5 5
building
building
sky
sky
sky
sky
building
building

output:

? 3 1
? 3 3
? 3 4
? 4 4
? 2 4
? 5 4
? 1 4
? 1 5
! 1 5

result:

ok Used 8 queries

Test #30:

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

input:

8 4
building
sky
sky
sky
building
building
sky
sky
building

output:

? 2 1
? 2 3
? 2 2
? 7 2
? 6 2
? 6 3
? 6 4
? 3 4
? 5 4
! 5 4

result:

ok Used 9 queries

Test #31:

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

input:

3 3
building
building
building

output:

? 3 1
? 3 2
? 3 3
! 3 3

result:

ok Used 3 queries

Test #32:

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

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
building
sky
sky
building
sky
building
sky
sky
building
sky
sky
building
building
sky
building
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
sky
sky
building
sky
sky
sky
sky
building
b...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 625000000000000001
? 5795 562500000000000001
? 5795 593750000000000001
? 5795 578125000000000001
? 5795 585937500000000001
? 5795 582031250000000001
? 5795 580078125000000001
? 5795 581054687500000001
? 5795 580566406250000001
? 579...

result:

ok Used 10704 queries

Test #33:

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

input:

10000 1000000000000000000
building
sky
building
building
sky
building
sky
building
sky
building
building
sky
building
sky
sky
sky
sky
building
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
building
sky
sky
building
building
building
building
sky
sky
building
sky
building
building
sk...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 375000000000000001
? 5795 437500000000000001
? 5795 406250000000000001
? 5795 421875000000000001
? 5795 414062500000000001
? 5795 417968750000000001
? 5795 416015625000000001
? 5795 416992187500000001
? 5795 417480468750000001
? 579...

result:

ok Used 10968 queries

Test #34:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
building
building
building
building
sky
building
sky
building
sky
building
sky
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10536 queries

Test #35:

score: 0
Accepted
time: 60ms
memory: 3396kb

input:

10000 1000000000000000000
building
building
sky
sky
building
building
building
sky
sky
building
sky
building
sky
sky
building
building
building
building
sky
sky
sky
building
sky
sky
building
sky
building
sky
sky
sky
sky
building
building
sky
sky
building
building
sky
building
building
sky
sky
buildi...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 625000000000000001
? 5795 562500000000000001
? 5795 593750000000000001
? 5795 609375000000000001
? 5795 617187500000000001
? 5795 613281250000000001
? 5795 611328125000000001
? 5795 612304687500000001
? 5795 611816406250000001
? 579...

result:

ok Used 10331 queries

Test #36:

score: 0
Accepted
time: 46ms
memory: 3404kb

input:

10000 1000000000000000000
building
building
building
building
building
building
sky
sky
building
sky
building
sky
building
building
sky
building
building
sky
building
sky
building
sky
building
building
sky
sky
building
building
sky
building
building
building
building
building
sky
sky
building
sky
bu...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 875000000000000001
? 5795 937500000000000001
? 5795 968750000000000001
? 5795 984375000000000001
? 5795 976562500000000001
? 5795 972656250000000001
? 5795 974609375000000001
? 5795 973632812500000001
? 5795 974121093750000001
? 579...

result:

ok Used 10268 queries

Test #37:

score: 0
Accepted
time: 50ms
memory: 3388kb

input:

10000 1000000000000000000
building
building
building
sky
sky
building
building
sky
sky
building
building
building
building
sky
building
building
sky
sky
sky
building
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
sky
sky
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 875000000000000001
? 5795 812500000000000001
? 5795 781250000000000001
? 5795 796875000000000001
? 5795 804687500000000001
? 5795 800781250000000001
? 5795 798828125000000001
? 5795 799804687500000001
? 5795 800292968750000001
? 579...

result:

ok Used 10475 queries

Test #38:

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

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
building
sky
sky
sky
sky
building
sky
building
sky
sky
sky
sky
sky
building
building
building
building
building
sky
sky
building
building
sky
sky
building
sky
sky
sky
sky
sky
building
building
sky
building
building
building
sky
sky
bui...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 625000000000000001
? 5795 562500000000000001
? 5795 593750000000000001
? 5795 578125000000000001
? 5795 585937500000000001
? 5795 582031250000000001
? 5795 580078125000000001
? 5795 579101562500000001
? 5795 578613281250000001
? 579...

result:

ok Used 10708 queries

Test #39:

score: 0
Accepted
time: 46ms
memory: 3312kb

input:

10000 1000000000000000000
building
sky
building
building
sky
sky
building
building
building
sky
building
sky
sky
sky
sky
building
sky
sky
building
building
building
building
sky
sky
sky
sky
building
sky
building
building
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
building
sky
sky
sky...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 375000000000000001
? 5795 437500000000000001
? 5795 406250000000000001
? 5795 390625000000000001
? 5795 398437500000000001
? 5795 402343750000000001
? 5795 404296875000000001
? 5795 403320312500000001
? 5795 403808593750000001
? 579...

result:

ok Used 10721 queries

Test #40:

score: 0
Accepted
time: 38ms
memory: 3416kb

input:

10000 1000000000000000000
building
sky
sky
sky
building
sky
sky
sky
sky
building
sky
building
sky
sky
building
sky
building
building
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
sky
sky
building
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 93750000000000001
? 5795 78125000000000001
? 5795 70312500000000001
? 5795 66406250000000001
? 5795 64453125000000001
? 5795 65429687500000001
? 5795 64941406250000001
? 5795 651855...

result:

ok Used 10938 queries

Test #41:

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

input:

10000 1000000000000000000
building
sky
sky
building
building
sky
sky
sky
building
building
building
sky
building
sky
building
sky
sky
sky
building
building
sky
sky
building
building
building
building
sky
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
sky
sky
sky
building
...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 187500000000000001
? 5795 218750000000000001
? 5795 203125000000000001
? 5795 195312500000000001
? 5795 191406250000000001
? 5795 193359375000000001
? 5795 194335937500000001
? 5795 194824218750000001
? 579...

result:

ok Used 10489 queries

Test #42:

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

input:

10000 1000000000000000000
building
sky
building
building
sky
building
sky
building
building
sky
sky
sky
building
building
building
building
building
building
sky
sky
sky
building
sky
sky
sky
building
building
building
building
building
building
building
building
sky
building
sky
sky
building
sky
sky...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 375000000000000001
? 5795 437500000000000001
? 5795 406250000000000001
? 5795 421875000000000001
? 5795 414062500000000001
? 5795 417968750000000001
? 5795 419921875000000001
? 5795 418945312500000001
? 5795 418457031250000001
? 579...

result:

ok Used 10970 queries

Test #43:

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

input:

10000 1000000000000000000
building
building
sky
sky
sky
building
sky
sky
building
sky
building
building
sky
building
sky
sky
building
building
building
building
building
building
sky
building
sky
building
sky
building
building
sky
building
sky
building
building
sky
building
building
building
sky
sky...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 625000000000000001
? 5795 562500000000000001
? 5795 531250000000000001
? 5795 546875000000000001
? 5795 539062500000000001
? 5795 535156250000000001
? 5795 537109375000000001
? 5795 536132812500000001
? 5795 536621093750000001
? 579...

result:

ok Used 10597 queries

Test #44:

score: 0
Accepted
time: 37ms
memory: 3304kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
building
building
sky
sky
sky
building
building
sky
sky
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
building
sky
building
building
building
sky
building
building
building
bu...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 46875000000000001
? 5795 54687500000000001
? 5795 58593750000000001
? 5795 56640625000000001
? 5795 55664062500000001
? 5795 55175781250000001
? 5795 554199...

result:

ok Used 10559 queries

Test #45:

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

input:

10000 1000000000000000000
building
sky
sky
building
building
sky
building
sky
sky
building
building
building
sky
building
building
sky
sky
building
building
sky
sky
sky
building
sky
sky
sky
building
building
building
building
sky
sky
building
building
sky
building
sky
building
building
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 187500000000000001
? 5795 218750000000000001
? 5795 203125000000000001
? 5795 210937500000000001
? 5795 207031250000000001
? 5795 205078125000000001
? 5795 206054687500000001
? 5795 206542968750000001
? 579...

result:

ok Used 10551 queries

Test #46:

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

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
building
sky
building
building
sky
sky
sky
building
building
building
building
building
sky
building
building
building
building
sky
sky
building
sky
sky
sky
building
building
building
bui...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 625000000000000001
? 5795 562500000000000001
? 5795 593750000000000001
? 5795 578125000000000001
? 5795 570312500000000001
? 5795 574218750000000001
? 5795 576171875000000001
? 5795 577148437500000001
? 5795 576660156250000001
? 579...

result:

ok Used 10705 queries

Test #47:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
sky
sky
building
sky
building
building
building
sky
building
building
building
sky
building
sky
sky
sky
building
building
building
sky
building
s...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 366210937500001
? ...

result:

ok Used 339 queries

Test #48:

score: 0
Accepted
time: 42ms
memory: 3308kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10180 queries

Test #49:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 122070312500001
? ...

result:

ok Used 183 queries

Test #50:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
bu...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 532 queries

Test #51:

score: 0
Accepted
time: 4ms
memory: 3272kb

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
sky
sky
s...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 122070312500001
? ...

result:

ok Used 459 queries

Test #52:

score: 0
Accepted
time: 56ms
memory: 3440kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
sky
sk...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10178 queries

Test #53:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
buildi...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 122070312500001
? ...

result:

ok Used 200 queries

Test #54:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 221 queries

Test #55:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
sky
building
sky
sky
sky
buil...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 122070312500001
? ...

result:

ok Used 460 queries

Test #56:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
building
building
sky
sky
building
building
building
sky
sky
sky
sky
sky
sky
building
building
building
building
sky
sky
building
sky
building
sky
building
sky
building
sky
building
bu...

output:

? 64 1
? 64 500000000000000001
? 64 250000000000000001
? 64 125000000000000001
? 64 62500000000000001
? 64 31250000000000001
? 64 15625000000000001
? 64 7812500000000001
? 64 3906250000000001
? 64 1953125000000001
? 64 976562500000001
? 64 488281250000001
? 64 244140625000001
? 64 122070312500001
? ...

result:

ok Used 519 queries

Test #57:

score: 0
Accepted
time: 37ms
memory: 3484kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
building
sky
building
sky
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10419 queries

Test #58:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
building
sky
building
building
building
building
building
building
sky
building
sky
building
sky
sky
building
sky
sky
building
sky
building
building
sky
building
building
building
sky
sky
building
b...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 2929687500000001
? 5795 3417968750000001
? 5795 36621093750...

result:

ok Used 10300 queries

Test #59:

score: 0
Accepted
time: 73ms
memory: 3388kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
building
building
building
building
building
building
sky
building
building
building
building
sky
sky
sky
building
sky
sky
building
building
building
sky
building
building
sky
building
sky
sky
sky
buildin...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 1464843750000001
? 5795 122070312500...

result:

ok Used 10719 queries

Test #60:

score: 0
Accepted
time: 46ms
memory: 3484kb

input:

10000 1000000000000000000
building
building
building
building
building
sky
building
building
sky
sky
building
building
sky
sky
building
sky
building
building
building
building
sky
building
sky
building
sky
sky
sky
building
building
building
building
building
sky
sky
sky
sky
sky
sky
sky
building
buil...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 875000000000000001
? 5795 937500000000000001
? 5795 968750000000000001
? 5795 953125000000000001
? 5795 960937500000000001
? 5795 964843750000000001
? 5795 962890625000000001
? 5795 961914062500000001
? 5795 962402343750000001
? 579...

result:

ok Used 10416 queries

Test #61:

score: 0
Accepted
time: 95ms
memory: 3372kb

input:

10000 1000000000000000000
building
building
building
sky
sky
building
building
building
sky
building
building
sky
sky
sky
sky
sky
building
building
sky
building
sky
sky
sky
building
sky
building
building
building
sky
building
sky
sky
sky
building
building
building
sky
sky
sky
building
building
sky
b...

output:

? 5795 1
? 5795 500000000000000001
? 5795 750000000000000001
? 5795 875000000000000001
? 5795 812500000000000001
? 5795 781250000000000001
? 5795 796875000000000001
? 5795 804687500000000001
? 5795 808593750000000001
? 5795 806640625000000001
? 5795 807617187500000001
? 5795 808105468750000001
? 579...

result:

ok Used 10429 queries

Test #62:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
sky
building
sky
building
s...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 488281250000001
? 5795 2441406250000...

result:

ok Used 10718 queries

Test #63:

score: 0
Accepted
time: 84ms
memory: 3396kb

input:

10000 1000000000000000000
building
sky
building
sky
building
sky
building
sky
sky
building
building
building
sky
sky
building
sky
sky
building
building
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
building
building
sky
building
sky
sky
building
building
building
building
sky...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 375000000000000001
? 5795 312500000000000001
? 5795 343750000000000001
? 5795 328125000000000001
? 5795 335937500000000001
? 5795 332031250000000001
? 5795 330078125000000001
? 5795 331054687500000001
? 5795 331542968750000001
? 579...

result:

ok Used 10882 queries

Test #64:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
sky
building
building
sky
building
sky
sky
building
building
sky
sky
sky
building
sky
building
building
sky
building
sky
sky
building
building
building
sky
building
sky
sky
building
building
bui...

output:

? 5795 1
? 5795 500000000000000001
? 5795 250000000000000001
? 5795 125000000000000001
? 5795 62500000000000001
? 5795 31250000000000001
? 5795 15625000000000001
? 5795 7812500000000001
? 5795 3906250000000001
? 5795 1953125000000001
? 5795 976562500000001
? 5795 1464843750000001
? 5795 170898437500...

result:

ok Used 10600 queries