QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#153049#6824. Demonstrational Sequencesqzez#AC ✓89ms16156kbC++141.1kb2023-08-29 10:03:182023-08-29 10:03:18

Judging History

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

  • [2023-08-29 10:03:18]
  • 评测
  • 测评结果:AC
  • 用时:89ms
  • 内存:16156kb
  • [2023-08-29 10:03:18]
  • 提交

answer

#include<bits/stdc++.h>
#define Gc() getchar() 
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=(1<<20)+5,M=100+5,K=600+5,mod=1e9+7,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(time(0));
int f[N],Q,B[N];ui A[N],P;
void Solve(){
	ull a,b;
	scanf("%llu%llu",&a,&b);
	Me(f,-1);
	A[0]=a%P;B[0]=a%Q;f[B[0]]=0;
	for(int i=1;;i++){
		A[i]=(1ull*A[i-1]*A[i-1]%P+b%P)%P;
		B[i]=(1ull*B[i-1]*B[i-1]%Q+b%Q)%Q;
		if(f[B[i]]==-1)f[B[i]]=i;
		else{
			if(__gcd(1ll*A[i]-A[f[B[i]]]+P,1ll*P)==Q) printf("1");
			else printf("0");
			return;
		}
	}
}
int main(){
	int t;
	scanf("%u%d%d",&P,&Q,&t);
	// scanf("%d",&t);
	// t=1;
	while(t--) Solve();
	cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 11264kb

input:

15 5 5
1 1
1 2
2 4
4 8
8 16

output:

11010

result:

ok "11010"

Test #2:

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

input:

998244352 1048576 3
2022 924
12345678 1234567
23333333 6666666

output:

001

result:

ok "001"

Test #3:

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

input:

100237 100237 10
1244422970085542683 6256585832417115176
11178595626727644735 679276059713497324
5646838801370008540 6709514788466664568
9971158657914728691 8724448042786063799
9867649407902336110 2614925263502318093
1990105069810770727 8671216841234378816
7965667786524489724 6722337513023700570
246...

output:

1111111111

result:

ok "1111111111"

Test #4:

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

input:

1000000007 1 200
1244424352052424851 13102057264748565738
10964128241743967010 11238647915096906960
9602909082986968021 14247804011443894396
13231275623402659328 11122445945926639224
1819715673773979255 15011227386780949150
10389668459305004672 13595253579372877142
136927098471150438 141908708541553...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #5:

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

input:

1 1 200
1244422970079336291 4707347560601392081
16633665001192110076 15773758607538398243
11070497290011093392 11929979209055974561
8355738147346006300 6479245221430563815
10109334084151275293 11867087657669754231
17442584295523326999 11181890936205849132
9065910826445511105 4364106058213150008
3158...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #6:

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

input:

1829276567 1223 200
1244422970077270675 3806627635127557106
13984072790700162529 11560843058580181248
18218320506679528544 11095342096011758221
4400021764111680243 2513593206800052431
18199847053143773541 12194057128449124778
13449463383710867755 15111229049249507634
9142159878193341647 851735763810...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #7:

score: 0
Accepted
time: 29ms
memory: 11252kb

input:

1916775961 43781 200
1244422991562533611 2581648536462341184
10846740824576506379 9993690399888017205
8345302117372117052 12258730889585496219
6487130277971010241 11996418174856728756
8151541988194450093 17962020692109166031
5265702935744667861 3426174342122309619
3337825504340444832 108442264083652...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #8:

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

input:

1992104689 44633 200
1244423004569553187 708151091329533332
9122468538725959348 6266937734283537059
17378118143373524488 14143033550582754474
9766586826768167785 1594616520143492866
734438740803221400 11158266026263179425
460036223567287536 4242791159789103332
17830443150457246178 422414602667113372...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #9:

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

input:

200474 100237 200
1244422970085542683 6256585832417115176
11178595626727644735 679276059713497324
15646838801370008540 16709514788466664568
9971158657914728691 8724448042786063799
9867649407902336110 2614925263502318093
1990105069810770727 8671216841234378816
17965667786524489724 6722337513023700570...

output:

00000000111111010001100001000000010001111000110000000010001010010000100001001001010100100011010000100000100110100000000000001000000010000000000000000000000100010000010000001000000010000000010110000000

result:

ok "000000001111110100011000010000...0001000000010000000010110000000"

Test #10:

score: 0
Accepted
time: 29ms
memory: 11676kb

input:

200474 2 200
1244422970290369323 10652099068730767710
8319150041957358027 4252860857770083514
2283720720491098640 10687885864933740120
2825325290598596007 6440406404796000441
6950945943062257465 15095351257240999518
2718104921152369583 1084988046635922392
16727496739401426409 4394616015239803414
169...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #11:

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

input:

4263743276 45077 200
1623855933086673195 1394720197804715148
594107206097182228 18010286562889463890
9232604372259259000 11733065843529966425
5391787691872768215 17960957873981251752
3586770739608645055 9993896394458670052
13988642877924042007 4434275232993882359
17191799348415529968 309677586807292...

output:

00000000000000000001000000000100000000000000000000000000000000000000000000000000000000000010010000000000000000100000000000000000000000100000000000000010000001000000000000100000000000000000000000000000

result:

ok "000000000000000000010000000001...0100000000000000000000000000000"

Test #12:

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

input:

2243653896 79427 200
7085613735056938731 7108859055092139649
5695922196596095831 16949890178661708151
990145800953174351 16245094806650297114
14882674693247816808 11363366359950489284
7394995576056186215 2589960776998221148
8800920093793606635 1967301338500188756
8024931924200017420 2272503502062228...

output:

00000000010000000000000100000000000000010000000000000000000000000000010000000000001100001000000000000000000000000000000001001000000000000000000000000000000000000000000000010000000000000000000000000000

result:

ok "000000000100000000000001000000...0010000000000000000000000000000"

Test #13:

score: 0
Accepted
time: 34ms
memory: 10920kb

input:

2890356642 644881 200
3338746092145011427 2383740701170010876
2950669909698463161 11412658585846770980
9581681182959202729 12394854403860355917
11974501157757355058 11637902927865695413
17106521716400010010 10095864596609543535
17286559350838320107 9093692469284348154
7890467507278881429 33121849106...

output:

00000000000100000000000000000000000000000000000010000000100000000000001000000000000000001000000000000000000000000000010000000100101000001100000010000000000000000000000000000000000000000000100000000000

result:

ok "000000000001000000000000000000...0000000000000000000100000000000"

Test #14:

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

input:

1800396632 214129 200
11981151872260927763 880061793948709214
3421011936831395463 12066611705686951714
16269052760398633712 17446962064910375058
16831508813820937321 11050585060190750711
16932844042935971401 12586068229506586939
11411308914722614205 1200292887132725511
10614703641719321462 232217329...

output:

00000000000000110011100000011001111000000010100000100000100000000000000100000000001100010100000110100000000000101000010110000000001001011100001010000010010000100000001001100000000001000001001100011001

result:

ok "000000000000001100111000000110...1100000000001000001001100011001"

Test #15:

score: 0
Accepted
time: 29ms
memory: 11492kb

input:

3015370282 183439 200
10761746441729398571 10660863783446868085
15532810238104375115 13584557295679235643
14578065710103350759 8400985091796697052
4806777690723159905 16714839711297371203
11465540402873333574 18426053423616298971
9490365436480928555 5683725064365786074
14141155268528021944 164781404...

output:

00001000001101000100000001101010001100000011000001010000001000000010000000000000000000100000111000011001001000110110010000000010000000001000110000011001100100000001000000001010000010000000001100100010

result:

ok "000010000011010001000000011010...0001010000010000000001100100010"

Test #16:

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

input:

3010226974 38669 200
6229984487236849875 11253164618458158674
933313251596761837 1457608186440777540
8513825683200214409 13042665712294984385
18021434368478935104 3106051298410513939
1337957873492806031 448188000892022312
13559383547127008999 16444342020353803624
4597962444641028423 1395535421245956...

output:

00010011100011010000000100001101000000000010010010001100011101000000100000100001000000000010001000000000110000000001010001000000100100000100110011000001000100101100010000100000010001010000000001100000

result:

ok "000100111000110100000001000011...0100000010001010000000001100000"

Test #17:

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

input:

1450829397 42297 200
6464188415006582995 11847378626214233168
653828387714095807 1218528646888160694
9535608027473123576 17725435475406126307
4897155301533237423 4497784468643482629
11607442738206304415 3888984380003188830
16998045123593285245 1598115408300503068
16427243992592303185 108623216376898...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #18:

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

input:

3993730999 49991 200
1267318159762658987 7715736912746720613
5920633216638164008 15462566246494141501
309088298903197057 5711099583701730195
3275208114722011420 17078263693717899931
6260119956203597146 3063344796794825513
9971648571282262294 5905459163695299822
10163673657705786070 19586838804521803...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #19:

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

input:

3399695197 1597 200
12282764110292219667 10175223850747253213
914573822088598428 2054057241588998809
14020233737663310879 4931899672104815644
14585912693978503289 5764197171383996112
11319683079831828418 7598099624679204821
3689119258925368769 12599506557859798103
8159966522050345775 177314940106366...

output:

00000010011000011011010100100101100000100111100001101110001000100000101100001010000001001001001101111011011010111000100101100010100010000011100000001111001111000010001010010010111010101000011100111111

result:

ok "000000100110000110110101001001...0010010111010101000011100111111"

Test #20:

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

input:

1385551729 37223 200
11985738725601399011 15618131115372441874
7187824000244420906 3642469162490901854
3614598898017923139 14027809809889791621
6205661285095565811 2922193180403985702
10103090459850640319 17015700717628021588
8177288862893080837 435447560914914078
197949395414949229 4001069487946731...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #21:

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

input:

1083823682 23279 200
15684325431962405523 8433681852070775172
13474426459209495616 14174875513409449648
8910528620974308970 5706618201119690706
15123310027645592100 6520493119264402856
387169615810312407 11180278887031580439
7555818783786929613 12530167364525789491
5393562328341960198 13003070727899...

output:

00000100000000101101000000010000000001000000000000000000110000110100010000010000010110100110000001000100001000000011011000001010011000100010000111100000010000000000000110000101000000000111010000000010

result:

ok "000001000000001011010000000100...0000101000000000111010000000010"

Test #22:

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

input:

387577969 19687 200
15372426147163411219 5533655081692008550
12366647130381390567 1929712314927021928
3698590470448574409 17082153170721925025
17043770277665394548 11544205145567850411
8833626130870834697 16349640329478100713
11064619395500248796 8424182672569001542
13851977029140956580 744606090060...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #23:

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

input:

3873713627 821 200
15097926161850338475 12917426832373376135
3905980799756616689 14457241018068418368
18172209998508976472 14822340141588079319
13834857856171537284 8092811627217260600
1001106932892283142 11826088602133344322
12565574611432283200 4348855760755314480
14605575407312502987 176296965657...

output:

10011001001000000001101000100100000100000001110001001011011101101110000010001100101011100000010000101000010111111000101110101111110000011000100001001011000101100000000110100001000110100110001001001001

result:

ok "100110010010000000011010001001...0100001000110100110001001001001"

Test #24:

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

input:

2021777520 661360 200
15448990377516076779 1894682813497359207
4922599530336199882 14319640974834563699
10329605818550988115 4527978983734524729
8815422014494239657 14516182262530802534
15097324708387555512 12522765761101598507
8484295737234258755 12943644486890448790
17313357466267995391 1519909507...

output:

00010000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000010000000000000000010000000000000010001001000000000010000000000000000000000

result:

ok "000100000000000100000000000000...0000000010000000000000000000000"

Test #25:

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

input:

1458808611 121537 200
12301959097406854291 17040979541212692069
8109151868531013993 9578352332332451940
4399912382605787515 4144896932039778431
15585646174745758191 11471751162068477474
13102521344487328091 17230194456269630836
2631404103104586329 3137628700358173535
16690112367778128646 15430696922...

output:

00100100000010000000000000010000000000100000000000000000000000000000000101001000000000010000000000100001000010000101000000000000000100000000000001000000000000000000000000000010000000000000110000001000

result:

ok "001001000000100000000000000100...0000010000000000000110000001000"

Test #26:

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

input:

1028918016 150912 200
11437220167161122003 11957365594153618951
4562131823660465785 14943420548063690592
6168895836742028285 18003015929279314973
8970760782325363774 9956774643011890103
13813446810769728541 14854656819702084923
14121676957325194608 11438577852354655419
15598215988433002420 505822436...

output:

00000000001000001000100000000000000000000000000000000100000010000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000000000000000001000000000000000000010000000000000

result:

ok "000000000010000010001000000000...0000000000000000010000000000000"

Test #27:

score: 0
Accepted
time: 29ms
memory: 10196kb

input:

3955638000 659273 200
1541809018270831763 12435252225506364273
15813538637927478957 1269661392732180280
18200755976468154638 15331562299291664712
13847017599410591632 17162774197401758848
7244421820033633426 6321106656332489175
16151171859262761977 14898981009533086747
11156556305507205494 624741790...

output:

00000000000000000000000000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #28:

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

input:

4148117169 443317 200
6726735868060414235 15429717590626717962
7632224404764345485 13181278096699277493
15037429980634344550 17556680482793996319
1577417026056943313 4475190502037150518
3022903162757614279 8239097518711596720
16159478423230940905 14244085246638843116
7726617819656179405 348765853358...

output:

00000101000000100000000000000000000110100100000000000000010000000100011000000000001000000010000000000010000000000010000010000000000100010000000100000001001000100100000100000000000100010100100000000000

result:

ok "000001010000001000000000000000...0000000000100010100100000000000"

Test #29:

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

input:

3745074312 303294 200
6154847130053399211 7666081901670843350
8372441669352281164 14860597039340508768
7429714926365835105 13673323545778730730
17811209799170882570 12225556040954985031
402729822891481921 8930426810727069876
6307000249348832614 9895848309746534191
16653476027348064386 15420231002837...

output:

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #30:

score: 0
Accepted
time: 89ms
memory: 10648kb

input:

3562804797 571787 200
5861035115335045851 7488324874273849974
11936435189281307001 10191770578884071596
8193159155317745124 12074746786315026732
1570816078908708388 16369341365959367558
4154734727612074794 9416572685323813346
2327130396162490448 17615786408483273317
16576389478255696318 167268024351...

output:

00000000000000010000100100001000001000000000000000000000100010000000000010010100101010000000000000100000000000000000000000000100010000000000000010000000000011000000000100000000100000001000000000001001

result:

ok "000000000000000100001001000010...0000000100000001000000000001001"

Test #31:

score: 0
Accepted
time: 52ms
memory: 10260kb

input:

407151286 896809 200
2119406909347255507 16505979667575087985
14530718164236990146 4552843034666130608
4457431723411970189 8496264330777961156
14343282090607326536 8569127963670416560
11096030642614752137 7041694068391090581
8522395130072390171 14594511210980993113
8466261157149756339 38674552088770...

output:

10000000000000000000000000110000000000000010010001100000000000000000000000000000001100000000010000010000000000001000000000000000000000000000000000000000100000000000000100000100000000000000000000000000

result:

ok "100000000000000000000000001100...0000100000000000000000000000000"

Test #32:

score: 0
Accepted
time: 34ms
memory: 11256kb

input:

2158868557 29929 200
15107648077084636883 6720447264594634985
11372930115959700029 18220932055843948984
10110334928087254148 14444159525729854130
11297069973575515447 16243857233919235414
4698036962078604294 4785471593754741474
4354509919739472071 9040938602111262607
12092231932223783196 40521034443...

output:

00110001011111111000100111111111100101011110100111001011111000011010111011011101010110110111001111111110011111111111110111101011011011001000001101100011111101001100111111111111110111111111111010111011

result:

ok "001100010111111110001001111111...1111111110111111111111010111011"

Test #33:

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

input:

3317191919 502681 200
2123000934898153171 2709310827977995433
9237596180856569612 4396535865790369551
8461939493533454933 9608808493036617889
6607658762372698442 16399952109484999286
4308521447099535072 7872462170509533268
17730904923247649272 13138775440692213461
10481272481827149658 37098345824037...

output:

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #34:

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

input:

3159123175 571787 200
3077687142564884779 1305505021462987070
17896448496766605959 4021474465611695787
5346984082463627879 10630493983798613772
5430939151412425516 13411283361796853011
5200619590418052859 13396712812086920571
343456948739184125 5405452326595436528
3175671029969359518 159981188763944...

output:

00000010000001000000000000010000010000000001100000000110000000000000101000100000100000000000000000000010000000011000000010000100001101100000000000000010000000000000100000000001010001000000100000001001

result:

ok "000000100000010000000000000100...0000001010001000000100000001001"

Test #35:

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

input:

1876169462 357911 200
2420305580504511643 13123468769991024829
16668162295231986842 14097806323027050593
361219232043303579 123038549795052349
2448985275644656454 7013255710403350124
9009642582465229503 6911937933204184653
13497416328058050201 12893738182217744068
209889392131397362 5421641135404863...

output:

11000000000000000000000000000001000000000000001000000010000001001000000000010000001000000100000000000000010000000000000000000000000000001010010001000000110100000000000000000100100001000000000000100000

result:

ok "110000000000000000000000000000...0000100100001000000000000100000"

Test #36:

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

input:

593998894 160801 200
6731076452209208611 1290530937597760811
4706166100603620687 126179105047908978
15913340257935073139 6343377276353971445
14619792330619945236 17635625741500933144
9492975621174498218 4773428473051690896
12259506218362189374 17539511366284229157
8609263614901733883 591277313072113...

output:

00000000000000000000000000000000000000000000000001000000000100000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000100000000000000000100000000000000000000000

result:

ok "000000000000000000000000000000...0000000100000000000000000000000"

Test #37:

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

input:

4294967295 65537 200
1244422991562533611 2581648536462341184
10846740824576506379 9993690399888017205
8345302117372117052 12258730889585496219
6487130277971010241 11996418174856728756
8151541988194450093 17962020692109166031
5265702935744667861 3426174342122309619
3337825504340444832 108442264083652...

output:

00000000000000000000000000000000000000000010000000000000100000000000000000000010000010000000000000000010000000000000000000001010000100000001000000000000000000000000000000000000000010000000000000000010

result:

ok "000000000000000000000000000000...0000000000010000000000000000010"

Test #38:

score: 0
Accepted
time: 29ms
memory: 11624kb

input:

1048576 32768 200
1623855933086673195 1394720197804715148
594107206097182228 18010286562889463890
9232604372259259000 11733065843529966425
5391787691872768215 17960957873981251752
3586770739608645055 9993896394458670052
13988642877924042007 4434275232993882359
17191799348415529968 309677586807292459...

output:

11111101101110111011101010111110010110110011110101100010000101111011101110010011110110001100001111110111111111111110111001101101010011100011011100101011110011011001011110100001111101101011011110011010

result:

ok "111111011011101110111010101111...0100001111101101011011110011010"

Test #39:

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

input:

2147483648 65536 200
1623855933086673195 1394720197804715148
594107206097182228 18010286562889463890
9232604372259259000 11733065843529966425
5391787691872768215 17960957873981251752
3586770739608645055 9993896394458670052
13988642877924042007 4434275232993882359
17191799348415529968 309677586807292...

output:

10011111000000100011100101000011010010100011001111110001111110001111010110001110011011110111110100101010101111001111101110000011111110111101100111101001111110111111111001011001001010101101110010111011

result:

ok "100111110000001000111001010000...1011001001010101101110010111011"