QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#414506 | #8208. Beer Circuits | ucup-team1231 | AC ✓ | 1139ms | 88948kb | C++20 | 4.5kb | 2024-05-19 05:24:53 | 2024-05-19 05:24:54 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
typedef vector<pair<int,int> > vpii;
typedef vector<int> vi;
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef long long int LLI;
#define SZ 300099
int n,k;
typedef pair<int,int> pii;
pii p[SZ];
ll sqr(ll a) {return a*a;}
#define fi first
#define se second
ll dis(const pii&a,const pii&b) {
return sqr(a.fi-b.fi)+sqr(a.se-b.se);
}
ll dis(int a,int b) {return dis(p[a],p[b]);}
typedef double ld;
const ll G=1.5e9;
vector<pair<ll,int>> gx;
bool chkgrid(ld g) {
gx.clear();
for(int i=1;i<=n;++i) {
int X=(p[i].first+0.5)/g,Y=(p[i].second+0.5)/g;
ll s=X*G+Y;
gx.push_back({s,i});
}
sort(gx.begin(),gx.end());
for(int r=0;r<gx.size();++r) {
int l=r;
while(r+1<gx.size()&&gx[r].fi==gx[r+1].fi) ++r;
if(r-l+1>=3) return 1;
}
return 0;
}
int ff[SZ];
int gf(int x) {
return ff[x]?ff[x]=gf(ff[x]):x;
}
vector<int> adj[SZ];
int vis[SZ];
int TS=0;
template<int typ>
bool bfs(int S,int up) {
++TS;
if(typ&&vis[S]==TS-1) return 1;
static int qs[SZ],dis[SZ]; int h=0,t=0;
if(up==0) return 0;
vis[S]=TS; dis[S]=0;
qs[t++]=S;
while(h^t) {
int x=qs[h++];
// cerr<<typ<<">"<<x<<":"<<up<<" "<<dis[x]<<"++\n";
for(auto b:adj[x]) {
// cerr<<x<<"->"<<b<<"\n";
if(vis[b]==TS-1&&typ) return 1;
if(vis[b]==TS) continue;
vis[b]=TS; dis[b]=dis[x]+1;
if(dis[b]!=up) qs[t++]=b;
}
}
return 0;
}
int TAR;
namespace D0 {
int ins[SZ];
int vx[SZ];
int md[SZ],ff[SZ];
void dfs0(int s,int dis,int maxd) {
if(ins[s]) return;
if(vx[s]!=TS) {
vx[s]=TS; md[s]=2e9; ff[s]=0;
}
if(dis<md[s]) {
md[s]=dis, ++ff[s];
}
if(dis==maxd) return;
ins[s]=1;
for(auto b:adj[s]) dfs0(b,dis+1,maxd);
ins[s]=0;
}
}
int main() {
cin>>n>>k;
for(int i=1;i<=n;++i)
cin>>p[i].fi>>p[i].se;
ld l=0.9999,r=2e9;
for(int i=1;i<=50;++i) {
auto m=(l+r)/2;
if(chkgrid(m/sqrt(2))) r=m;
else l=m;
}
ld Grid=l/sqrt(2);
chkgrid(Grid);
map<ll,vector<pii>> es;
ll aa=0;
for(int i=0;i<gx.size();++i) {
int X=gx[i].fi/G,Y=gx[i].fi%G;
for(int dx=-4;dx<=4;++dx) {
for(int dy=-4;dy<=4;++dy) {
int DX=max(abs(dx)-1,0);
int DY=max(abs(dy)-1,0);
//sqrt((DX^2+DY^2)/2)>=1
if(DX*DX+DY*DY>=2) continue;
if(pii(dx,dy)<pii(-dx,-dy)) continue;
if(X+dx<0||Y+dy<0) continue;
ll NX=(X+dx)*G+Y+dy;
auto s=lower_bound(gx.begin(),gx.end(),mp(NX,-1))-gx.begin();
for(int ii=s;ii<gx.size();++ii) {
if(gx[ii].fi!=NX) break;
int j=gx[ii].se;
int I=gx[i].se;
if(I!=j) {
es[dis(I,j)].pb({I,j});
}
// cout<<i<<"~"<<j<<"\n";
}
}
}
}
set<pii> vv;
for(auto &g:es) {
ll D=g.fi;
// cerr<<D<<" "<<g.se.size()<<"++\n";
bool found=0;
for(auto e:g.se) {
if(e.fi>e.se) swap(e.fi,e.se);
if(e.fi==e.se) continue;
if(vv.count(e)) continue;
vv.insert(e);
int x=e.fi,y=e.se;
int X=gf(x),Y=gf(y);
// cerr<<x<<"--"<<y<<"\n";
if(X!=Y) {
ff[X]=Y;
}
else {
// cerr<<"??\n";
// cerr<<x<<"--"<<y<<"\n";
bfs<0>(x,k/2+1);
if(bfs<1>(y,k-k/2)) {
found=1;
using namespace D0;
TAR=y;
dfs0(x,1,k);
assert(vx[y]==TS);
// cerr<<x<<"->"<<y<<" "<<md[y]<<","<<D0::ff[y]<<"\n";
if(k<md[y]) continue;
if(k>md[y]) k=md[y],aa=0;
if(k==md[y]) aa+=D0::ff[y];
// dfs1(Y,k-k/2);
}
}
// is it a good edge?
adj[x].pb(y);
adj[y].pb(x);
}
if(found) {
cout<<D<<"\n"<<k<<"\n"<<aa*k*2<<"\n";
return 0;
}
}
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 11776kb
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: 2ms
memory: 9680kb
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: 2ms
memory: 9716kb
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: 2ms
memory: 9744kb
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: 2ms
memory: 9956kb
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: 9876kb
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: 11780kb
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: 11936kb
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: 11984kb
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: 1ms
memory: 9744kb
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: 2ms
memory: 9732kb
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: 0ms
memory: 9744kb
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: 2ms
memory: 9880kb
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: 9956kb
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: 11920kb
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: 2ms
memory: 11920kb
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: 2ms
memory: 9740kb
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: 2ms
memory: 9740kb
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: 2ms
memory: 11976kb
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: 2ms
memory: 11788kb
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: 2ms
memory: 9680kb
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: 12000kb
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: 865ms
memory: 48036kb
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: 866ms
memory: 57100kb
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: 860ms
memory: 49368kb
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: 884ms
memory: 48496kb
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: 874ms
memory: 46704kb
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: 868ms
memory: 43888kb
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: 866ms
memory: 47524kb
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: 842ms
memory: 47912kb
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: 844ms
memory: 46984kb
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: 860ms
memory: 47444kb
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: 786ms
memory: 45940kb
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: 806ms
memory: 45800kb
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: 850ms
memory: 46104kb
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: 829ms
memory: 44016kb
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: 795ms
memory: 46196kb
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: 832ms
memory: 44732kb
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: 738ms
memory: 44272kb
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: 842ms
memory: 47448kb
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: 822ms
memory: 45776kb
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: 549ms
memory: 42320kb
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: 560ms
memory: 49432kb
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: 574ms
memory: 47408kb
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: 227ms
memory: 28360kb
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: 499ms
memory: 39256kb
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: 944ms
memory: 79232kb
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: 991ms
memory: 84016kb
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: 273ms
memory: 28356kb
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: 542ms
memory: 47080kb
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: 1127ms
memory: 86832kb
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: 1139ms
memory: 88948kb
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: 236ms
memory: 13844kb
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: 486ms
memory: 14484kb
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: 1026ms
memory: 15844kb
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: 1023ms
memory: 20576kb
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: 1029ms
memory: 18892kb
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: 1029ms
memory: 18728kb
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: 1031ms
memory: 18472kb
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: 1029ms
memory: 22508kb
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: 1029ms
memory: 19640kb
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: 1016ms
memory: 17712kb
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