QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#218908 | #7148. Inverse KMP | SolitaryDream# | AC ✓ | 18ms | 35968kb | C++17 | 601b | 2023-10-18 20:25:29 | 2023-10-18 20:25:30 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,s,t) for(int i=(s),_t=(t); i<=_t; ++i)
typedef long long ll;
const int N=1e6+50;
const int Mod=1e9+7;
vector<int> E[N];
int f[N],g[N];
ll res=1;
void dfs(int x,int c) {
if(g[x]) res=res*(c--)%Mod;
for(auto y: E[x]) dfs(y,c);
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n,c;
cin >> n >> c;
assert(n<=200000);
FOR(i,2,n) cin >> f[i];
FOR(i,1,n) E[f[i]].push_back(i);
FOR(i,1,n) if(f[i]==0) g[i-1]=1;
dfs(0,c);
cout << res << '\n';
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 30628kb
input:
3 3 0 0
output:
12
result:
ok 1 number(s): "12"
Test #2:
score: 0
Accepted
time: 0ms
memory: 29688kb
input:
5 1000000000 1 2 3 4
output:
1000000000
result:
ok 1 number(s): "1000000000"
Test #3:
score: 0
Accepted
time: 0ms
memory: 29716kb
input:
10 733645394 1 0 0 0 1 0 0 0 1
output:
837768026
result:
ok 1 number(s): "837768026"
Test #4:
score: 0
Accepted
time: 6ms
memory: 29288kb
input:
10 467028359 1 0 1 2 2 3 4 5 6
output:
116396120
result:
ok 1 number(s): "116396120"
Test #5:
score: 0
Accepted
time: 3ms
memory: 29892kb
input:
10 200411323 1 0 0 0 0 0 0 0 0
output:
65350942
result:
ok 1 number(s): "65350942"
Test #6:
score: 0
Accepted
time: 0ms
memory: 30832kb
input:
10 228761583 1 2 3 4 0 1 2 0 1
output:
786745156
result:
ok 1 number(s): "786745156"
Test #7:
score: 0
Accepted
time: 6ms
memory: 30468kb
input:
10 107368740 1 2 0 1 2 0 1 0 0
output:
88006964
result:
ok 1 number(s): "88006964"
Test #8:
score: 0
Accepted
time: 3ms
memory: 30596kb
input:
10 407905834 0 1 1 0 0 1 2 0 0
output:
107487330
result:
ok 1 number(s): "107487330"
Test #9:
score: 0
Accepted
time: 0ms
memory: 30008kb
input:
10 141288798 0 0 1 0 0 1 2 1 1
output:
772632813
result:
ok 1 number(s): "772632813"
Test #10:
score: 0
Accepted
time: 0ms
memory: 29196kb
input:
10 874671763 0 1 1 2 3 2 3 4 5
output:
759501604
result:
ok 1 number(s): "759501604"
Test #11:
score: 0
Accepted
time: 0ms
memory: 29248kb
input:
10 608054727 0 0 0 0 0 0 0 0 0
output:
415094542
result:
ok 1 number(s): "415094542"
Test #12:
score: 0
Accepted
time: 0ms
memory: 29892kb
input:
10 341437691 0 0 0 0 0 0 1 1 2
output:
272061812
result:
ok 1 number(s): "272061812"
Test #13:
score: 0
Accepted
time: 3ms
memory: 30336kb
input:
10 82166274 0 0 0 0 1 0 0 0 0
output:
592085612
result:
ok 1 number(s): "592085612"
Test #14:
score: 0
Accepted
time: 0ms
memory: 29504kb
input:
10 520581942 0 0 0 1 2 3 0 0 0
output:
327471030
result:
ok 1 number(s): "327471030"
Test #15:
score: 0
Accepted
time: 3ms
memory: 29324kb
input:
10 548932202 0 1 1 1 0 0 0 1 1
output:
294567884
result:
ok 1 number(s): "294567884"
Test #16:
score: 0
Accepted
time: 3ms
memory: 30520kb
input:
10 282315166 0 0 0 0 0 0 0 1 0
output:
919759843
result:
ok 1 number(s): "919759843"
Test #17:
score: 0
Accepted
time: 6ms
memory: 30520kb
input:
10 15698131 0 0 0 0 1 0 0 1 0
output:
833163239
result:
ok 1 number(s): "833163239"
Test #18:
score: 0
Accepted
time: 0ms
memory: 29716kb
input:
10 611202521 0 1 1 0 0 0 0 0 1
output:
27678335
result:
ok 1 number(s): "27678335"
Test #19:
score: 0
Accepted
time: 3ms
memory: 29164kb
input:
10 489809678 1 0 0 0 0 0 0 0 0
output:
819507315
result:
ok 1 number(s): "819507315"
Test #20:
score: 0
Accepted
time: 0ms
memory: 30160kb
input:
10 928225346 1 0 0 0 0 0 0 0 0
output:
623919994
result:
ok 1 number(s): "623919994"
Test #21:
score: 0
Accepted
time: 3ms
memory: 30224kb
input:
10 661608310 0 0 0 0 0 0 0 0 0
output:
394637933
result:
ok 1 number(s): "394637933"
Test #22:
score: 0
Accepted
time: 0ms
memory: 29468kb
input:
10 689958570 1 2 0 0 0 1 0 1 2
output:
399231678
result:
ok 1 number(s): "399231678"
Test #23:
score: 0
Accepted
time: 6ms
memory: 30760kb
input:
10 285462961 1 0 0 0 0 1 0 0 0
output:
558713426
result:
ok 1 number(s): "558713426"
Test #24:
score: 0
Accepted
time: 3ms
memory: 29876kb
input:
10 164070117 1 0 0 0 0 0 0 0 0
output:
223245164
result:
ok 1 number(s): "223245164"
Test #25:
score: 0
Accepted
time: 0ms
memory: 30660kb
input:
10 897453081 0 1 1 0 0 1 0 0 1
output:
379778249
result:
ok 1 number(s): "379778249"
Test #26:
score: 0
Accepted
time: 0ms
memory: 29812kb
input:
10 335868750 1 0 0 0 0 0 0 0 0
output:
111155498
result:
ok 1 number(s): "111155498"
Test #27:
score: 0
Accepted
time: 7ms
memory: 30688kb
input:
10 69251714 0 0 0 0 0 0 1 0 0
output:
605832811
result:
ok 1 number(s): "605832811"
Test #28:
score: 0
Accepted
time: 0ms
memory: 29860kb
input:
10 664756104 0 0 0 1 2 0 0 1 2
output:
723934876
result:
ok 1 number(s): "723934876"
Test #29:
score: 0
Accepted
time: 0ms
memory: 30508kb
input:
10 398139069 0 0 0 1 0 0 0 0 0
output:
763669756
result:
ok 1 number(s): "763669756"
Test #30:
score: 0
Accepted
time: 6ms
memory: 30676kb
input:
10 276746225 0 0 0 0 1 1 0 0 0
output:
276748725
result:
ok 1 number(s): "276748725"
Test #31:
score: 0
Accepted
time: 6ms
memory: 31076kb
input:
10 305096485 0 1 0 0 0 0 1 0 0
output:
773689119
result:
ok 1 number(s): "773689119"
Test #32:
score: 0
Accepted
time: 3ms
memory: 29128kb
input:
10 743512153 0 0 0 0 0 0 0 0 0
output:
280858174
result:
ok 1 number(s): "280858174"
Test #33:
score: 0
Accepted
time: 6ms
memory: 30932kb
input:
10 339016544 0 0 1 1 0 0 0 0 0
output:
483300506
result:
ok 1 number(s): "483300506"
Test #34:
score: 0
Accepted
time: 3ms
memory: 30272kb
input:
10 72399508 0 0 0 0 0 0 0 1 0
output:
162801742
result:
ok 1 number(s): "162801742"
Test #35:
score: 0
Accepted
time: 0ms
memory: 29064kb
input:
10 805782473 1 0 0 0 0 0 0 0 0
output:
715278577
result:
ok 1 number(s): "715278577"
Test #36:
score: 0
Accepted
time: 0ms
memory: 30404kb
input:
10 684389629 1 0 0 0 0 0 0 0 0
output:
768263229
result:
ok 1 number(s): "768263229"
Test #37:
score: 0
Accepted
time: 0ms
memory: 29836kb
input:
10 417772593 0 1 0 0 0 0 0 0 0
output:
371098342
result:
ok 1 number(s): "371098342"
Test #38:
score: 0
Accepted
time: 0ms
memory: 29660kb
input:
10 718309688 0 0 0 0 0 0 0 0 0
output:
857450011
result:
ok 1 number(s): "857450011"
Test #39:
score: 0
Accepted
time: 0ms
memory: 29920kb
input:
10 451692652 0 0 0 0 0 0 0 0 0
output:
130408898
result:
ok 1 number(s): "130408898"
Test #40:
score: 0
Accepted
time: 3ms
memory: 29916kb
input:
10 480042912 0 0 0 0 0 0 0 0 0
output:
601322583
result:
ok 1 number(s): "601322583"
Test #41:
score: 0
Accepted
time: 0ms
memory: 30268kb
input:
10 358650068 0 0 0 0 1 0 0 0 0
output:
810279034
result:
ok 1 number(s): "810279034"
Test #42:
score: 0
Accepted
time: 3ms
memory: 30016kb
input:
10 92033033 0 0 0 1 0 0 1 0 0
output:
551490886
result:
ok 1 number(s): "551490886"
Test #43:
score: 0
Accepted
time: 3ms
memory: 29488kb
input:
10 532620051 0 0 0 0 0 0 1 0 0
output:
763639185
result:
ok 1 number(s): "763639185"
Test #44:
score: 0
Accepted
time: 0ms
memory: 30936kb
input:
10 175452845 0 0 0 0 0 0 0 1 0
output:
844938074
result:
ok 1 number(s): "844938074"
Test #45:
score: 0
Accepted
time: 3ms
memory: 30640kb
input:
10 113252935 0 0 1 1 0 0 0 0 0
output:
156691115
result:
ok 1 number(s): "156691115"
Test #46:
score: 0
Accepted
time: 0ms
memory: 31016kb
input:
10 51053026 0 0 0 0 0 0 0 1 0
output:
925306921
result:
ok 1 number(s): "925306921"
Test #47:
score: 0
Accepted
time: 0ms
memory: 29696kb
input:
10 693885820 0 0 0 0 0 0 0 0 0
output:
305865581
result:
ok 1 number(s): "305865581"
Test #48:
score: 0
Accepted
time: 3ms
memory: 30748kb
input:
1000 415868408 0 1 2 3 1 1 2 3 4 5 4 0 1 1 1 1 2 3 4 5 4 0 0 1 1 2 3 1 2 0 1 2 0 1 1 2 3 1 1 1 1 1 1 2 3 1 1 2 3 1 1 2 3 4 5 6 7 1 2 3 4 0 1 1 1 2 3 1 2 0 0 0 0 0 1 1 2 0 1 2 3 1 1 2 3 1 2 0 0 0 1 2 0 1 2 3 4 0 0 1 1 1 1 1 2 0 1 2 0 1 1 2 0 1 1 2 0 1 1 2 3 1 1 2 3 1 1 2 0 0 0 0 1 1 2 3 1 1 1 1 1 2 3...
output:
321444191
result:
ok 1 number(s): "321444191"
Test #49:
score: 0
Accepted
time: 0ms
memory: 30356kb
input:
1000 482271289 0 0 1 2 3 0 0 0 0 0 0 1 1 1 1 2 3 4 5 1 2 1 1 2 3 4 1 1 2 1 1 1 2 1 2 1 2 3 0 0 1 2 3 0 0 0 0 1 2 1 2 3 4 1 2 3 4 5 1 2 3 0 0 0 1 1 2 3 4 5 6 4 5 6 4 5 1 1 1 1 1 2 1 2 1 1 1 1 1 2 1 1 2 1 2 1 2 3 4 1 1 2 3 0 0 0 1 1 2 3 4 5 1 2 3 4 1 1 2 3 0 1 2 1 2 3 4 5 1 2 1 1 2 3 0 1 2 3 0 1 1 2 3...
output:
902393620
result:
ok 1 number(s): "902393620"
Test #50:
score: 0
Accepted
time: 0ms
memory: 29148kb
input:
1000 403449978 0 1 2 3 1 2 3 1 2 3 1 1 2 0 0 1 2 0 0 1 1 1 1 2 0 1 2 0 0 0 0 1 1 2 0 1 1 1 2 3 1 1 1 1 2 3 1 1 2 0 0 0 1 1 2 0 0 1 2 3 1 2 0 1 1 1 1 1 1 1 1 1 1 2 3 4 0 0 1 1 2 0 0 1 2 0 1 2 3 1 1 1 2 0 0 1 2 3 1 2 0 1 2 3 4 0 0 0 0 0 0 1 1 2 0 1 1 2 3 4 0 0 0 0 0 0 0 1 1 2 3 4 0 1 1 1 2 0 1 2 0 1 2...
output:
204510113
result:
ok 1 number(s): "204510113"
Test #51:
score: 0
Accepted
time: 3ms
memory: 29796kb
input:
1000 469852860 1 0 0 1 2 2 2 3 1 0 0 1 0 0 0 0 0 0 1 2 2 3 1 2 2 2 3 4 5 6 7 3 4 0 1 0 1 2 2 2 2 3 4 5 6 3 4 0 1 2 2 2 2 3 1 2 3 4 5 0 0 1 2 2 2 3 4 0 1 0 1 0 1 0 1 2 2 3 4 0 1 2 3 4 0 0 1 2 3 4 0 0 0 0 0 0 1 2 2 2 3 1 0 0 0 1 0 0 0 1 2 3 4 5 6 3 1 0 0 0 1 2 2 3 4 0 0 1 2 3 4 0 1 2 2 2 2 2 2 2 3 4 0...
output:
643474281
result:
ok 1 number(s): "643474281"
Test #52:
score: 0
Accepted
time: 3ms
memory: 30380kb
input:
1000 685998845 0 1 2 3 1 1 2 0 0 0 0 1 1 1 1 1 1 1 2 0 0 1 2 0 0 1 1 2 0 1 1 2 0 1 1 1 1 1 1 1 2 0 0 1 1 2 0 0 1 1 2 0 1 1 1 1 2 3 4 0 1 2 3 1 2 3 4 0 0 1 2 0 1 2 0 0 1 2 3 4 0 1 1 2 3 1 1 2 0 1 1 2 3 1 2 3 4 5 6 7 1 1 1 1 1 2 3 4 0 0 1 2 3 1 1 1 2 0 0 1 1 1 2 0 1 2 3 4 5 6 2 0 1 1 1 1 2 0 1 2 0 0 0...
output:
297159276
result:
ok 1 number(s): "297159276"
Test #53:
score: 0
Accepted
time: 3ms
memory: 29812kb
input:
1000 556911325 0 0 0 0 1 2 1 0 1 2 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 2 0 0 0 0 1 2 0 0 1 0 0 1 1 1 2 3 0 0 0 1 2 0 0 0 1 0 0 1 1 2 3 4 0 0 0 0 0 1 0 0 0 0 0 1 2 0 0 1 0 0 0 0 1 1 1 2 3 1 1 0 0 1 2 0 1 2 1 2 0 1 0 0 0 0 0 0 0 1 2 1 1 0 1 1 1 1 2 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 2 1...
output:
987134617
result:
ok 1 number(s): "987134617"
Test #54:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
1000 623314206 1 2 0 0 0 1 0 0 1 2 0 1 2 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 2 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 2 3 4 0 0 0 0 0 1 0 0 0 1 2 0 0 0 0 0 1 2 0 0 1 2 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 2 0 1 2 3 3 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 1 2 0 0 0 0 1 0 1...
output:
521615092
result:
ok 1 number(s): "521615092"
Test #55:
score: 0
Accepted
time: 0ms
memory: 30736kb
input:
1000 544492896 1 2 3 0 1 0 0 0 1 2 3 0 0 0 0 0 1 0 1 0 0 1 0 0 1 2 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 1 2 0 0 1 0 0 0 0 1 2 0 0 0 1 0 0 1 2 0 0 0 0 0 0 0 1 0 0 1 2 0 1 2 3 0 1 0 0 0 1 2 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0...
output:
820661355
result:
ok 1 number(s): "820661355"
Test #56:
score: 0
Accepted
time: 3ms
memory: 29004kb
input:
1000 610895777 0 1 2 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 2 0 0 1 2 0 0 1 2 3 4 5 0 1 1 0 0 1 0 1 2 0 0 0 1 2 3 4 3 4 0 1 2 0 0 1 2 3 1 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 2 0 0 0 1 1 2 0 0 1 0 0 1 2 0 1 1 1 2 3 0 0 0 0 0 0 0 0 0 1 2 3 1 0 0 1 1 2 0 1 0 1 2 0 1...
output:
956237350
result:
ok 1 number(s): "956237350"
Test #57:
score: 0
Accepted
time: 6ms
memory: 29380kb
input:
1000 532074466 0 0 0 0 1 2 0 0 1 0 0 1 2 3 1 2 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 2 3 1 1 2 1 1 0 1 0 1 1 1 2 3 0 0 0 1 0 0 1 0 0 0 1 1 0 1 1 2 1 2 1 0 0 1 1 1 0 1 0 1 1 2 0 0 1 1 1 2 3 0 0 0 1 1 0 1 2 3 4 1 2 1 1 1 2 0 0 1 1 1 2 3 1 0 0 0 1 0 0 0 0 0 1 2 3 1 1 1 1 1 2 3 1 0 0 1 1 2 0 1 1 1 1 1...
output:
943032695
result:
ok 1 number(s): "943032695"
Test #58:
score: 0
Accepted
time: 0ms
memory: 30072kb
input:
1000 697954242 0 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 2 3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 2 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 2 3 4 1 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0...
output:
13101455
result:
ok 1 number(s): "13101455"
Test #59:
score: 0
Accepted
time: 0ms
memory: 30408kb
input:
1000 764357124 1 0 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 2 0 0 0 0 0 0 1 2 3 4 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 1 0 1 2 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 2 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0...
output:
658008102
result:
ok 1 number(s): "658008102"
Test #60:
score: 0
Accepted
time: 0ms
memory: 29224kb
input:
1000 685535813 0 0 1 0 0 0 0 0 0 1 0 1 2 0 0 0 0 0 0 0 1 0 0 0 0 1 1 2 3 0 1 1 0 0 0 1 2 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 2 3 0 0 1 0 1 1 2 3 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2...
output:
990123590
result:
ok 1 number(s): "990123590"
Test #61:
score: 0
Accepted
time: 3ms
memory: 31028kb
input:
1000 751938694 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 2 2 2 2 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 3 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 2 2 0 1 0 0 0 0 0 1 2 2 0 1 0 0 0 0 0 0 1 2 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0...
output:
779617178
result:
ok 1 number(s): "779617178"
Test #62:
score: 0
Accepted
time: 0ms
memory: 30244kb
input:
1000 673117384 0 0 1 0 1 0 0 0 0 0 1 0 1 2 1 2 1 1 2 1 2 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 2 1 0 1 2 0 0 0 0 1 1 2 1 0 0 0 1 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 1 2 0 1 2 1 2 0 1 2 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0...
output:
555063492
result:
ok 1 number(s): "555063492"
Test #63:
score: 0
Accepted
time: 3ms
memory: 30852kb
input:
1000 838997160 0 0 1 2 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 2 0 1 2 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 2 3 0 0 0 1 2 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0...
output:
518619291
result:
ok 1 number(s): "518619291"
Test #64:
score: 0
Accepted
time: 0ms
memory: 30268kb
input:
1000 610432745 1 2 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 2 3 3 3 4 0 0 0 0 0 0 0 1 0 0 0 0 1 2 3 0 0 0 0 1 0 1 0 0 0 1 0...
output:
720634357
result:
ok 1 number(s): "720634357"
Test #65:
score: 0
Accepted
time: 0ms
memory: 29800kb
input:
1000 826578730 0 0 1 2 1 2 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 2 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 2 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 2 1 2 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1...
output:
266149737
result:
ok 1 number(s): "266149737"
Test #66:
score: 0
Accepted
time: 0ms
memory: 31132kb
input:
1000 892981612 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 2 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 2 1 0 1 0 0 1 2 1...
output:
374363104
result:
ok 1 number(s): "374363104"
Test #67:
score: 0
Accepted
time: 3ms
memory: 30528kb
input:
1000 959384493 0 0 0 1 0 0 0 0 1 0 0 0 1 2 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0...
output:
526315169
result:
ok 1 number(s): "526315169"
Test #68:
score: 0
Accepted
time: 7ms
memory: 30224kb
input:
1000 685072781 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 1 2 3 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 2 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0...
output:
906319901
result:
ok 1 number(s): "906319901"
Test #69:
score: 0
Accepted
time: 3ms
memory: 29072kb
input:
1000 46442958 0 1 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 2 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
261522963
result:
ok 1 number(s): "261522963"
Test #70:
score: 0
Accepted
time: 3ms
memory: 31024kb
input:
1000 967621648 0 0 0 0 1 0 1 0 0 0 1 2 0 0 0 0 1 0 0 1 2 0 0 0 1 0 1 2 1 1 0 1 1 1 0 0 1 1 1 2 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 1...
output:
483043891
result:
ok 1 number(s): "483043891"
Test #71:
score: 0
Accepted
time: 3ms
memory: 30216kb
input:
1000 34024529 0 0 0 0 0 1 0 0 1 0 1 0 0 1 2 0 0 0 0 0 0 1 2 0 1 2 3 0 0 0 0 1 0 0 0 0 1 1 2 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 1 2 0 0 0 1 0 1 2 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 2 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 ...
output:
427201708
result:
ok 1 number(s): "427201708"
Test #72:
score: 0
Accepted
time: 3ms
memory: 29840kb
input:
1000 100427410 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0...
output:
50631862
result:
ok 1 number(s): "50631862"
Test #73:
score: 0
Accepted
time: 3ms
memory: 30244kb
input:
1000 121082994 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 1 0 0 0 0 0 1 2 0 0 0 0 1 0 0 0 0 1 2 0 1 0 0 0 0 1 1 2 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 2 0 1 0...
output:
702913580
result:
ok 1 number(s): "702913580"
Test #74:
score: 0
Accepted
time: 7ms
memory: 29556kb
input:
1000 892518579 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1...
output:
871549846
result:
ok 1 number(s): "871549846"
Test #75:
score: 0
Accepted
time: 6ms
memory: 29648kb
input:
1000 108664565 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 1 1 0 0 1 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
263821682
result:
ok 1 number(s): "263821682"
Test #76:
score: 0
Accepted
time: 2ms
memory: 30796kb
input:
1000 175067446 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 3 4 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0...
output:
262974853
result:
ok 1 number(s): "262974853"
Test #77:
score: 0
Accepted
time: 3ms
memory: 28972kb
input:
1000 241470328 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0...
output:
437685614
result:
ok 1 number(s): "437685614"
Test #78:
score: 0
Accepted
time: 3ms
memory: 29548kb
input:
1000 967158615 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0...
output:
167634457
result:
ok 1 number(s): "167634457"
Test #79:
score: 0
Accepted
time: 3ms
memory: 29896kb
input:
1000 328528793 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 2 0 0 0 0 0 0 1 0 1 2 0 1 1 2 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1...
output:
722838116
result:
ok 1 number(s): "722838116"
Test #80:
score: 0
Accepted
time: 0ms
memory: 30188kb
input:
1000 249707482 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 2 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0...
output:
88625896
result:
ok 1 number(s): "88625896"
Test #81:
score: 0
Accepted
time: 3ms
memory: 29836kb
input:
1000 21143067 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 ...
output:
306568338
result:
ok 1 number(s): "306568338"
Test #82:
score: 0
Accepted
time: 3ms
memory: 30744kb
input:
1000 382513245 0 1 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0...
output:
483546788
result:
ok 1 number(s): "483546788"
Test #83:
score: 0
Accepted
time: 0ms
memory: 29472kb
input:
1000 403168829 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
303587617
result:
ok 1 number(s): "303587617"
Test #84:
score: 0
Accepted
time: 7ms
memory: 30664kb
input:
1000 174604414 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0...
output:
418970966
result:
ok 1 number(s): "418970966"
Test #85:
score: 0
Accepted
time: 3ms
memory: 30080kb
input:
1000 241007295 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 2 3 0 0 0 0 1 2 0 0 1 0 1 1 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0...
output:
372361713
result:
ok 1 number(s): "372361713"
Test #86:
score: 0
Accepted
time: 0ms
memory: 28896kb
input:
1000 457153281 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 3 1 2...
output:
837847812
result:
ok 1 number(s): "837847812"
Test #87:
score: 0
Accepted
time: 5ms
memory: 30396kb
input:
1000 228588866 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 2 3 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 2 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0...
output:
532418876
result:
ok 1 number(s): "532418876"
Test #88:
score: 0
Accepted
time: 0ms
memory: 29520kb
input:
1000 765912365 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0...
output:
817859137
result:
ok 1 number(s): "817859137"
Test #89:
score: 0
Accepted
time: 3ms
memory: 30512kb
input:
1000 569024208 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0...
output:
81546298
result:
ok 1 number(s): "81546298"
Test #90:
score: 0
Accepted
time: 0ms
memory: 30360kb
input:
1000 521879155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0...
output:
726699432
result:
ok 1 number(s): "726699432"
Test #91:
score: 0
Accepted
time: 0ms
memory: 30860kb
input:
1000 324990998 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0...
output:
471388077
result:
ok 1 number(s): "471388077"
Test #92:
score: 0
Accepted
time: 3ms
memory: 29656kb
input:
1000 982878649 0 0 0 1 2 1 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0...
output:
904583149
result:
ok 1 number(s): "904583149"
Test #93:
score: 0
Accepted
time: 15ms
memory: 34436kb
input:
200000 579272183 0 1 1 2 3 4 5 6 7 1 1 1 1 2 3 4 5 6 7 1 2 3 4 5 6 2 0 1 1 2 0 0 1 1 1 2 3 2 3 2 0 1 1 1 1 1 1 1 1 2 3 2 0 1 1 2 0 1 2 3 2 3 2 3 2 3 2 3 2 3 4 5 6 2 0 0 0 1 2 0 0 1 1 2 3 4 5 0 1 1 1 1 2 3 4 5 6 2 0 1 2 0 1 1 2 3 4 5 6 2 3 2 0 1 2 3 2 0 0 0 1 1 2 0 1 2 0 0 0 0 0 1 1 2 3 4 1 2 0 1 2 3...
output:
347660170
result:
ok 1 number(s): "347660170"
Test #94:
score: 0
Accepted
time: 15ms
memory: 34664kb
input:
200000 819073288 1 0 0 0 0 1 2 2 3 4 1 0 1 2 3 1 0 1 2 2 3 1 0 0 0 0 1 2 3 1 2 3 4 5 1 2 3 4 1 2 2 3 4 5 6 0 0 0 0 1 2 3 4 5 6 0 1 0 1 0 0 1 0 1 2 3 1 2 2 2 3 1 2 3 4 5 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 1 2 2 2 2 2 2 2 2 2 3 4 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 2 2 3 4 5 1 0 1 0 1 2 2 2 2 2 2 3 1 0...
output:
153152121
result:
ok 1 number(s): "153152121"
Test #95:
score: 0
Accepted
time: 18ms
memory: 35000kb
input:
200000 353841688 0 0 1 1 2 3 0 0 1 1 2 3 0 1 1 1 2 1 1 1 1 1 2 1 2 1 1 2 1 2 3 4 2 1 1 2 1 1 2 1 2 1 2 1 1 1 1 1 1 1 1 2 1 2 1 1 2 1 2 3 0 0 1 1 1 1 2 3 0 0 0 1 1 2 1 1 1 2 1 1 1 2 1 1 2 3 4 5 1 2 3 4 5 1 2 1 2 1 1 1 2 3 4 5 1 1 2 3 0 1 1 1 1 2 1 1 1 2 3 0 1 1 1 1 1 2 1 1 1 1 1 1 2 3 4 2 3 0 1 2 3 0...
output:
591947149
result:
ok 1 number(s): "591947149"
Test #96:
score: 0
Accepted
time: 18ms
memory: 34824kb
input:
200000 738866985 1 0 0 1 0 1 0 1 2 2 2 2 2 3 1 0 0 1 0 1 0 0 0 0 0 0 1 2 2 2 2 2 2 3 1 2 2 3 4 0 0 1 0 1 2 3 4 5 2 2 3 1 0 0 0 0 0 1 0 0 1 0 1 0 1 2 3 1 2 2 3 1 0 1 0 1 2 2 2 2 2 2 2 3 1 2 2 2 3 1 0 0 1 0 1 0 1 2 2 2 3 1 2 3 4 5 6 0 0 1 0 0 1 0 0 0 0 0 1 2 3 4 5 6 7 2 3 4 0 1 2 2 3 1 2 2 2 2 2 3 4 5...
output:
684525127
result:
ok 1 number(s): "684525127"
Test #97:
score: 0
Accepted
time: 11ms
memory: 34880kb
input:
200000 978668089 0 1 1 1 1 1 1 1 2 0 1 2 3 4 5 2 0 1 2 3 4 5 2 3 2 0 1 1 2 0 0 0 0 1 1 2 0 1 2 0 1 2 3 2 0 1 1 1 2 3 2 3 4 2 3 4 5 2 3 4 2 3 4 2 3 2 3 4 2 3 4 5 6 7 8 2 0 0 0 1 1 1 1 2 0 0 0 1 1 1 1 2 3 2 0 1 1 1 2 3 4 5 2 0 0 1 2 0 0 0 1 1 1 1 1 2 3 4 5 2 3 4 2 0 1 1 1 2 0 0 1 1 2 0 1 2 0 0 0 0 0 0...
output:
684536522
result:
ok 1 number(s): "684536522"
Test #98:
score: 0
Accepted
time: 4ms
memory: 33816kb
input:
200000 207808617 1 0 0 1 2 2 2 2 3 1 2 3 1 0 0 0 0 0 1 0 1 2 0 0 1 0 0 0 0 0 0 1 2 3 0 0 0 0 1 0 0 0 0 1 2 3 0 1 2 3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 2 2 0 1 2 3 1 0 1 2 3 4 0 1 0 1 2 3 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 3 0 1 0 1 2 3 1 0 1 2 2 0 1 0 0 0 0 0 0 0 0 0 1 0 1 2 0 1 0 1 2 3 0 1 2 0 0 1 0...
output:
102415678
result:
ok 1 number(s): "102415678"
Test #99:
score: 0
Accepted
time: 12ms
memory: 30212kb
input:
200000 447609722 0 0 0 1 2 3 4 5 0 0 1 1 0 0 0 1 1 2 1 0 0 0 0 0 0 0 1 1 2 0 0 1 0 0 1 2 0 1 2 3 4 5 6 1 2 1 2 0 0 0 0 1 1 0 0 0 1 2 0 1 2 3 4 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 2 3 1 0 0 0 0 1 2 0 0 0 0 0 0 1 0 1 1 1 1 2 0 1 1 2 0 1 0 1 1 2 3 4 0 1 0...
output:
370729195
result:
ok 1 number(s): "370729195"
Test #100:
score: 0
Accepted
time: 8ms
memory: 33492kb
input:
200000 687410826 0 0 0 1 2 1 2 3 0 1 2 3 4 0 0 0 0 1 2 1 2 3 4 0 0 1 1 0 0 0 0 0 1 2 1 0 1 2 1 1 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 0 0 0 0 0 0 1 1 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 3 4 0 0 1 1 2 3 1 1 1 2 1 1 0 0 0 1 0 0 0 0 0 1 2 3 4 0 1 0 0 1 0 1 2 1 1 2 3 1 2 1 2 1 2 3...
output:
43212245
result:
ok 1 number(s): "43212245"
Test #101:
score: 0
Accepted
time: 13ms
memory: 32456kb
input:
200000 367403419 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 2 3 1 2 3 1 2 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 2 0 0 1 0 1 2 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 2 2 0 1 2 3 4 5 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 2 3 0 0 0 0 0 0 0 1 2 3 0 0 1 0 0 1 2 0 1 2 2 3 0 0 0 0 0 0 1 0 0 1 2 2 0 0 0 1 2 0 1 2 0 0 0 0...
output:
386226086
result:
ok 1 number(s): "386226086"
Test #102:
score: 0
Accepted
time: 13ms
memory: 30432kb
input:
200000 607204523 0 0 0 0 0 0 0 1 2 3 1 2 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 1 2 3 0 0 1 2 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 2 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 1 2 1 2 3 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 2 0 0 0 0 1 2 0 1 1 1 0 0...
output:
775972750
result:
ok 1 number(s): "775972750"
Test #103:
score: 0
Accepted
time: 12ms
memory: 35160kb
input:
200000 396153563 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 1 2 1 2 1 1 0 0 1 0 1 1 1 2 0 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 2 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1...
output:
966018293
result:
ok 1 number(s): "966018293"
Test #104:
score: 0
Accepted
time: 7ms
memory: 32256kb
input:
200000 76146156 0 1 0 0 0 0 0 0 1 1 2 3 2 3 0 0 0 0 0 0 1 0 0 0 0 0 1 2 3 4 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 1 1 2 3 2 3 1 0 0 1 1 2 0 0 1 0 0 0 0 0 0 0 1 0 1 1 2 0 0 1 1 0 0 1 2 0 0 0 0 1 1 1 2 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1 0 1 2 0 0 0 0 1 2 0 0 0 0 0 0 1 0 0 0 1 2 0 1 0 0 0 1 1 1 0 0 0 0 ...
output:
132533793
result:
ok 1 number(s): "132533793"
Test #105:
score: 0
Accepted
time: 15ms
memory: 35880kb
input:
200000 315947260 0 1 1 1 0 0 1 1 2 3 4 5 2 0 0 1 2 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 3 2 0 0 0 1 2 0 1 0 0 0 0 1 2 0 1 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 1 2 3 4 0 1 0 0 1 0 0 1 1 0 0 1 0 1 2 0 0 0 0 1 0 1 1 1 2 3 0 0 1 1 2 0 0 0 0 0 1 2 0 0...
output:
90655276
result:
ok 1 number(s): "90655276"
Test #106:
score: 0
Accepted
time: 15ms
memory: 35968kb
input:
200000 555748365 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 0 0 1 1 0 0 1 1 2 3 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 1 2 0 1 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 2 3 4 5 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 2 3 1 1 1 0 1 1 0 1 0 0 1 2 0 0...
output:
793860155
result:
ok 1 number(s): "793860155"
Test #107:
score: 0
Accepted
time: 15ms
memory: 35960kb
input:
200000 940773662 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 1 0 0 0 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 3 1 2 3 4 5 0 0 0 1 0 0 0 0 0 0 0 1 0 1 2 3 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 2 0 1 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 1 2 0 0 0 1 0...
output:
576146912
result:
ok 1 number(s): "576146912"
Test #108:
score: 0
Accepted
time: 12ms
memory: 30972kb
input:
200000 24689997 0 1 2 0 1 0 0 1 0 1 1 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 2 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 0 1 0 0 1 0 0 0 0 0 ...
output:
991993325
result:
ok 1 number(s): "991993325"
Test #109:
score: 0
Accepted
time: 12ms
memory: 31224kb
input:
200000 704682590 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 2 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
783514522
result:
ok 1 number(s): "783514522"
Test #110:
score: 0
Accepted
time: 12ms
memory: 33740kb
input:
200000 649516398 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 2 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 1 0 0 1 0 0 1 2 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0...
output:
307949336
result:
ok 1 number(s): "307949336"
Test #111:
score: 0
Accepted
time: 13ms
memory: 31288kb
input:
200000 184284799 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 2 0 0 0 0 1 2 3 1 2 0 0 1 0 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0 0 0 1 2 0...
output:
369035448
result:
ok 1 number(s): "369035448"
Test #112:
score: 0
Accepted
time: 12ms
memory: 30440kb
input:
200000 864277392 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 2 2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 3 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 1 2 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0...
output:
768613352
result:
ok 1 number(s): "768613352"
Test #113:
score: 0
Accepted
time: 10ms
memory: 31416kb
input:
200000 653226431 0 0 0 1 2 3 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 2 0 0 0 0 1 2 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
142630180
result:
ok 1 number(s): "142630180"
Test #114:
score: 0
Accepted
time: 12ms
memory: 31128kb
input:
200000 38251728 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 1 2 1 2 3 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 0 0 0 0 1 1 0 0 0 0 0 1 2 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
697892572
result:
ok 1 number(s): "697892572"
Test #115:
score: 0
Accepted
time: 8ms
memory: 31280kb
input:
200000 573020129 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 2 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0...
output:
498397217
result:
ok 1 number(s): "498397217"
Test #116:
score: 0
Accepted
time: 9ms
memory: 33824kb
input:
200000 517853937 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
891718407
result:
ok 1 number(s): "891718407"
Test #117:
score: 0
Accepted
time: 12ms
memory: 31308kb
input:
200000 197846530 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0...
output:
669796487
result:
ok 1 number(s): "669796487"
Test #118:
score: 0
Accepted
time: 16ms
memory: 30456kb
input:
200000 281762865 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 2 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
96510156
result:
ok 1 number(s): "96510156"
Test #119:
score: 0
Accepted
time: 12ms
memory: 31176kb
input:
200000 371820866 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0...
output:
749167673
result:
ok 1 number(s): "749167673"
Test #120:
score: 0
Accepted
time: 8ms
memory: 32344kb
input:
200000 906589267 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
352954727
result:
ok 1 number(s): "352954727"
Test #121:
score: 0
Accepted
time: 12ms
memory: 30352kb
input:
200000 441357667 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0...
output:
799722892
result:
ok 1 number(s): "799722892"
Test #122:
score: 0
Accepted
time: 8ms
memory: 33900kb
input:
200000 531415668 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1...
output:
602850567
result:
ok 1 number(s): "602850567"
Test #123:
score: 0
Accepted
time: 11ms
memory: 33852kb
input:
200000 615332003 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 2 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1...
output:
595241449
result:
ok 1 number(s): "595241449"
Test #124:
score: 0
Accepted
time: 3ms
memory: 33524kb
input:
200000 150100404 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0...
output:
323398133
result:
ok 1 number(s): "323398133"
Test #125:
score: 0
Accepted
time: 10ms
memory: 30864kb
input:
200000 240158405 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0...
output:
201484914
result:
ok 1 number(s): "201484914"
Test #126:
score: 0
Accepted
time: 12ms
memory: 30640kb
input:
200000 774926805 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 2 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
331448986
result:
ok 1 number(s): "331448986"
Test #127:
score: 0
Accepted
time: 12ms
memory: 33896kb
input:
200000 14727910 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 ...
output:
135252881
result:
ok 1 number(s): "135252881"
Test #128:
score: 0
Accepted
time: 11ms
memory: 30668kb
input:
200000 243868438 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 2 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0...
output:
684142741
result:
ok 1 number(s): "684142741"
Test #129:
score: 0
Accepted
time: 12ms
memory: 30936kb
input:
200000 483669542 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0...
output:
752766955
result:
ok 1 number(s): "752766955"
Test #130:
score: 0
Accepted
time: 8ms
memory: 31396kb
input:
200000 163662135 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
981461127
result:
ok 1 number(s): "981461127"
Test #131:
score: 0
Accepted
time: 12ms
memory: 31064kb
input:
200000 403463239 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 2 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0...
output:
381805437
result:
ok 1 number(s): "381805437"
Test #132:
score: 0
Accepted
time: 16ms
memory: 33476kb
input:
200000 643264344 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 1 2 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
763286827
result:
ok 1 number(s): "763286827"
Test #133:
score: 0
Accepted
time: 8ms
memory: 30488kb
input:
200000 653418349 0 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0...
output:
845407997
result:
ok 1 number(s): "845407997"
Test #134:
score: 0
Accepted
time: 3ms
memory: 30384kb
input:
200000 515373820 0 0 0 0 0 0 1 0 0 1 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 1 0 0 1 2 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0...
output:
458548074
result:
ok 1 number(s): "458548074"
Test #135:
score: 0
Accepted
time: 7ms
memory: 31204kb
input:
200000 82361994 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 ...
output:
120008960
result:
ok 1 number(s): "120008960"
Test #136:
score: 0
Accepted
time: 14ms
memory: 33960kb
input:
200000 89541657 0 0 1 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 ...
output:
65589608
result:
ok 1 number(s): "65589608"
Test #137:
score: 0
Accepted
time: 13ms
memory: 30996kb
input:
200000 951497128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
275439523
result:
ok 1 number(s): "275439523"
Extra Test:
score: 0
Extra Test Passed