QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#327407 | #8208. Beer Circuits | vme50 | AC ✓ | 482ms | 141932kb | C++17 | 2.5kb | 2024-02-14 23:23:36 | 2024-02-14 23:23:36 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int N=2e5+5,M=1e7+5,MOD=9999997,up=2e9;
int n,m,tp,X[N],Y[N],cnt[N],d[N],d1[N],q[N],q1[N];ll ans,z[N],z1[N];bool fl;
vector<int> vc[N],e[N];struct Edge {int u,v;ll w;}a[M];
int cntH,hd[MOD];struct Node {int nxt;ll x;}hs[N];
ll sqr(ll x) {return x*x;}
ll dst(int u,int v) {return sqr(X[u]-X[v])+sqr(Y[u]-Y[v]);}
template<class Type> void clear(Type &a) {Type b;swap(a,b);}
void clear() {fill(cnt+1,cnt+cntH+1,0);for(int i=1;i<=cntH;++i) hd[hs[i].x%MOD]=0;cntH=0;}
int find(ll x) {for(int i=hd[x%MOD];i;i=hs[i].nxt) if(x==hs[i].x) return i;return 0;}
void ins1(ll x) {int t=x%MOD;hs[++cntH]=(Node) {hd[t],x};hd[t]=cntH;}
void ins(ll x) {int t=find(x);if(!t) ins1(x),t=cntH;++cnt[t];}
void init(int l)
{
for(int i=1;i<=n;++i)
{
for(int j=max((X[i]>>l)-2,0);j<=(X[i]>>l)+2;++j)
for(int k=max((Y[i]>>l)-2,0);k<=(Y[i]>>l)+2;++k)
for(auto i1:vc[find(1ll*j*up+k)])
{ll w=dst(i,i1);if(w<1ll<<l*2+1) a[++tp]=(Edge) {i,i1,w};}
vc[find(1ll*(X[i]>>l)*up+(Y[i]>>l))].pb(i);
}
}
void bfs(int S)
{
for(int i=2;i<=q[1];++i) d[q[i]]=-1;q[0]=2;q[1]=1;d[S]=0;z[S]=1;q[++q[1]]=S;
while(q[0]<=q[1])
{
int u=q[q[0]++];
for(auto v:e[u]) if(d[v]==-1) {if(d[u]<m/2) d[v]=d[u]+1,z[v]=z[u],q[++q[1]]=v;}
else
{
if(d[v]==d[u]+1) z[v]+=z[u];
if(u!=S && v!=S && d[u]<=d[v] && d[u]+d[v]<m) fl=1,m=d[u]+d[v]+1;
}
}
}
void bfs1(int S,bool fl=0)
{
for(int i=2;i<=q1[1];++i) d1[q1[i]]=-1;q1[0]=2;q1[1]=1;d1[S]=0;z1[S]=1;q1[++q1[1]]=S;
while(q1[0]<=q1[1])
{
int u=q1[q1[0]++];if(d[u]<=d1[u] && m==d[u]+d1[u]+1) ans+=z[u]*z1[u];
for(auto v:e[u]) if(d1[v]==-1) {if(d1[u]<m/2) d1[v]=d1[u]+1,z1[v]=z1[u],q1[++q1[1]]=v;}
else if(d1[v]==d1[u]+1) z1[v]+=z1[u];
}
}
void upd(int u,int v) {e[u].pb(v);e[v].pb(u);bfs(u);}
void upd1(int u,int v) {bfs(u);bfs1(v);e[u].pb(v);e[v].pb(u);}
int main()
{
scanf("%d %d",&n,&m);fill(d+1,d+n+1,-1);fill(d1+1,d1+n+1,-1);
for(int i=1;i<=n;++i) scanf("%d %d",&X[i],&Y[i]);
for(int l=0;;++l)
{
clear();for(int i=1;i<=n;++i) ins(1ll*(X[i]>>l)*up+(Y[i]>>l));
for(int i=1;i<=cntH;++i) if(cnt[i]>2) {fl=1;break;}if(fl) {init(l);break;}
}fl=0;sort(a+1,a+tp+1,[](Edge x,Edge y) {return x.w<y.w;});
for(int i=1;i<=tp;++i) {upd(a[i].u,a[i].v);if(fl) while(a[i].w<a[tp].w) --tp;}
printf("%lld\n%d\n",a[tp].w,m);for(int i=1;i<=n;++i) clear(e[i]);
for(int i=1;i<=tp;++i) upd1(a[i].u,a[i].v);printf("%lld\n",ans*m*2);return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 22528kb
input:
3 3 0 0 2 2 1000000000 1000000000
output:
2000000000000000000 3 6
result:
ok 3 number(s): "2000000000000000000 3 6"
Test #2:
score: 0
Accepted
time: 0ms
memory: 20364kb
input:
8 5 5 5 5 7 7 7 3 7 2 5 8 5 3 4 7 4
output:
5 5 20
result:
ok 3 number(s): "5 5 20"
Test #3:
score: 0
Accepted
time: 0ms
memory: 20204kb
input:
10 5 1 4 4 4 3 8 5 1 6 5 7 1 0 6 2 2 2 1 3 0
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #4:
score: 0
Accepted
time: 0ms
memory: 22384kb
input:
10 5 4 9 3 8 4 8 3 0 1 4 2 0 10 1 9 10 0 10 3 5
output:
2 3 6
result:
ok 3 number(s): "2 3 6"
Test #5:
score: 0
Accepted
time: 0ms
memory: 20240kb
input:
10 5 2 0 5 1 2 7 5 0 1 10 0 7 5 8 7 3 6 2 0 4
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #6:
score: 0
Accepted
time: 0ms
memory: 22396kb
input:
10 5 8 1 3 2 7 3 10 4 4 1 7 6 3 1 7 2 10 0 6 7
output:
2 3 6
result:
ok 3 number(s): "2 3 6"
Test #7:
score: 0
Accepted
time: 0ms
memory: 20232kb
input:
10 5 6 6 9 10 8 3 1 0 3 0 1 1 5 9 4 1 4 6 8 6
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #8:
score: 0
Accepted
time: 0ms
memory: 20324kb
input:
10 5 8 4 0 3 2 3 10 0 3 6 0 4 8 3 8 8 0 2 0 1
output:
4 3 12
result:
ok 3 number(s): "4 3 12"
Test #9:
score: 0
Accepted
time: 0ms
memory: 20336kb
input:
10 5 6 6 5 8 3 6 0 0 2 8 6 8 10 7 1 7 5 7 6 7
output:
1 4 8
result:
ok 3 number(s): "1 4 8"
Test #10:
score: 0
Accepted
time: 0ms
memory: 20388kb
input:
10 5 1 8 7 8 8 6 6 0 9 6 8 10 9 0 5 9 4 2 8 2
output:
8 3 6
result:
ok 3 number(s): "8 3 6"
Test #11:
score: 0
Accepted
time: 0ms
memory: 22436kb
input:
10 5 10 9 1 2 1 9 8 7 8 2 7 2 1 8 9 8 9 7 3 1
output:
2 3 6
result:
ok 3 number(s): "2 3 6"
Test #12:
score: 0
Accepted
time: 4ms
memory: 22400kb
input:
10 5 0 10 6 6 10 8 9 7 0 9 8 3 5 0 7 10 3 2 3 4
output:
13 3 6
result:
ok 3 number(s): "13 3 6"
Test #13:
score: 0
Accepted
time: 4ms
memory: 20340kb
input:
10 5 9 4 5 0 5 4 0 3 6 0 6 6 3 7 2 3 0 1 5 9
output:
8 3 6
result:
ok 3 number(s): "8 3 6"
Test #14:
score: 0
Accepted
time: 0ms
memory: 20260kb
input:
10 5 7 10 6 5 9 3 6 3 4 5 6 4 2 2 7 0 7 4 5 3
output:
2 3 18
result:
ok 3 number(s): "2 3 18"
Test #15:
score: 0
Accepted
time: 0ms
memory: 20344kb
input:
10 5 2 0 5 9 3 3 7 3 5 5 3 0 4 9 0 1 8 2 2 2
output:
5 3 12
result:
ok 3 number(s): "5 3 12"
Test #16:
score: 0
Accepted
time: 0ms
memory: 18344kb
input:
10 5 0 1 3 2 4 10 5 3 1 7 9 0 6 6 0 0 8 0 4 1
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #17:
score: 0
Accepted
time: 0ms
memory: 20344kb
input:
10 5 2 7 1 7 9 10 7 10 0 9 8 7 5 6 8 10 5 2 0 0
output:
4 3 6
result:
ok 3 number(s): "4 3 6"
Test #18:
score: 0
Accepted
time: 0ms
memory: 20200kb
input:
10 5 0 4 3 7 3 3 4 3 10 8 3 5 9 9 9 8 2 10 0 8
output:
2 3 6
result:
ok 3 number(s): "2 3 6"
Test #19:
score: 0
Accepted
time: 0ms
memory: 20204kb
input:
10 5 6 6 9 1 8 6 3 3 6 3 1 1 6 7 5 0 2 7 4 1
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #20:
score: 0
Accepted
time: 0ms
memory: 20388kb
input:
10 5 4 8 3 1 1 5 4 10 0 8 8 5 6 6 6 2 10 0 2 8
output:
8 3 6
result:
ok 3 number(s): "8 3 6"
Test #21:
score: 0
Accepted
time: 5ms
memory: 22316kb
input:
10 5 6 9 5 9 3 5 2 3 1 4 6 7 0 9 2 5 3 7 1 6
output:
4 3 12
result:
ok 3 number(s): "4 3 12"
Test #22:
score: 0
Accepted
time: 0ms
memory: 18160kb
input:
10 5 2 10 9 5 7 7 6 2 7 2 5 9 3 8 7 10 6 0 1 1
output:
5 3 6
result:
ok 3 number(s): "5 3 6"
Test #23:
score: 0
Accepted
time: 168ms
memory: 84692kb
input:
199692 3 500136792 500000000 499931604 500118465 499931604 499881535 500557553 499600008 500352365 499718473 500352365 499481543 500978314 499200016 500773126 499318481 500773126 499081551 501399075 498800024 501193887 498918489 501193887 498681559 501819836 498400032 501614648 498518497 501614648 4...
output:
56136071569 3 399384
result:
ok 3 number(s): "56136071569 3 399384"
Test #24:
score: 0
Accepted
time: 167ms
memory: 86904kb
input:
198916 4 500024820 500000000 500000000 500024820 499975180 500000000 500000000 499975180 500110708 499936963 500085888 499961783 500061068 499936963 500085888 499912143 500196596 499873926 500171776 499898746 500146956 499873926 500171776 499849106 500282484 499810889 500257664 499835709 500232844 4...
output:
1232064800 4 397832
result:
ok 3 number(s): "1232064800 4 397832"
Test #25:
score: 0
Accepted
time: 211ms
memory: 83888kb
input:
200000 5 500243124 500000000 500075129 500231225 499803309 500142905 499803309 499857095 500075129 499768775 500748155 499046283 500580160 499277508 500308340 499189188 500308340 498903378 500580160 498815058 501253186 498092566 501085191 498323791 500813371 498235471 500813371 497949661 501085191 4...
output:
81687356100 5 400000
result:
ok 3 number(s): "81687356100 5 400000"
Test #26:
score: 0
Accepted
time: 196ms
memory: 82112kb
input:
198744 6 500157690 500000000 500078845 500136563 499921155 500136563 499842310 500000000 499921155 499863437 500078845 499863437 500935173 499831340 500856328 499967903 500698638 499967903 500619793 499831340 500698638 499694777 500856328 499694777 501712656 499662680 501633811 499799243 501476121 4...
output:
24866136100 6 397488
result:
ok 3 number(s): "24866136100 6 397488"
Test #27:
score: 0
Accepted
time: 231ms
memory: 86400kb
input:
199927 7 500278028 500000000 500173347 500217371 499938133 500271057 499749505 500120632 499749505 499879368 499938133 499728943 500173347 499782629 501459060 499512861 501354379 499730232 501119165 499783918 500930537 499633493 500930537 499392229 501119165 499241804 501354379 499295490 502640092 4...
output:
58208317696 7 399854
result:
ok 3 number(s): "58208317696 7 399854"
Test #28:
score: 0
Accepted
time: 176ms
memory: 85040kb
input:
199712 8 500197494 500000000 500139649 500139649 500000000 500197494 499860351 500139649 499802506 500000000 499860351 499860351 500000000 499802506 500139649 499860351 501140007 499757547 501082162 499897196 500942513 499955041 500802864 499897196 500745019 499757547 500802864 499617898 500942513 4...
output:
22847887226 8 399424
result:
ok 3 number(s): "22847887226 8 399424"
Test #29:
score: 0
Accepted
time: 209ms
memory: 83604kb
input:
199809 9 500517211 500000000 500396206 500332456 500089812 500509353 499741395 500447918 499513981 500176896 499513981 499823104 499741395 499552082 500089812 499490647 500396206 499667544 502059676 498439198 501938671 498771654 501632277 498948551 501283860 498887116 501056446 498616094 501056446 4...
output:
125170051880 9 399618
result:
ok 3 number(s): "125170051880 9 399618"
Test #30:
score: 0
Accepted
time: 198ms
memory: 83748kb
input:
198810 10 500213830 500000000 500172992 500125686 500066077 500203364 499933923 500203364 499827008 500125686 499786170 500000000 499827008 499874314 499933923 499796636 500066077 499796636 500172992 499874314 500868929 499372119 500828091 499497805 500721176 499575483 500589022 499575483 500482107 ...
output:
17464712840 10 397620
result:
ok 3 number(s): "17464712840 10 397620"
Test #31:
score: 0
Accepted
time: 227ms
memory: 89904kb
input:
197516 11 500355273 500000000 500298874 500192075 500147585 500323167 499949440 500351656 499767346 500268497 499659118 500100092 499659118 499899908 499767346 499731503 499949440 499648344 500147585 499676833 500298874 499807925 501503078 499016166 501446679 499208241 501295390 499339333 501097245 ...
output:
40073652826 11 395032
result:
ok 3 number(s): "40073652826 11 395032"
Test #32:
score: 0
Accepted
time: 177ms
memory: 79596kb
input:
199692 12 500287748 500000000 500249197 500143874 500143874 500249197 500000000 500287748 499856126 500249197 499750803 500143874 499712252 500000000 499750803 499856126 499856126 499750803 500000000 499712252 500143874 499750803 500249197 499856126 501616606 499602368 501578055 499746242 501472732 ...
output:
22185907477 12 399384
result:
ok 3 number(s): "22185907477 12 399384"
Test #33:
score: 0
Accepted
time: 243ms
memory: 86004kb
input:
199888 13 500214891 500000000 500190276 500099864 500122072 500176851 500025902 500213324 499923799 500200926 499839152 500142499 499791354 500051426 499791354 499948574 499839152 499857501 499923799 499799074 500025902 499786676 500122072 499823149 500190276 499900136 500400819 498896581 500376204 ...
output:
10578948629 13 399776
result:
ok 3 number(s): "10578948629 13 399776"
Test #34:
score: 0
Accepted
time: 254ms
memory: 85924kb
input:
198254 14 500466462 500000000 500420268 500202390 500290834 500364695 500103797 500454767 499896203 500454767 499709166 500364695 499579732 500202390 499533538 500000000 499579732 499797610 499709166 499635305 499896203 499545233 500103797 499545233 500290834 499635305 500420268 499797610 501174191 ...
output:
43096073381 14 396508
result:
ok 3 number(s): "43096073381 14 396508"
Test #35:
score: 0
Accepted
time: 295ms
memory: 87824kb
input:
198375 15 500469143 500000000 500428583 500190817 500313918 500348641 500144973 500446181 499950962 500466573 499765429 500406289 499620456 500275755 499541109 500097540 499541109 499902460 499620456 499724245 499765429 499593711 499950962 499533427 500144973 499553819 500313918 499651359 500428583 ...
output:
38056654745 15 396750
result:
ok 3 number(s): "38056654745 15 396750"
Test #36:
score: 0
Accepted
time: 198ms
memory: 83104kb
input:
197136 16 500209439 500000000 500193496 500080148 500148095 500148095 500080148 500193496 500000000 500209439 499919852 500193496 499851905 500148095 499806504 500080148 499790561 500000000 499806504 499919852 499851905 499851905 499919852 499806504 500000000 499790561 500080148 499806504 500148095 ...
output:
6678045610 16 394272
result:
ok 3 number(s): "6678045610 16 394272"
Test #37:
score: 0
Accepted
time: 301ms
memory: 82340kb
input:
198288 17 500145782 500000000 500135938 500052662 500107734 500098213 500064980 500130499 500013451 500145160 499960105 500140217 499912147 500116336 499876054 500076744 499856700 500026787 499856700 499973213 499876054 499923256 499912147 499883664 499960105 499859783 500013451 499854840 500064980 ...
output:
2870359217 17 396576
result:
ok 3 number(s): "2870359217 17 396576"
Test #38:
score: 0
Accepted
time: 258ms
memory: 80656kb
input:
198450 18 500408063 500000000 500383453 500139565 500312594 500262297 500204031 500353392 500070859 500401863 499929141 500401863 499795969 500353392 499687406 500262297 499616547 500139565 499591937 500000000 499616547 499860435 499687406 499737703 499795969 499646608 499929141 499598137 500070859 ...
output:
20084223994 18 396900
result:
ok 3 number(s): "20084223994 18 396900"
Test #39:
score: 0
Accepted
time: 266ms
memory: 79804kb
input:
197676 19 500266376 500000000 500251943 500086492 500210208 500163612 500145694 500223001 500065391 500258225 499978003 500265467 499892998 500243940 499819588 500195979 499765729 500126781 499737257 500043844 499737257 499956156 499765729 499873219 499819588 499804021 499892998 499756060 499978003 ...
output:
7689304625 19 395352
result:
ok 3 number(s): "7689304625 19 395352"
Test #40:
score: 0
Accepted
time: 244ms
memory: 82052kb
input:
200000 20 500471804 500000000 500448712 500145795 500381697 500277319 500277319 500381697 500145795 500448712 500000000 500471804 499854205 500448712 499722681 500381697 499618303 500277319 499551288 500145795 499528196 500000000 499551288 499854205 499618303 499722681 499722681 499618303 499854205 ...
output:
21789572801 20 400000
result:
ok 3 number(s): "21789572801 20 400000"
Test #41:
score: 0
Accepted
time: 300ms
memory: 83616kb
input:
196830 30 500478309 500000000 500467856 500099446 500436957 500194545 500386960 500281142 500320051 500355452 500239154 500414227 500147805 500454898 500049996 500475688 499950004 500475688 499852195 500454898 499760846 500414227 499679949 500355452 499613040 500281142 499563043 500194545 499532144 ...
output:
9998825234 30 393660
result:
ok 3 number(s): "9998825234 30 393660"
Test #42:
score: 0
Accepted
time: 315ms
memory: 83932kb
input:
199980 30 187518 500000000 187501 500001125 184276 500015254 183803 500016275 175109 500027870 174262 500028610 161604 500035667 160529 500035999 146095 500037298 144978 500037163 131264 500032479 130298 500031901 119674 500022044 119027 500021124 113332 500007797 113114 500006693 113332 499992203 1...
output:
210044785 30 120
result:
ok 3 number(s): "210044785 30 120"
Test #43:
score: 0
Accepted
time: 319ms
memory: 84104kb
input:
199976 28 175020 500000000 175004 500001050 171554 500015188 171084 500016127 161841 500027367 161010 500028010 147805 500034126 146778 500034345 132227 500034126 131207 500033877 118191 500027367 117380 500026700 108478 500015188 108037 500014235 105012 500000000 105028 499998950 108478 499984812 1...
output:
211796356 28 399952
result:
ok 3 number(s): "211796356 28 399952"
Test #44:
score: 0
Accepted
time: 354ms
memory: 84120kb
input:
199992 26 162506 500000000 162491 500000975 158783 500015104 158317 500015960 148468 500026748 147657 500027290 133923 500032264 132953 500032367 118480 500030389 117574 500030030 105678 500021552 105042 500020813 98448 500007778 98229 500006828 98448 499992222 98696 499991279 105678 499978448 10633...
output:
213392061 26 399984
result:
ok 3 number(s): "213392061 26 399984"
Test #45:
score: 0
Accepted
time: 100ms
memory: 70044kb
input:
49729 30 500000000 500000000 500753821 498954062 501507642 497908124 502261463 496862186 503015284 495816248 503769105 494770310 504522926 493724372 505276747 492678434 506030568 491632496 506784389 490586558 507538210 489540620 508292031 488494682 509045852 487448744 509799673 486402806 510553494 4...
output:
1662232399885 4 394272
result:
ok 3 number(s): "1662232399885 4 394272"
Test #46:
score: 0
Accepted
time: 150ms
memory: 76996kb
input:
99856 30 500000000 500000000 500777497 499969354 501554994 499938708 502332491 499908062 503109988 499877416 503887485 499846770 504664982 499816124 505442479 499785478 506219976 499754832 506997473 499724186 507774970 499693540 508552467 499662894 509329964 499632248 510107461 499601602 510884958 4...
output:
605440762325 4 793800
result:
ok 3 number(s): "605440762325 4 793800"
Test #47:
score: 0
Accepted
time: 472ms
memory: 129952kb
input:
199809 30 500000000 500000000 500139442 499563552 500278884 499127104 500418326 498690656 500557768 498254208 500697210 497817760 500836652 497381312 500976094 496944864 501115536 496508416 501254978 496071968 501394420 495635520 501533862 495199072 501673304 494762624 501812746 494326176 501952188 ...
output:
209930928068 4 1591328
result:
ok 3 number(s): "209930928068 4 1591328"
Test #48:
score: 0
Accepted
time: 481ms
memory: 141932kb
input:
199809 30 500000000 500000000 500184735 499643289 500369470 499286578 500554205 498929867 500738940 498573156 500923675 498216445 501108410 497859734 501293145 497503023 501477880 497146312 501662615 496789601 501847350 496432890 502032085 496076179 502216820 495719468 502401555 495362757 502586290 ...
output:
161369757746 4 1591328
result:
ok 3 number(s): "161369757746 4 1591328"
Test #49:
score: 0
Accepted
time: 98ms
memory: 67896kb
input:
49729 30 500000000 500000000 500430450 500105515 500773132 499824464 501203582 499929979 501546264 499648928 501976714 499754443 502319396 499473392 502749846 499578907 503092528 499297856 503522978 499403371 503865660 499122320 504296110 499227835 504638792 498946784 505069242 499052299 505411924 4...
output:
196420617725 3 591408
result:
ok 3 number(s): "196420617725 3 591408"
Test #50:
score: 0
Accepted
time: 247ms
memory: 91332kb
input:
99856 30 500000000 500000000 500527456 500187113 500993620 499877416 501521076 500064529 501987240 499754832 502514696 499941945 502980860 499632248 503508316 499819361 503974480 499509664 504501936 499696777 504968100 499387080 505495556 499574193 505961720 499264496 506489176 499451609 506955340 4...
output:
313221106705 3 1190700
result:
ok 3 number(s): "313221106705 3 1190700"
Test #51:
score: 0
Accepted
time: 482ms
memory: 100200kb
input:
199809 30 500000000 500000000 500395973 499905264 500557768 499531644 500953741 499436908 501115536 499063288 501511509 498968552 501673304 498594932 502069277 498500196 502231072 498126576 502627045 498031840 502788840 497658220 503184813 497563484 503346608 497189864 503742581 497095128 503904376 ...
output:
165769526425 3 2386992
result:
ok 3 number(s): "165769526425 3 2386992"
Test #52:
score: 0
Accepted
time: 400ms
memory: 97852kb
input:
199809 30 500000000 500000000 500448002 500027671 500738940 499685872 501186942 499713543 501477880 499371744 501925882 499399415 502216820 499057616 502664822 499085287 502955760 498743488 503403762 498771159 503694700 498429360 504142702 498457031 504433640 498115232 504881642 498142903 505172580 ...
output:
201471476245 3 2386992
result:
ok 3 number(s): "201471476245 3 2386992"
Test #53:
score: 0
Accepted
time: 48ms
memory: 63924kb
input:
50000 30 373962205 151492771 195673060 584347290 753109469 337425829 199326482 160748207 55829410 188275250 683223810 484611038 888033895 710558504 678810676 960495394 865708356 935216074 344029733 778882325 875218676 97077775 574641504 619031772 288416649 526490984 29026787 172594044 683554707 6742...
output:
68870770226 3 6
result:
ok 3 number(s): "68870770226 3 6"
Test #54:
score: 0
Accepted
time: 75ms
memory: 67252kb
input:
100000 30 560211568 49850603 350124505 81049550 837774253 503517546 810383503 243527562 954385037 720668282 307789064 125442870 689769438 30540772 809231519 835835676 473336074 63215053 76644231 765953482 850296989 831237981 654455969 553650662 309669168 202359709 344991115 377069601 201053142 60144...
output:
26770842909 3 6
result:
ok 3 number(s): "26770842909 3 6"
Test #55:
score: 0
Accepted
time: 159ms
memory: 72096kb
input:
200000 30 804081614 556427635 423073344 83918195 246124723 752311319 803982158 426082742 83377163 588438190 730695312 544465607 537870092 563911105 389009215 886992846 770952565 656491214 89832060 508504971 866475386 617485708 388392144 534946943 136000138 353991853 85529297 42110147 375334362 84124...
output:
4670173649 3 6
result:
ok 3 number(s): "4670173649 3 6"
Test #56:
score: 0
Accepted
time: 161ms
memory: 70564kb
input:
200000 30 686371503 988714815 422143373 396402760 640064285 279813909 941214233 59467731 636647656 832308236 237272344 322447154 540738736 45890504 711431916 544155012 732169380 195548756 957601970 5040146 990530832 875651779 921762478 114724638 482124600 356641052 678805458 718861489 117885850 8574...
output:
15214029736 3 6
result:
ok 3 number(s): "15214029736 3 6"
Test #57:
score: 0
Accepted
time: 156ms
memory: 71704kb
input:
200000 30 863628685 126034701 52617181 118952742 665407626 470880011 857107945 282787304 484885440 781210990 38816668 395395993 838574672 454240975 255192980 832720959 914724560 398169810 530404586 427946395 778149788 355156213 823729030 399535042 828249062 727886472 977114327 27016610 229033558 463...
output:
19016140130 3 6
result:
ok 3 number(s): "19016140130 3 6"
Test #58:
score: 0
Accepted
time: 163ms
memory: 71704kb
input:
200000 30 40885865 263354589 93156407 136470016 59347187 998382602 699372728 916172294 333123225 25081036 545393700 878410248 62781679 936220374 577615681 826319614 465875958 937227353 398174494 924481572 197172525 908289576 725695582 979312738 879406232 394099182 275423196 335171732 266552339 47971...
output:
8514591093 3 6
result:
ok 3 number(s): "8514591093 3 6"
Test #59:
score: 0
Accepted
time: 176ms
memory: 71932kb
input:
200000 30 218143046 695641768 92226436 227616217 748254040 820852484 910233731 844524575 591426426 563918374 346938024 582762867 65650324 49603552 121376745 114885560 648431138 844881116 265944402 715984040 616195262 461422937 627662135 264123141 930563402 691715673 868699357 716955782 377700047 127...
output:
6352889338 3 6
result:
ok 3 number(s): "6352889338 3 6"
Test #60:
score: 0
Accepted
time: 168ms
memory: 70004kb
input:
200000 30 100432935 169398143 722700245 245133491 773597382 716951293 752498515 67844147 439664211 512821128 148482347 360744414 363486260 531582952 443799446 403451507 199582536 678905950 543779727 138890287 740250708 645960080 161032467 212497057 276687863 357928383 167008225 320078195 193880463 1...
output:
13958938825 3 6
result:
ok 3 number(s): "13958938825 3 6"
Test #61:
score: 0
Accepted
time: 173ms
memory: 71884kb
input:
200000 30 572657408 306718031 426802982 967683473 167536942 244453883 299796006 701229137 287901995 756691174 581430452 433693252 661322196 308529642 987560511 692017454 87170424 881527004 411549635 340458172 527869664 904126151 62999019 497307461 622812325 729173803 760284386 333266025 231399244 15...
output:
10140163945 3 6
result:
ok 3 number(s): "10140163945 3 6"
Test #62:
score: 0
Accepted
time: 163ms
memory: 71748kb
input:
200000 30 454947297 739005210 57276791 985200747 266509212 66923765 805624301 998177638 841172489 295528512 382974776 916707508 664190841 421912821 236354283 349179620 974758312 715551838 984352252 131960640 946892402 457259513 964965573 77085156 673969495 26790293 763625963 10017366 342546952 47079...
output:
4797645833 3 6
result:
ok 3 number(s): "4797645833 3 6"
Extra Test:
score: 0
Extra Test Passed