QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#760233#3507. Broken Device 2Wansur#25 22ms4124kbC++201.4kb2024-11-18 15:47:132024-11-18 15:47:14

Judging History

你现在查看的是最新测评结果

  • [2024-11-18 15:47:14]
  • 评测
  • 测评结果:25
  • 用时:22ms
  • 内存:4124kb
  • [2024-11-18 15:47:13]
  • 提交

Anna

#include "Anna.h"
#include <bits/stdc++.h>

using namespace std;

int lg = 60, k = 18;

int Declare() {
    return lg * (k + 1);
}

pair<vector<int>, vector<int>> Anna(long long x) {
    vector<int> a, b;
    a.push_back(1);
    vector<int> p(lg);
    for(int i = 0; i < lg; i++) {
        p[i] = i;
    }
    mt19937 rng(889275928);
    shuffle(p.begin(), p.end(), rng);
    for(int i : p) {
        int t = ((x >> i) & 1);
        for(int j = 0; j < k; j++){
            a.push_back(t);
        }
        a.push_back(1);
    }
    a.pop_back();
    while(b.size() < a.size()) {
        b.push_back(0);
    }
    return {a, b};
}

Bruno

#include "Bruno.h"
#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int tk = 18;

long long Bruno(vector<int> u) {
    int n = (int) u.size();
    ll ans = 0, b = 0;
    vector<int> p(60);
    for(int i = 0; i < 60; i++) {
        p[i] = i;
    }
    mt19937 rng(889275928);
    shuffle(p.begin(), p.end(), rng);
    for(int i = 0; i + 1 < (int)u.size(); i++) {
        if(u[i] == 0) {
            continue;
        }
        int fg = 0;
        for(int j = i + 1; j <= i + tk; j++) {
            fg |= u[j];
        }
        if(fg) {
            ans |= (1ll << p[b]);
            int cnt = 0, j = i;
            while(cnt < tk) {
                j++;
                cnt += u[j];
            }
            i = j;
        }
        b++;
    }
    return ans;
}

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 11ms
memory: 3816kb

input:

1000
2280
00010000000000000000000000000000010000000000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000000000000000001000000000000000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000000000000000000000...

output:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...

input:


output:

1140

result:

ok m = 1140

Test #2:

score: 5
Accepted
time: 13ms
memory: 3840kb

input:

1000
2280
10000000000000000000000000000000000000000100000000000000000000000000000000000000100000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000001000000...

output:

1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
...

input:


output:

1140

result:

ok m = 1140

Subtask #2:

score: 5
Accepted

Test #3:

score: 5
Accepted
time: 9ms
memory: 3820kb

input:

1000
2280
10101100001011011111000011111000111000000000000000000000000000000000001000000000000000000000000000000001000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000001000000000000000000000000000000000001000000000000000000000000000000000000000010000000000000000...

output:

2392149
3237369
2749856
2195337
1287710
2355845
3335395
3368329
3788433
3809503
2138066
3919234
3445205
1969808
2611344
2738622
102224
3755713
692366
1999357
1791368
1080377
2887807
292605
3650162
2047893
2886267
1927376
3812776
1734518
521926
417160
3517895
3437895
1741109
2515055
2130145
1493727
1...

input:


output:

1140

result:

ok m = 1140

Test #4:

score: 5
Accepted
time: 13ms
memory: 3832kb

input:

1000
2280
11000011000001000100000010101000011001010111100001001001000000000000000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000000000000001001101111000111001010000010011101101010000000000000000000000000000000010000000000000000000000000000000000010000000000000...

output:

3247998
2952264
101276
3985524
3481871
1597107
3102982
3200769
3944600
2638234
857913
1577621
929409
1919652
544240
852963
1790135
212465
3013164
2949591
127124
1297806
1856199
3039926
2515945
2102087
1462642
132487
574908
500789
1691249
635288
2102814
2987943
1680123
135165
14678
3784008
3163536
26...

input:


output:

1140

result:

ok m = 1140

Test #5:

score: 5
Accepted
time: 22ms
memory: 3828kb

input:

1000
2280
01011000011100101011110001000010100000111100010000000000000000000000000000000010000000000000000000000000000000100000000000000000000000000000000000000000000100000011100000010011000001010100011111000000001111000100000000000000000000000000000000000001000000000000000000000000000000000000000010...

output:

2928097
288621
493405
2654107
1392477
2720264
695372
3246724
3873799
1943259
36019
3099034
2080793
264593
1251607
796288
2422366
2512087
15926
1481435
79016
3777761
2022970
920671
347165
3723201
311611
2228046
354289
2867459
2249190
478736
3044429
840358
3511060
3254619
842641
3999896
2458483
147725...

input:


output:

1140

result:

ok m = 1140

Test #6:

score: 5
Accepted
time: 18ms
memory: 4120kb

input:

1000
2280
01011000011110101000011100110010011001001100000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000010000000000000000000000001100000110010000000000101001111010101101000110001100000000000000000000000000000001000000000000000000000000000000000...

output:

3767405
1695402
1062411
520565
3753621
2849376
3544378
3642084
1041553
2246415
3636456
2175599
1208697
1285012
973829
1829274
348285
2682972
3232655
1600823
406856
2199316
353863
69430
3039540
3142014
168684
1207681
3945314
965971
358058
3182008
176715
1601189
2141110
32793
798136
3097583
3776345
37...

input:


output:

1140

result:

ok m = 1140

Test #7:

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

input:

1000
2280
00100101011100100000010011111000001101101100001000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000010000000000000000000000000001100100010011100011111100010011000101101000000000000000000000000000000000010000000000000000000000000000000000000000000000...

output:

2411978
1765946
3265867
2545974
1826937
805418
3154938
3052442
24781
1476109
3308102
2969474
1833779
494220
59723
3155918
503704
3941543
2213661
846943
3910588
1104614
3619613
1556790
3232609
2475271
2516715
3641605
3120720
2979060
1980061
527445
3930920
1088555
3220479
3373216
2150502
3028732
71176...

input:


output:

1140

result:

ok m = 1140

Test #8:

score: 5
Accepted
time: 11ms
memory: 3840kb

input:

1000
2280
11100100001100100110100101011000110000000010100110000000000000000000000000000000001000000000000000000000000000000000000000100000000000000000000000000000000000000100000000000000000000000000000000000010000000000000000000000000000000100000000000000000000000000000000000000000100000000000000000...

output:

4000000
3999999
3999998
3999997
3999996
3999995
3999994
3999993
3999992
3999991
3999990
3999989
3999988
3999987
3999986
3999985
3999984
3999983
3999982
3999981
3999980
3999979
3999978
3999977
3999976
3999975
3999974
3999973
3999972
3999971
3999970
3999969
3999968
3999967
3999966
3999965
3999964
3999...

input:


output:

1140

result:

ok m = 1140

Test #9:

score: 5
Accepted
time: 14ms
memory: 3820kb

input:

1000
2280
10001001000110101001011011011000010100110100001000000000000000000000000000000000000010000000000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000001000000000000000000000000000000001000000000000000000000000000000000000000000010000000000...

output:

4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000...

input:


output:

1140

result:

ok m = 1140

Subtask #3:

score: 3
Accepted

Test #10:

score: 3
Accepted
time: 18ms
memory: 3900kb

input:

1000
2280
01000101100011000000110100101110101101001001010000000000000000000000000000000000100000000000000000000000000000000000010000000000000000000000000000000001000000000000000000000000000000000000000100000000000000000000000000011100101110010011010000001111100001110010000000000000000000000000000000...

output:

7846775
8382012
6960772
2404116
8677412
678745
979722
6774319
3437411
7700246
3932261
582072
2662108
1913302
9666010
3371652
2312541
4159600
8783066
993904
5398654
7248427
8232055
3643242
5202338
290310
1551528
3983196
7816277
5663064
8661901
964937
8144699
6117845
8804933
9971775
5436597
3766214
79...

input:


output:

1140

result:

ok m = 1140

Test #11:

score: 3
Accepted
time: 13ms
memory: 3836kb

input:

1000
2280
01001011011101111000111011111000100000000000000000000000000000000000100000000000000000000000000000000000000000000100000000000000000000000000000000000000000000110101000001111001101000111011000100010110000000000000000000000000000000000000001000000000000000000000000000000000000000000001000000...

output:

2579500
3476332
4512501
865937
5540101
5206780
8037675
3675478
8821453
7441051
7676364
338309
976749
946802
3291356
3888882
2478300
1886237
1406259
6251160
2208800
2104502
1931051
1049985
2329662
9349976
5608090
9767861
8144967
3417504
7418611
3118179
4298349
6201707
9025067
6059364
9663241
450971
5...

input:


output:

1140

result:

ok m = 1140

Test #12:

score: 3
Accepted
time: 16ms
memory: 3852kb

input:

1000
2280
01101101010011100000011010000010110111110000000000000000000000000000000000010000000000000000000000000000000010000000000000000000000000000000000011010000111000000001100111111111001010100000000000000000000000000010000000000000000000000000000000000100000000000000000000000000000000001000000000...

output:

2145720
7247151
3955792
5119375
102397
6995413
5642360
3131787
5371462
6379650
2328491
8471151
1946249
7566503
6637905
3697742
5543077
408761
7967610
6892138
1101909
2691849
184908
8016601
4624752
9101543
9572339
1216864
3218036
2518886
7443559
6023379
1953149
1938765
837135
2363275
3523721
4435652
...

input:


output:

1140

result:

ok m = 1140

Test #13:

score: 3
Accepted
time: 9ms
memory: 3880kb

input:

1000
2280
10000000000000000000000000000010000000000000000000000000000000100000000000000000000000000000000000000000100000000000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000...

output:

9239125
6470044
4672895
4176665
4788657
3211270
3879021
9473641
521084
253145
6033154
5127031
625904
9212465
65924
9956651
2252087
8260418
9895546
7429426
846905
5204965
7241285
9494999
840621
3490412
1263815
5507791
8148607
6275485
1999058
1528587
7924593
4980468
3054715
6609458
4350579
5735464
804...

input:


output:

1140

result:

ok m = 1140

Test #14:

score: 3
Accepted
time: 22ms
memory: 3828kb

input:

1000
2280
10000000000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000000000000000000001000000000000000000000000000000000000000010100010111101110101110101100100001000010000000000000000000000000000000000000000000010000000000000000000000000000000...

output:

245066
6788319
1673516
1668834
394553
2942265
555022
6915166
2504160
1167605
3060080
5061148
7819952
4994649
4012235
5538388
3227745
3332942
4170563
4170898
1363994
9468160
2991713
1733063
9809544
852809
5008917
2273965
3916627
9975559
9716708
7799492
6082722
4525699
6435787
7981909
1178233
462472
3...

input:


output:

1140

result:

ok m = 1140

Test #15:

score: 3
Accepted
time: 22ms
memory: 3824kb

input:

1000
2280
01000000000000000000000000000000000100000000000000000000000000010000000000000000000000000000000000001000000000000000000000000000000000000001001100001010000100111101001011111101000010000000000000000000000000000000010000000000000000000000000000000000000000000000010000000000000000000000000000...

output:

10000000
9999999
9999998
9999997
9999996
9999995
9999994
9999993
9999992
9999991
9999990
9999989
9999988
9999987
9999986
9999985
9999984
9999983
9999982
9999981
9999980
9999979
9999978
9999977
9999976
9999975
9999974
9999973
9999972
9999971
9999970
9999969
9999968
9999967
9999966
9999965
9999964
999...

input:


output:

1140

result:

ok m = 1140

Test #16:

score: 3
Accepted
time: 11ms
memory: 3796kb

input:

1000
2280
00010000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000000000000000000000000010000000000000000000000000000000000001111111110110101010001101010100100000000000000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000...

output:

10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
10000000
100...

input:


output:

1140

result:

ok m = 1140

Test #17:

score: 3
Accepted
time: 15ms
memory: 4124kb

input:

1000
2280
10111111100011111101110110100000000000000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000000000001101000000010101111111000100000101001001000011000100000000000000000000000000000001000000000000000000000000000000010000000000000000000000...

output:

3153792
4161536
523264
2542806
2796202
2715035
127
1048575
2405805
4997816
854
4194288
3365266
2097120
4161528
5000490
2097088
4229086
9999049
2738419
4997529
9999460
195
2097151
4129023
4997159
9998647
8126431
4194303
262143
2796202
2796194
1665
5001324
5001890
32640
4161791
2467411
611027
636635
4...

input:


output:

1140

result:

ok m = 1140

Test #18:

score: 3
Accepted
time: 22ms
memory: 4080kb

input:

1000
2280
00100000000000000000000000000000000000001000000000000000000000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000001111101010010010010111110010110110000000000000000000000000000000000100000000000000000000000000000000000000000000100000000000000000000000000...

output:

2080767
2778778
8386560
263
5000855
5588341
9999126
5592407
5594453
254
262140
4996865
9997774
3678144
5592437
524352
1966080
326
6285999
4128895
1048544
2061203
32764
1032319
680
1693
1265501
8565439
2796202
16256
25
9850730
9998672
2788010
5313877
1387923
7713052
399
9998730
4128768
9999888
279620...

input:


output:

1140

result:

ok m = 1140

Test #19:

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

input:

1000
2280
10000000000000000000000000000000000100000000000000000000000000000000000000100000000000000000000000000000000000000000010000000000000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000010000000000000000...

output:

1796388
1093
524885
1657
5592405
5592405
4998184
4178944
2796202
4186048
5625173
9998208
9997035
262143
9999343
7551730
5592401
5001314
9997285
1023
522
5001860
130560
3
2101184
1048576
4194431
9999335
1
3353805
2064895
2935661
4129279
4999239
4194296
1898
179
3564902
4997984
8322047
2279
2871
93685...

input:


output:

1140

result:

ok m = 1140

Subtask #4:

score: 12
Accepted

Test #20:

score: 12
Accepted
time: 15ms
memory: 3840kb

input:

1000
2280
00001001110000010100111111111110011100000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000011111001000000010100111001001110000...

output:

15956231
23535293
66108782
76299132
84142489
25718171
57561918
32167601
43128707
63301113
9513530
40626665
56101183
89657167
3515827
20572363
78089362
14278373
23319842
91902319
91000725
4434717
85582003
7705024
51561460
41307111
80160111
79814243
19629867
31981630
5816326
61400176
53220176
4104664
...

input:


output:

1140

result:

ok m = 1140

Test #21:

score: 12
Accepted
time: 16ms
memory: 3852kb

input:

1000
2280
01011100011001111001111101100010110000000000000000000000000000000000001000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000001000111110100011101011100001101100000010010000000000000000000000000000000001000100010100100110111000000000100000001100101111101...

output:

74786795
93573147
85600935
90665120
82896416
96616323
97955957
39336111
98463811
88462069
92026465
44224203
99956522
15122746
51675409
47004984
22237416
54252106
11959605
59061471
29657823
27401036
86636055
13228859
71794051
3143320
82164887
19741981
82284301
70613471
69931863
73167536
48280038
1346...

input:


output:

1140

result:

ok m = 1140

Test #22:

score: 12
Accepted
time: 16ms
memory: 3820kb

input:

1000
2280
01110111110001011000110101101110100000000000000000000000000000000010000000000000000000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000000000011010011010100000110100101111110001011000000000000000000000000000000...

output:

31525101
22182906
29170262
25825379
2068254
93493773
75739192
38626545
71425256
56335590
19693904
30250295
69640025
52097195
8719174
90761332
5776489
98599527
5153
19792597
32493647
58078516
5113056
50009050
99941217
12817120
24728804
82273526
64862353
44063931
42979108
38152512
60383371
33602192
53...

input:


output:

1140

result:

ok m = 1140

Test #23:

score: 12
Accepted
time: 17ms
memory: 4120kb

input:

1000
2280
10101111010111111010100011010101000000000000000000000000000000000000000000000000001000000000000000000000000000000000000100000000000000000000000000000000000110010111110011111110111000110000000000000000000000000000000110101000001000001000110110100111011000101110000010111110111110000110010000...

output:

82375883
98207185
99007767
3149992
63037023
50029778
60358442
98234828
52042169
47711968
10796067
73904370
80286483
45778381
11060564
98121223
86070418
98508168
67753675
64433577
2135698
1746208
34283687
63616705
40286143
5001417
61578467
51153199
55871219
90367890
64496912
15805659
80143696
1933056...

input:


output:

1140

result:

ok m = 1140

Test #24:

score: 12
Accepted
time: 9ms
memory: 3860kb

input:

1000
2280
00000100000000000000000000000000000000000000100000000000000000000000000000010000000000000000000000000000000010000000000000000000000000000000100000000000000000000000000000000000000000001000000000000000000000000000000000000000000110011000001101001110010000001111000100100111000000000000000000...

output:

13544396
57937115
6939462
4313715
31368081
42042541
27189738
83387020
26212662
80295786
59324332
38942968
56934885
2275789
41665360
25148670
52230998
43682769
9924503
71318763
56405382
1015412
92358146
82223209
40504249
76158997
95152
64200070
96841388
98832871
82244882
26110101
92134465
50632744
34...

input:


output:

1140

result:

ok m = 1140

Test #25:

score: 12
Accepted
time: 11ms
memory: 3836kb

input:

1000
2280
00001110001101011001111000111010000011001000000000000100000000000000000000000001000000000000000000000000000000000100000000000000000000000000000000001000000000000000000000000000000000000000010000000000000000000000000000000110001010110110110110011111011110110000100011001001011010000010110110...

output:

100000000
99999999
99999998
99999997
99999996
99999995
99999994
99999993
99999992
99999991
99999990
99999989
99999988
99999987
99999986
99999985
99999984
99999983
99999982
99999981
99999980
99999979
99999978
99999977
99999976
99999975
99999974
99999973
99999972
99999971
99999970
99999969
99999968
99...

input:


output:

1140

result:

ok m = 1140

Test #26:

score: 12
Accepted
time: 16ms
memory: 3880kb

input:

1000
2280
01000001010111111101010100010001101001101000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000000010000000000000000000000000000001000000000000000000000000000000000000000000000000011010001111111110011101000011000111111000110001000111000100101110000010000...

output:

100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
...

input:


output:

1140

result:

ok m = 1140

Test #27:

score: 12
Accepted
time: 14ms
memory: 3852kb

input:

1000
2280
01100001010101111001110111110110100000000000000000000000000000000000100000000000000000000000000000000000000000000000010000000000000000000000000000010110001100111000111011110110000001110000000000000000000000000000001000000000000000000000000000000000000000100000000000000000000000000000000000...

output:

61691330
49995812
22369621
2097151
22369605
5655706
22369621
16842240
26516068
6463833
88647917
44739114
9587953
2081023
1048511
32506176
32898816
2175
5850
29358080
49990092
12
8607
4190208
22369749
523264
22369621
99990001
31489792
16515583
50001753
4351
1531
16515071
33554431
44739114
8310
8228
3...

input:


output:

1140

result:

ok m = 1140

Test #28:

score: 12
Accepted
time: 16ms
memory: 4120kb

input:

1000
2280
01100101001100001001111100100001100111110000000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000100000000000000000000000000000000000000000000010000000000000000000000000000000000100000000000000000000000000000000010000000000000000000000000000000000000001...

output:

19290547
4194303
49990940
50006025
82213661
99996733
8388600
99992197
4194272
3145728
33554432
3583
28517548
50004217
258048
1032319
9437183
23410100
22369621
262016
26744824
89478485
524351
23958363
16777087
4877
33553400
44739114
33545216
6142
44214954
99995551
44739306
22369557
22369365
1191050
7...

input:


output:

1140

result:

ok m = 1140

Test #29:

score: 12
Accepted
time: 22ms
memory: 3804kb

input:

1000
2280
11101110111011000100001110100011101000000000000000000000000000000000001000000000000000000000000000000000001000000000000000000000000000000011110111010101101100011100101110000000000000000000000000000000001000000000000000000000000000000000000000000010000000000000000000000000000000000001000000...

output:

12148616
36960772
33554430
1
26308868
89478485
99993925
1920
33423360
44739242
99996882
16
16
4178175
54136687
33550336
44739242
22107989
99993755
44739242
22369621
33489023
99992679
99990455
44739258
69602424
130560
4013
50009628
59369637
17825791
28461862
49996420
30758229
2031616
91627683
9999929...

input:


output:

1140

result:

ok m = 1140

Subtask #5:

score: 0
Wrong Answer

Test #30:

score: 15
Accepted
time: 15ms
memory: 3856kb

input:

1000
2280
11110110111001111111011100010000000000000000000000000000010000000000000000000000000000000000000000000001000000000000000000000000000000000000000000010101110100110110110100010111110000010000000000000000000000000011111001110000000010000000101011110111000101110110000110110111111100110000101000...

output:

4546432148
30413720335
64676441097
14822382585
53698083736
74089682971
27607704419
15413953650
610991477
57301157297
86072616834
28923701798
37924130772
64471546997
69848357389
72672019255
11349616347
15013636082
23754476592
79891878197
58618203138
11772720766
1344307407
99482310933
42479246869
3281...

input:


output:

1140

result:

ok m = 1140

Test #31:

score: 15
Accepted
time: 12ms
memory: 3820kb

input:

1000
2280
11000010010001001000010011101111101110100010000000000000000000000000000000000000000100000000000000000000000000000000000000001000000000000000000000000000000001111011110101010100000010110000101101001010110100110110010111001110111100000000000000000000000000000000000000100000000000000000000000...

output:

81121541265
67824082007
12814662619
11913434985
5478389391
23715785263
87267905905
58842463115
35294626604
27898718567
1037360815
92968125883
98452935282
32337222080
22349606935
32673329459
78326460781
84811974591
85320335499
82887668869
13171557568
29478862190
51697745861
28561201308
57555237849
80...

input:


output:

1140

result:

ok m = 1140

Test #32:

score: 15
Accepted
time: 17ms
memory: 3776kb

input:

1000
2280
10000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000100000000000000000000000000000000000000001000000000000000000000000000000000000001001101111110010111010100101011010000000000000000000000000000000000000000001000000000000000000...

output:

72763468402
35919173078
89821673065
83626819546
15516395517
93439771184
48769891560
85622835729
33452865411
5551802860
57588497949
25703640559
31522355965
50962164217
59442352877
288570071
32336815864
50975416871
99958378026
78724287780
12032607775
87729057614
64950115324
47227561883
8925151818
4589...

input:


output:

1140

result:

ok m = 1140

Test #33:

score: 15
Accepted
time: 17ms
memory: 3812kb

input:

1000
2280
10000000000000000000000000000000000100000000000000000000000000000000000000000010000000000000000000000000000000000000000000000001000000000000000000000000000000001011000000110110110000001110100100100111001010000000000000000000000000000000001001101000111010011011110110001101110000100100110100...

output:

82238727287
71906507210
49571464593
37906706994
63771066149
58647519519
70217588781
88447485096
25138813519
96362938257
1838163037
53422801285
2336254259
75340440232
19014710500
64979623347
4133460007
89985950220
19454384597
27914761527
23866302679
56150609088
35282171373
45211350832
51454565298
182...

input:


output:

1140

result:

ok m = 1140

Test #34:

score: 15
Accepted
time: 9ms
memory: 3888kb

input:

1000
2280
00011010011101111011001100100010000011101000000000000000000000000000010000000000000000000000000000000000000100000000000000000000000000000000100000000000000000000000000000000000000000100000000000000000000000000000000000000001011111101010110110001001010110001000001000000000000000000000000000...

output:

69188543327
99431485329
89455533767
64803853758
90784816293
2414630217
34075535309
11915710619
82246855931
72360562937
8510675849
59048593061
92734676478
57613782831
73557293576
80056754380
15411760095
91465444920
54790392370
69868221516
10010356646
8602470848
27786016668
9379849080
24213801618
3998...

input:


output:

1140

result:

ok m = 1140

Test #35:

score: 15
Accepted
time: 16ms
memory: 3832kb

input:

1000
2280
00011010101101011000000101100011001011011100000000000000000000000000000000000100000000000000000000000000000000000001000000000000000000000000000001000000000000000000000000000000000001000000000000000000000000000000000000000000001101111111101100001100101011001010000000000000000000000000000000...

output:

100000000000
99999999999
99999999998
99999999997
99999999996
99999999995
99999999994
99999999993
99999999992
99999999991
99999999990
99999999989
99999999988
99999999987
99999999986
99999999985
99999999984
99999999983
99999999982
99999999981
99999999980
99999999979
99999999978
99999999977
99999999976...

input:


output:

1140

result:

ok m = 1140

Test #36:

score: 15
Accepted
time: 15ms
memory: 3900kb

input:

1000
2280
10110110100101010011110111100000111000000000000000000000000000000000000000000000000010000000000000000000000000100000000000000000000000000000000000000001000000000000000000000000000000000100000000000000000000000000000000000010011101001001010100010101101001000000000101100011000000000000000000...

output:

100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
100000000000
1...

input:


output:

1140

result:

ok m = 1140

Test #37:

score: 15
Accepted
time: 8ms
memory: 4124kb

input:

1000
2280
10000000000000000000000000000000000000100000000000000000000000000000000100000000000000000000000000000000010000000000000000000000000001000000000000000000000000000000000000000100000000000000000000000000000000100000000000000000000000000000000000000000000100000000000000000000000000000000000000...

output:

63
45812525738
60845370026
16777215
6949788660
82187441051
491520
68719435776
99999690568
47640940064
23040709909
49999973510
20021061229
37223049899
22906494293
23443363141
22906492245
22906492245
7286862438
268431360
268435487
23443363157
45804595882
262544
134218751
251660
17179836416
2147483647
...

input:


output:

1140

result:

ok m = 1140

Test #38:

score: 0
Wrong Answer
time: 18ms
memory: 3828kb

input:

1000
2280
00110101101101010000101101010111001000110000000000000000000000000000000010000000000000000000000000000010000000000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000111001111010111100011101101000101000000000000000000000000000000000...

output:

66978303
4294969599
2093055
34357673984
22367393362
8573190016
1023
50000233241
49999817456
99999994623
44011
16744448
1159
34359736319
22906492245
158782
45814033066
22906500437
34359706112
14181780068
8589930496
57266230549
45810887338
22906492245
532741888
25081891007
22906492245
34359214080
4581...

input:


output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #6:

score: 0
Skipped