QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#818235#9883. Near Pairucup-team004AC ✓8ms4272kbC++231.3kb2024-12-17 17:50:232024-12-17 17:50:29

Judging History

This is the latest submission verdict.

  • [2024-12-17 17:50:29]
  • Judged
  • Verdict: AC
  • Time: 8ms
  • Memory: 4272kb
  • [2024-12-17 17:50:23]
  • Submitted

answer

#include <bits/stdc++.h>

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;

int query(const std::string &s) {
    std::cout << "? " << s << std::endl;
    int ans;
    std::cin >> ans;
    return ans;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int N, K, Q;
    std::cin >> N >> K >> Q;
    
    std::vector<int> ans;
    auto work = [&](auto &&self, int l, int r, int s) -> void {
        if ((r - l) * (2 * K) - s < K) {
            return;
        }
        if (r - l == 1) {
            ans.push_back(r);
            return;
        }
        int m = (l + r) / 2;
        std::string s1, s2;
        for (int i = 0; i < N; i++) {
            if (l <= i && i < m) {
                s1 += '1';
                s2 += '0';
            } else {
                s1 += '0';
                s2 += '1';
            }
        }
        
        int sl = query(s1) - query(s2) + N * K - K * (K + 1) / 2;
        int sr = s - sl;
        self(self, l, m, sl);
        self(self, m, r, sr);
    };
    work(work, 0, N, N * 2 * K - K * (K + 1));
    
    std::cout << "! " << ans[0] << " " << ans[1] << std::endl;
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 5ms
memory: 4196kb

input:

20000 1 60
4972
4972
1254
11254
295
15294
83
17582
18
18767
8
19383
0
19688
0
19843
0
19922
0
19961
0
19980
0
19989
0
19995
0
19998
1239
11239
302
15301
79
17579
25
18775
3
19379
1
19689
0
19843
0
19922
0
19961
0
19979
0
19990
0
19995
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #2:

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

input:

20000 1 60
4995
4995
1293
11292
314
15313
68
17567
17
18767
5
19381
1
19688
1
19844
0
19922
0
19961
0
19979
0
19990
0
19996
0
19997
1273
11273
328
15327
75
17574
13
18762
4
19380
1
19688
0
19843
0
19922
0
19962
0
19981
0
19989
0
19995
0
19997
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 56 questions

Test #3:

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

input:

20000 2 90
9988
9991
2487
22486
595
30592
178
35175
36
37533
11
38760
2
39377
2
39689
0
39843
0
39921
0
39957
0
39979
0
39989
0
39995
616
30614
143
35141
38
37537
16
38765
2
39375
1
39688
0
39841
0
39923
0
39963
0
39983
0
39989
0
39995

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 52 questions

Test #4:

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

input:

20000 2 90
9985
9984
2449
22448
620
30619
162
35159
43
37542
14
38765
3
39376
1
39686
0
39841
0
39923
0
39961
0
39979
0
39991
0
39993
2500
22500
608
30607
142
35141
31
37530
5
38756
2
39377
0
39685
0
39843
0
39921
0
39957
0
39977
0
39991
0
39995

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #5:

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

input:

20000 3 120
15006
15000
3720
33722
946
45945
236
52732
52
56299
16
58138
4
59062
1
59527
0
59763
0
59883
0
59943
0
59970
0
59985
0
59988
226
52721
951
45945
230
52728
48
56295
8
58130
6
59064
1
59530
0
59760
0
59883
0
59943
0
59970
0
59985
0
59988

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #6:

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

input:

20000 3 120
14948
14951
3706
33705
919
45918
216
52710
62
56308
15
58140
5
59063
1
59530
1
59764
0
59880
0
59934
0
59964
0
59985
0
59988
870
45865
232
52729
58
56305
7
58132
1
59062
0
59526
0
59760
0
59880
0
59934
0
59967
0
59982
0
59991
3721
33717

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #7:

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

input:

20000 4 150
19882
19890
5020
45020
1247
61243
311
70301
74
75068
20
77515
315
70309
76
75066
25
77523
5
78751
1
79367
0
79678
0
79838
0
79914
0
79950
0
79974
0
79982
0
79982
1206
61197
298
70288
73
75063
22
77523
6
78751
0
79366
0
79678
0
79842
0
79918
0
79954
0
79974
0
79986

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 60 questions

Test #8:

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

input:

20000 4 150
19966
19969
5049
45043
1261
61251
328
70318
90
75084
25
77519
8
78754
1
79367
1
79679
1
79843
0
79918
0
79950
0
79974
0
79986
1288
61281
290
70286
84
75080
21
77518
4966
44956
1298
61289
295
70287
74
75068
24
77522
4
78750
1
79367
0
79682
0
79838
0
79914
0
79950
0
79978
0
79982

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 62 questions

Test #9:

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

input:

20000 5 180
25108
25108
6291
56281
1565
76552
1579
76569
426
87916
111
93846
17
96887
7
98436
369
87859
97
93832
24
96894
9
98439
2
99207
0
99595
0
99795
0
99890
0
99935
0
99965
0
99980
6314
56310
1508
76495
391
87877
97
93832
27
96892
7
98435
2
99212
1
99601
1
99796
0
99885
0
99935
0
99965
0
99975
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 66 questions

Test #10:

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

input:

20000 5 180
25010
25005
6237
56232
1555
76545
386
87876
90
93825
16
96886
4
98434
0
99210
0
99595
0
99795
0
99885
0
99935
0
99970
0
99975
397
87882
98
93834
6294
56299
1584
76575
385
87873
407
87897
108
93848
25
96893
86
93830
18
96887
11
98436
1
99211
0
99600
0
99800
0
99900
0
99945
0
99965
0
99975...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 66 questions

Test #11:

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

input:

20000 6 210
30027
30026
7529
67517
1916
91904
466
105451
107
112587
1868
91848
456
105439
119
112604
35
116270
8
118115
5
119048
1
119518
0
119757
0
119871
0
119925
0
119955
0
119967
0
119967
7567
67551
1875
91865
445
105424
113
112598
37
116278
14
118127
1
119044
0
119511
0
119757
0
119877
0
119937...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 70 questions

Test #12:

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

input:

20000 6 210
30054
30049
7637
67623
1904
91890
497
105476
115
112597
1868
91848
485
105464
111
112590
30
116271
9
118116
1
119044
1
119512
0
119751
0
119865
0
119919
0
119955
0
119967
0
119973
7432
67422
1842
91832
471
105455
124
112603
30
116265
8
118121
1
119044
0
119517
0
119751
0
119865
0
119925
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 74 questions

Test #13:

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

input:

20000 7 240
34987
34990
8646
78641
2144
107127
558
123032
131
131359
556
123032
137
131361
2179
107151
575
123047
128
131355
8675
78661
2172
107158
559
123038
145
131374
44
135655
13
137808
6
138893
1
139434
0
139713
0
139853
0
139923
0
139951
0
139965
140
131369
38
135649
11
137806
3
138890
1
13942...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 68 questions

Test #14:

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

input:

20000 7 240
34953
34964
8741
78741
2206
107194
552
123024
126
131348
22
135636
5
137803
1
138884
0
139426
0
139713
0
139846
0
139902
0
139944
0
139958
0
139958
542
123021
119
131341
41
135645
14
137802
3
138883
1
139434
0
139706
0
139839
0
139902
0
139951
0
139965
2184
107167
555
123032
8781
78764
2...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 60 questions

Test #15:

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

input:

20000 8 270
39884
39880
9982
89961
2478
122449
635
140599
167
150139
34
155014
5
157481
0
158724
0
159340
0
159668
0
159828
0
159900
0
159932
0
159948
0
159956
2488
122457
628
140602
172
150137
44
155025
11
157488
3
158719
0
159340
0
159669
0
159827
9868
89847
2531
122499
641
140605
155
150122
36
15...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 86 questions

Test #16:

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

input:

20000 8 270
39939
39948
10003
89988
2499
122474
610
140584
162
150130
634
140598
149
150123
36
155008
9
157487
0
158718
1
159349
0
159668
0
159820
0
159884
0
159932
0
159956
2544
122517
617
140584
594
140565
159
150123
39
155011
10
157478
2
158718
0
159348
0
159668
0
159820
0
159884
0
159932
0
15994...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 78 questions

Test #17:

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

input:

20000 9 300
45025
45047
11401
101395
2882
137847
734
158199
179
168894
48
174391
698
158173
155
168873
40
174392
8
177168
2
178553
1
179267
0
179622
0
179793
0
179865
0
179928
0
179946
165
168872
2832
137790
661
158124
154
168876
33
174372
7
177162
1
178552
0
179253
0
179595
0
179784
0
179865
0
1799...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 66 questions

Test #18:

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

input:

20000 9 300
44963
44965
11223
101197
2781
137749
709
158169
2855
137823
718
158173
199
168908
42
174381
9
177165
3
178563
0
179262
0
179613
0
179775
0
179865
0
179928
0
179946
695
158162
165
168876
11157
101140
2780
137747
719
158181
655
158111
190
168904
44
174383
10
177157
6
178557
2
179264
1
1796...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 66 questions

Test #19:

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

input:

20000 10 330
50088
50078
12542
112512
3133
153086
767
175716
186
187631
51
193769
16
196854
6
198404
1
199170
3148
153093
773
175727
189
187634
43
193759
13
196838
3
198388
0
199170
12362
112351
3146
153112
767
175721
187
187632
50
193755
8
196833
3
198388
0
199177
0
199565
0
199745
0
199855
0
19990...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 104 questions

Test #20:

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

input:

20000 10 330
49999
49981
12533
112493
3090
153035
802
175759
177
187626
3185
153139
761
175713
12591
112569
3143
153088
813
175787
206
187658
54
193765
15
196840
3
198404
0
199172
3071
153048
800
175758
208
187653
40
193755
6
196831
1
198396
0
199175
0
199565
0
199745
0
199855
0
199905
0
199925
0
19...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 76 questions

Test #21:

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

input:

20000 1 60
4980
4980
1279
11279
308
15307
73
17573
16
18766
2
19377
1
19689
1
19844
0
19922
0
19962
0
19981
0
19990
0
19996
0
19998
1258
11258
314
15313
83
17582
23
18772
5
19381
1
19688
0
19844
0
19921
0
19961
0
19979
0
19990
0
19995
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #22:

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

input:

20000 1 60
5017
5017
1254
11254
296
15296
70
17570
12
18762
2
19378
0
19687
0
19843
0
19922
0
19962
0
19982
0
19991
0
19996
0
19998
1242
11242
319
15318
86
17586
24
18774
10
19386
1
19688
0
19844
0
19921
0
19962
0
19982
0
19992
0
19995
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #23:

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

input:

20000 1 60
5034
5033
1261
11262
292
15292
69
17569
13
18763
1
19376
0
19688
0
19844
0
19921
0
19962
0
19982
0
19991
0
19996
0
19998
72
17571
19
18769
6
19381
2
19690
0
19844
0
19921
0
19962
0
19981
0
19989
0
19996
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 50 questions

Test #24:

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

input:

20000 1 60
5052
5053
1229
11228
302
15302
72
17571
17
18767
3
19379
1
19688
0
19843
0
19921
0
19961
0
19980
0
19990
0
19996
0
19998
83
17582
22
18771
4
19380
2
19689
1
19844
0
19922
0
19962
0
19981
0
19990
0
19995
0
19997
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 52 questions

Test #25:

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

input:

20000 1 60
4964
4965
1252
11252
340
15340
84
17583
16
18766
4
19380
2
19689
0
19843
0
19921
0
19961
0
19979
0
19989
0
19996
0
19998
322
15322
85
17585
18
18768
6
19381
2
19689
0
19843
0
19922
0
19961
0
19980
0
19990
0
19996
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 52 questions

Test #26:

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

input:

20000 1 60
4986
4986
1263
11263
326
15325
91
17590
23
18772
4
19379
0
19687
0
19844
0
19922
0
19961
0
19980
0
19990
0
19995
0
19997
0
19997
1257
11257
323
15322
65
17565
17
18766
6
19381
1
19688
0
19844
0
19921
0
19962
0
19982
0
19992
0
19995
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 56 questions

Test #27:

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

input:

20000 1 60
4931
4932
1268
11269
339
15339
98
17598
25
18775
5
19380
2
19690
1
19844
0
19922
0
19962
0
19982
0
19991
0
19995
0
19998
78
17577
18
18768
6
19382
2
19690
1
19844
0
19922
0
19962
0
19982
0
19992
0
19995
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 50 questions

Test #28:

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

input:

20000 1 60
4986
4986
1223
11223
292
15291
69
17569
19
18768
6
19382
3
19691
0
19843
0
19921
0
19962
0
19982
0
19992
0
19995
0
19998
1269
11268
301
15300
81
17581
23
18773
6
19381
0
19688
0
19843
0
19921
0
19961
0
19979
0
19990
0
19995
0
19997
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 56 questions

Test #29:

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

input:

20000 1 60
5042
5042
1272
11272
305
15304
90
17589
14
18763
2
19377
0
19687
0
19844
0
19922
0
19961
0
19979
0
19989
0
19995
0
19997
0
19997
1226
11226
350
15349
69
17568
24
18773
4
19380
0
19688
0
19843
0
19921
0
19962
0
19982
0
19992
0
19995
0
19998

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 56 questions

Test #30:

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

input:

20000 1 60
5058
5058
1231
11230
311
15310
81
17581
19
18769
5
19381
1
19689
0
19844
0
19921
0
19962
0
19982
0
19992
0
19995
0
19997
1279
11279
313
15313
82
17581
12
18761
4
19379
2
19689
0
19843
0
19921
0
19959
0
19979
0
19990
0
19996
0
19997

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 54 questions

Test #31:

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

input:

20000 10 330
50036
50048
12587
112568
3111
153072
734
175689
175
187620
46
193761
13
196848
3
198398
0
199166
785
175736
207
187661
3062
153009
814
175780
187
187642
35
193748
51
193756
13
196838
2
198394
12508
112483
3135
153102
783
175739
209
187658
171
187626
35
193750
7
196832
1
198386
0
199165
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 88 questions

Test #32:

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

input:

20000 10 330
49866
49840
12476
112438
3066
153018
812
175757
200
187645
45
193760
8
196833
3
198388
2
199177
0
199565
1
199756
0
199845
0
199915
0
199925
3182
153128
793
175742
12339
112327
2953
152916
747
175692
179
187634
34
193739
13
196848
2
198397
0
199165
0
199575
0
199765
0
199854
781
175736
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 98 questions

Test #33:

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

input:

20000 10 330
50082
50083
12537
112507
3151
153111
771
175725
789
175744
193
187638
47
193762
11
196846
3
198398
1
199166
0
199575
0
199765
0
199855
0
199915
0
199925
3088
153041
781
175730
196
187641
48
193772
10
196845
3
198388
2
199177
1
199566
1
199746
0
199855
0
199905
0
199935
12481
112454
3175...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 68 questions

Test #34:

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

input:

20000 10 330
50058
50067
12432
112408
3194
153148
763
175720
189
187639
186
187641
44
193751
3110
153070
774
175729
180
187625
49
193754
15
196840
2
198397
1
199176
0
199575
0
199775
0
199875
0
199915
0
199935
792
175742
193
187641
51
193766
7
196832
5
198390
3
199168
0
199565
1
199746
0
199855
0
19...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 80 questions

Test #35:

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

input:

20000 10 330
50003
49997
12593
112567
3076
153037
760
175711
215
187660
43
193748
10
196835
2
198387
0
199165
0
199555
0
199745
0
199845
0
199915
0
199935
798
175756
193
187646
3166
153130
771
175732
190
187641
51
193766
18
196843
5
198400
1
199166
0
199565
0
199755
0
199845
0
199905
0
199935
12533
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 74 questions

Test #36:

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

input:

20000 10 330
49968
49966
12545
112517
3093
153047
816
175763
184
187637
3072
153036
773
175732
203
187662
66
193776
12407
112375
3122
153073
727
175682
185
187630
36
193741
10
196845
2
198397
1
199166
0
199575
0
199775
0
199875
0
199915
0
199935
3083
153054
752
175712
188
187634
45
193764
15
196840
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 72 questions

Test #37:

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

input:

20000 10 330
50054
50051
12489
112452
3088
153035
772
175733
174
187635
45
193766
15
196849
3078
153042
745
175708
177
187640
36
193759
9
196840
1
198398
0
199174
819
175764
217
187677
47
193762
14
196849
3
198388
1
199176
1
199576
0
199765
1
199846
0
199915
0
199935
12644
112605
3150
153103
3188
15...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 88 questions

Test #38:

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

input:

20000 10 330
50009
50000
12441
112409
3169
153132
809
175764
214
187669
42
193757
8
196843
4
198389
0
199165
0
199565
0
199745
0
199845
0
199915
0
199925
3036
153003
787
175751
214
187670
62
193774
12500
112486
3113
153076
778
175732
832
175787
208
187663
51
193759
196
187651
55
193760
9
196844
1
19...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 78 questions

Test #39:

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

input:

20000 10 330
49951
49950
12505
112470
3069
153029
771
175731
166
187616
44
193749
15
196840
5
198391
3091
153057
812
175769
213
187660
46
193751
11
196846
2
198397
1
199176
1
199566
0
199755
0
199845
0
199905
0
199935
761
175719
196
187649
12404
112381
3134
153089
803
175748
190
187645
50
193765
12
...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 88 questions

Test #40:

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

input:

20000 10 330
50021
50014
12331
112293
3146
153098
757
175711
3174
153128
793
175754
188
187633
57
193778
12
196847
5
198390
1
199176
1
199566
0
199755
0
199845
0
199905
0
199935
12426
112396
3142
153096
731
175692
185
187639
3174
153136
813
175763
174
187626
787
175750
214
187669
45
193760
14
196849...

output:

? 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok 68 questions