QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#622509 | #8821. Nightmare | Crysfly | AC ✓ | 564ms | 15068kb | C++14 | 5.4kb | 2024-10-08 22:12:28 | 2024-10-08 22:12:28 |
Judging History
answer
// what is matter? never mind.
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
return f?-x:x;
}
int mod;
struct modint{
unsigned int x;
modint(int o=0){x=o;}
modint &operator = (int o){return x=o,*this;}
modint &operator +=(modint o){return x=x+o.x>=mod?x+o.x-mod:x+o.x,*this;}
modint &operator -=(modint o){return x=x<o.x?x-o.x+mod:x-o.x,*this;}
modint &operator *=(modint o){return x=1ll*x*o.x%mod,*this;}
modint &operator ^=(int b){
modint a=*this,c=1;
for(;b;b>>=1,a*=a)if(b&1)c*=a;
return x=c.x,*this;
}
modint &operator /=(modint o){return *this *=o^=mod-2;}
friend modint operator +(modint a,modint b){return a+=b;}
friend modint operator -(modint a,modint b){return a-=b;}
friend modint operator *(modint a,modint b){return a*=b;}
friend modint operator /(modint a,modint b){return a/=b;}
friend modint operator ^(modint a,int b){return a^=b;}
friend bool operator ==(modint a,modint b){return a.x==b.x;}
friend bool operator !=(modint a,modint b){return a.x!=b.x;}
bool operator ! () {return !x;}
modint operator - () {return x?mod-x:0;}
bool operator <(const modint&b)const{return x<b.x;}
};
inline modint qpow(modint x,int y){return x^y;}
vector<modint> fac,ifac,iv;
inline void initC(int n)
{
if(iv.empty())fac=ifac=iv=vector<modint>(2,1);
int m=iv.size(); ++n;
if(m>=n)return;
iv.resize(n),fac.resize(n),ifac.resize(n);
For(i,m,n-1){
iv[i]=iv[mod%i]*(mod-mod/i);
fac[i]=fac[i-1]*i,ifac[i]=ifac[i-1]*iv[i];
}
}
inline modint C(int n,int m){
if(m<0||n<m)return 0;
return initC(n),fac[n]*ifac[m]*ifac[n-m];
}
inline modint sign(int n){return (n&1)?(mod-1):(1);}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 2000005
#define inf 0x3f3f3f3f
int n;
modint g[505][505],res[505][505];
struct oper{
int op,i,j;
modint w;
};
vector<oper>qs;
void add(int i,int j,modint w){
qs.pb({1,i,j,w});
For(k,1,n) if(k!=i && k!=j) g[i][k]+=g[j][k]*w,g[k][i]+=g[k][j]*w;
g[i][i]+=(g[i][j]*w*2+g[j][j]*w*w);
g[i][j]+=g[j][j]*w;
g[j][i]+=g[j][j]*w;
}
void sw(int i,int j){
if(i==j)return;
qs.pb({0,i,j,0});
For(k,1,n) if(k!=i && k!=j) swap(g[i][k],g[j][k]),swap(g[k][i],g[k][j]);
swap(g[i][i],g[j][j]);
}
int sqr[maxn];
int p;
void out(){
reverse(ALL(qs));
for(auto [op,i,j,w]:qs){
if(op==0) swap(res[i],res[j]);
else{
For(k,1,p) res[i][k]-=res[j][k]*w;
}
}
cout<<p<<"\n";
For(i,1,n){
For(j,1,p)cout<<res[i][j].x<<" \n"[j==p];
}
exit(0);
}
signed main()
{
n=read(),mod=read();
For(i,1,n) For(j,1,n) g[i][j]=read();
For(i,0,mod) sqr[i]=-1;
For(i,0,mod-1){
modint t=i; t*=i;
sqr[t.x]=i;
}
bool flag=1;
int sums=0;
p=1;
while(1){
++sums;
if(sums>3000){
puts("????");
cout<<"flag,p "<<flag<<" "<<p<<"\n";
For(i,p,p+2)For(j,p,p+2)cout<<g[i][j].x<<" \n"[j==p+2];
exit(0);
}
bool ok=0;
For(i,p,n){
if(g[i][i].x){
sw(i,p);
modint I=1/g[p][p];
For(j,p+1,n) add(j,p,-I*g[j][p]);
++p; ok=1; break;
}
}
if(ok)continue;
auto find2=[&](){
For(i,p,n) For(j,i+1,n) if(g[i][j].x){
if(sums>2000) cout<<"find2 "<<i<<" "<<j<<"\n";
sw(i,p),sw(j,p+1);
return 1;
}
return 0;
};
if(!find2()) break;
if(mod>2){
add(p,p+1,1);
continue;
}
For(k,p+2,n){
if(g[p][k].x) add(k,p+1,1);
if(g[p+1][k].x) add(k,p,1);
}
if(p>1 && flag){
if(sums>2000){
For(k,p-1,p+1) For(kk,p-1,p+1) cout<<g[k][kk].x<<" \n"[kk==p+1]; puts("---");
}
add(p,p-1,1);
add(p+1,p-1,1);
add(p-1,p,1);
add(p-1,p+1,1);
if(sums>2000){
For(k,p-1,p+1) For(kk,p-1,p+1) cout<<g[k][kk].x<<" \n"[kk==p+1]; puts("---");
}
p-=1;
flag=1;
continue;
}
flag=0;
p+=2;
}
--p;
// For(i,1,n){
// For(j,1,n)cout<<g[i][j].x<<" ";
// cout<<"\n";
// }
if(mod==2 && !flag){
++p;
For(i,1,p-1){
For(j,1,i) res[i][j]=1;
res[i][p]=1;
if(i%2==0) res[i][i-1]=0;
}
out();
}
ll z=0;
For(i,0,mod-1){
modint y=i; y*=i,y+=1;
if(sqr[y.x]==-1) z=i;
}
modint z2=(1ll*z*z+1)%mod;
int lst=0;
For(i,1,p){
if(sqr[g[i][i].x]!=-1) res[i][i]=sqr[g[i][i].x];//cout<<"isok "<<i<<"\n";
else if(!lst) lst=i;
else {
int j=lst; lst=0;
res[i][i]=z;
res[j][j]=z;
res[i][j]=1;
res[j][i]=mod-1;
modint zz=sqr[(g[i][i]/z2).x];
res[i][j]*=zz,res[i][i]*=zz;
zz=sqr[(g[j][j]/z2).x];
res[j][j]*=zz,res[j][i]*=zz;
}
}
if(lst){
++p;
int i=lst;
res[i][i]=1;
res[i][p]=z;
modint zz=sqr[(g[i][i]/z2).x];
res[i][i]*=zz,res[i][p]*=zz;
}
// For(i,1,n) For(j,1,p) cout<<res[i][j].x<<" \n"[j==p];
out();
return 0;
}
/*
5 2
1 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 0 0 0 1
0 0 0 1 0
2 2
0 1
1 0
3 5
4 4 3
4 4 3
3 3 2
*/
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 5812kb
input:
2 2 1 1 1 1
output:
1 1 1
result:
ok accepted
Test #2:
score: 0
Accepted
time: 0ms
memory: 6068kb
input:
3 5 4 4 3 4 4 3 3 3 2
output:
2 3 0 3 0 1 4
result:
ok accepted
Test #3:
score: 0
Accepted
time: 506ms
memory: 9000kb
input:
500 2 1 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 ...
output:
423 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 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 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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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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok accepted
Test #17:
score: 0
Accepted
time: 530ms
memory: 7312kb
input:
500 2 0 0 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 1 ...
output:
451 0 1 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 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 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 0 0 0 0 0 0 0 0 0 0 ...
result:
ok accepted
Test #18:
score: 0
Accepted
time: 525ms
memory: 13028kb
input:
500 586939 348375 543104 2613 525830 529938 63001 57038 406207 446773 47968 73017 238901 268124 473469 570747 217880 286012 142821 179125 504343 438813 105553 332560 137383 123166 585260 335875 279206 541274 318826 12120 49682 487559 275080 491437 102596 71097 184988 184272 439469 251082 388754 2144...
output:
449 292903 292903 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 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 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 ...
result:
ok accepted
Test #19:
score: 0
Accepted
time: 525ms
memory: 12988kb
input:
500 708479 430409 569258 261799 182975 708191 672266 333475 399713 455200 10787 513014 625082 198117 148705 160145 273910 434275 500198 432148 240056 148493 234124 337066 4702 519312 300692 543467 367352 301531 37892 595388 394191 252456 681305 3433 251169 388731 556515 689401 244646 463416 247313 3...
output:
422 305345 0 0 0 0 61069 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 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 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...
result:
ok accepted
Test #20:
score: 0
Accepted
time: 543ms
memory: 10836kb
input:
500 536353 282284 26783 302619 745 270890 322461 121117 217171 372053 158072 353911 244194 270214 467598 52826 188240 61415 194385 28874 49172 73157 153266 187497 241906 343567 452564 142065 292558 320746 246948 302112 65546 172785 20319 353065 390695 501673 417771 204902 191768 389623 508148 115479...
output:
462 412993 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 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 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...
result:
ok accepted
Test #21:
score: 0
Accepted
time: 529ms
memory: 12976kb
input:
500 731539 13571 549608 603965 70150 187674 571744 319686 82634 170226 159605 247895 465047 546161 479622 397994 512183 666123 252309 35408 432021 398005 688503 303962 437442 221319 217584 541049 131946 632312 421528 31536 698830 251801 104075 388920 528314 541589 246062 717474 559558 87195 573748 1...
output:
430 241059 241059 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 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 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 ...
result:
ok accepted
Test #22:
score: 0
Accepted
time: 563ms
memory: 12972kb
input:
500 792317 84947 16783 565500 552076 289228 244224 357468 734231 240096 129692 212949 615651 220944 470008 99547 601222 711272 201747 74877 538265 728111 530412 595302 669646 447968 782343 763934 466571 619363 538063 345390 259792 285393 628364 627346 506983 699490 643743 752307 760384 778585 560537...
output:
493 282523 0 282523 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 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 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 ...
result:
ok accepted
Test #23:
score: 0
Accepted
time: 552ms
memory: 10936kb
input:
500 788999 467390 293281 94689 510834 369049 599628 559595 729404 760483 569261 759601 265426 310089 132157 453862 195716 480683 235518 720559 665971 380400 424938 45862 246625 124077 537274 119830 619359 549385 626400 269482 260674 598657 576554 12504 593239 137071 59829 122033 293214 583569 428648...
output:
471 336296 0 0 0 84074 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 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 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...
result:
ok accepted
Test #24:
score: 0
Accepted
time: 539ms
memory: 10976kb
input:
500 765521 159142 161816 248659 153740 378501 248839 82570 96584 608251 334043 386921 532144 67980 146244 223871 546582 723819 436866 562874 589721 127800 369341 180799 605736 157096 402949 475274 488804 440970 328121 526198 264775 742245 520758 710495 272547 680596 779 302583 81553 745247 240518 71...
output:
458 539959 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 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 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...
result:
ok accepted
Test #25:
score: 0
Accepted
time: 528ms
memory: 12980kb
input:
500 924743 244236 879063 368210 362213 103008 691288 501220 351123 892165 15730 193772 698417 88679 903715 605093 380580 373054 772553 533129 229564 780646 723026 557840 922477 828162 42265 888247 683525 45653 544975 63079 661940 699113 0 419635 679777 578214 496242 636962 248880 631041 162473 35456...
output:
430 475778 0 0 0 237889 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 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 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 ...
result:
ok accepted
Test #26:
score: 0
Accepted
time: 528ms
memory: 10980kb
input:
500 528667 356442 159923 525463 56086 476091 154898 505863 272788 514507 222228 302954 140310 431024 428194 148563 528490 117955 198641 363452 359687 1545 33028 365983 9518 179356 303537 24207 173859 201783 389340 399337 342961 161976 302909 180978 212749 267464 249093 377318 486422 80988 243585 211...
output:
436 233365 0 0 233365 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 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 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 ...
result:
ok accepted
Test #27:
score: 0
Accepted
time: 551ms
memory: 10932kb
input:
500 627643 344228 367558 49258 431868 272927 310750 468577 244314 218066 351337 297847 205353 594016 47667 526848 231930 350736 404286 156859 35005 305865 162302 197500 593997 575513 254921 545608 444956 143231 271147 89444 201858 465504 124100 65183 294503 320309 207812 311521 304440 136873 332226 ...
output:
468 464358 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 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 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...
result:
ok accepted
Test #28:
score: 0
Accepted
time: 539ms
memory: 12984kb
input:
500 881119 785527 688446 400798 864795 752811 427370 305276 335120 139198 440428 225723 515052 627362 101089 410079 52289 783834 795010 652273 68364 638260 214442 816240 331512 783495 260103 367060 744068 381212 450408 876718 794950 498940 735542 660098 267964 60287 229158 561450 177567 129341 28939...
output:
437 432892 439026 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 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 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 ...
result:
ok accepted
Test #29:
score: 0
Accepted
time: 521ms
memory: 11028kb
input:
500 565039 320150 411550 139094 471000 287647 61660 395796 190482 530893 69280 549320 467451 551770 417285 312900 35288 515148 180836 438971 209209 290634 174460 151900 217364 91660 249166 180836 484933 135355 97112 498275 545745 103369 520446 339236 305093 546237 324510 258562 543706 211171 164849 ...
output:
426 266600 0 66650 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 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 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...
result:
ok accepted
Test #30:
score: 0
Accepted
time: 529ms
memory: 10912kb
input:
500 803441 531499 190861 173677 285415 25495 788732 651678 561976 745996 396299 121797 78597 531534 200721 717497 579007 665944 449917 266591 348750 404603 775558 193881 76964 280693 785088 331299 10906 580209 243574 210696 785095 559461 273396 730026 103101 299419 76238 352678 678726 292761 543849 ...
output:
442 555365 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 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 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...
result:
ok accepted
Test #31:
score: 0
Accepted
time: 539ms
memory: 10920kb
input:
500 874063 637775 628280 669188 865652 105446 71178 406660 292361 577547 152887 563847 593456 255750 176211 139071 276131 673002 513275 458893 857466 651002 74198 552761 292265 251075 770299 181693 209601 774351 848649 8037 576081 103621 784688 856622 40183 674914 840986 226686 82499 515910 739831 3...
output:
458 545745 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 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 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...
result:
ok accepted
Test #32:
score: 0
Accepted
time: 561ms
memory: 10932kb
input:
500 548579 527514 414887 138172 417237 539313 388911 206623 468608 545062 312198 199524 277129 396148 359171 278642 258392 530391 29105 350078 545634 392866 97321 199124 473632 328076 449482 64000 234422 544237 59058 416621 518439 275036 182997 344419 356340 200856 249756 392228 160983 140823 398316...
output:
494 540777 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 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 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...
result:
ok accepted
Test #33:
score: 0
Accepted
time: 76ms
memory: 5852kb
input:
500 5 4 3 2 2 4 1 2 2 0 3 1 2 3 0 2 0 4 3 0 4 4 3 1 0 1 4 1 1 3 0 4 3 0 4 2 3 2 3 3 3 4 0 1 2 1 2 2 4 0 0 4 2 2 3 1 2 2 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 1 1 1 1 0 0 0 1 0 1 1 0 1 1
result:
ok accepted
Test #36:
score: 0
Accepted
time: 1ms
memory: 6016kb
input:
10 2 0 1 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 0 0 1
output:
3 1 1 0 1 0 0 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0
result:
ok accepted
Test #37:
score: 0
Accepted
time: 1ms
memory: 6540kb
input:
10 2 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0
output:
6 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 1
result:
ok accepted
Test #38:
score: 0
Accepted
time: 0ms
memory: 5808kb
input:
10 2 0 0 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1
output:
9 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 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0 1 1
result:
ok accepted
Test #41:
score: 0
Accepted
time: 0ms
memory: 7296kb
input:
10 3 1 2 1 1 0 2 0 2 0 1 2 1 2 2 0 1 0 1 0 2 1 2 1 1 0 2 0 2 0 1 1 2 1 1 0 2 0 2 0 1 0 0 0 0 0 0 0 0 0 0 2 1 2 2 0 1 0 1 0 2 0 0 0 0 0 0 0 0 0 0 2 1 2 2 0 1 0 1 0 2 0 0 0 0 0 0 0 0 0 0 1 2 1 1 0 2 0 2 0 1
output:
1 2 1 2 2 0 1 0 1 0 2
result:
ok accepted
Test #42:
score: 0
Accepted
time: 2ms
memory: 7012kb
input:
10 3 2 2 1 0 2 0 1 0 2 2 2 1 2 1 2 0 0 1 2 1 1 2 1 2 1 0 0 2 1 2 0 1 2 2 0 0 1 2 0 1 2 2 1 0 2 0 1 0 2 2 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 2 2 0 0 1 2 0 1 2 2 1 0 2 0 1 0 2 2 2 1 2 1 2 0 0 1 2 1
output:
2 1 1 0 2 0 1 1 2 1 1 0 0 1 0 1 2 1 1 0 2
result:
ok accepted
Test #43:
score: 0
Accepted
time: 2ms
memory: 7292kb
input:
10 3 1 2 2 0 2 2 2 1 2 0 2 1 1 0 1 1 1 2 1 0 2 1 0 1 2 0 0 0 1 0 0 0 1 1 2 0 0 1 2 2 2 1 2 2 0 2 2 1 1 0 2 1 0 0 2 2 2 2 0 2 2 1 0 0 2 2 2 2 0 2 1 2 0 1 1 2 2 2 1 2 2 1 1 2 1 0 0 1 0 2 0 0 0 2 0 2 2 2 2 2
output:
3 2 0 0 1 0 0 1 1 1 0 1 0 1 2 2 1 0 2 1 0 2 2 1 0 1 2 1 0 2 1
result:
ok accepted
Test #44:
score: 0
Accepted
time: 0ms
memory: 6400kb
input:
10 3 2 2 1 2 2 0 1 1 0 1 2 2 1 1 1 2 0 1 2 2 1 1 0 1 2 0 0 1 2 1 2 1 1 0 0 2 2 1 0 0 2 1 2 0 1 1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1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 0 0 1 0 0 2 1 0 1 0 0 0 1 0 2 0 0 0 0 0 0 0 1 1 1 1 0 2 0 1 1 0 0 2 0 0 0 2 2 0 0 0 1 2 2 1 0 2 0 0 0 0 0 0 0 1 0 2 2 0 2 0 2 0 0 2 2 1 2 0 1 2
result:
ok accepted
Test #47:
score: 0
Accepted
time: 0ms
memory: 5984kb
input:
10 3 2 0 1 0 2 1 1 0 1 1 0 1 2 1 1 0 1 1 2 1 1 2 1 2 0 1 1 0 2 0 0 1 2 2 1 1 1 2 0 0 2 1 0 1 1 2 1 2 1 0 1 0 1 1 2 0 2 1 2 2 1 1 1 1 1 2 0 0 1 2 0 1 0 2 2 1 0 0 1 0 1 2 2 0 1 2 1 1 0 0 1 1 0 0 0 2 2 0 0 1
output:
10 1 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 2 1 2 0 0 0 0 2 0 0 0 2 0 2 0 0 0 0 0 0 1 2 0 0 2 0 0 1 0 0 2 0 1 2 2 2 0 2 0 0 2 2 0 0 1 2 2 2 0 0 2 2 2 2 2 0 0 1 0 0 0 1 1 2 2 0 2 1 0 0 2 2 1 1 2 1 2 2 2 1
result:
ok accepted
Test #48:
score: 0
Accepted
time: 9ms
memory: 11480kb
input:
10 999983 900098 802402 520434 486042 694910 841635 935386 505713 9608 649949 802402 340817 164002 3557 340269 604474 506230 908379 166012 245746 520434 164002 996037 189604 273951 298459 470013 277257 472321 974461 486042 3557 189604 371943 393534 406992 782080 87700 638744 396130 694910 340269 273...
output:
1 618188 549155 658621 35656 69956 40621 655160 778652 492942 717578
result:
ok accepted
Test #49:
score: 0
Accepted
time: 4ms
memory: 13412kb
input:
10 999983 768262 558804 277458 285926 439630 134615 762784 898190 597074 76197 558804 380890 749912 788141 492653 293208 11856 38114 210623 202926 277458 749912 868265 662363 729079 763549 637459 326921 676018 239713 285926 788141 662363 981831 666411 873784 187770 90098 854651 529364 439630 492653 ...
output:
2 955752 477876 777549 673502 847149 525701 727338 605234 203314 471590 896092 119717 624743 536572 435366 510588 88187 518394 692829 958243
result:
ok accepted
Test #50:
score: 0
Accepted
time: 6ms
memory: 13404kb
input:
10 999983 385940 204279 342337 542867 378185 549096 256235 125820 158688 728987 204279 72506 894700 353069 450763 87057 165993 378073 992646 138662 342337 894700 218152 616944 458774 743752 234752 567849 916677 824505 542867 353069 616944 675186 788277 532898 187587 218019 898388 455523 378185 45076...
output:
3 766849 0 0 963493 916500 0 401336 503173 753063 74267 746913 651292 693103 779628 872818 697902 331176 595822 541142 365532 482335 639432 403313 941368 305192 724391 82778 844188 134587 470880
result:
ok accepted
Test #51:
score: 0
Accepted
time: 5ms
memory: 11356kb
input:
10 999983 425921 385949 583550 335993 701366 299727 429383 136809 972617 284460 385949 840342 535563 307758 388917 307642 867627 42356 239900 163012 583550 535563 558920 379956 751958 132524 203381 703911 940347 828640 335993 307758 379956 759081 863512 667611 928047 599794 412688 130111 701366 3889...
output:
10 958586 0 479293 0 0 0 0 0 0 0 274172 604145 137086 0 0 0 0 0 0 0 271325 549136 216905 0 0 0 0 0 0 0 483966 46250 906262 728454 0 364227 0 0 0 0 148882 366909 484975 731599 828252 865791 0 0 0 0 695099 233096 399452 28314 827042 533487 0 0 0 0 808305 335960 635499 503842 462239 688516 811598 0 0 4...
result:
ok accepted
Test #52:
score: 0
Accepted
time: 9ms
memory: 11332kb
input:
10 999983 927130 398272 505832 858589 95614 813668 267988 860311 408347 279012 398272 928160 167756 270068 485788 725503 910864 495299 935879 838766 505832 167756 910188 396194 213412 718498 403332 875248 815660 833250 858589 270068 396194 817050 895301 878811 521319 567337 615109 729030 95614 48578...
output:
11 659008 0 0 0 0 0 0 0 0 0 0 715828 705480 0 0 0 0 0 0 0 0 0 635090 37825 603464 0 0 0 0 0 0 0 0 132873 505798 64219 545652 0 0 0 0 0 0 0 962834 355487 873121 909162 501903 0 0 0 0 0 0 807656 961858 738820 556208 224560 822887 0 0 0 0 0 881826 1591 670194 747592 400027 950423 772066 386033 0 0 0 44...
result:
ok accepted
Test #53:
score: 0
Accepted
time: 8ms
memory: 11356kb
input:
10 999983 498039 257046 662783 228246 818936 655312 727785 300272 255829 965115 257046 303781 323258 41182 936918 738766 727887 147787 827039 276312 662783 323258 61125 294495 814151 924632 78764 127981 375093 597064 228246 41182 294495 680708 594432 523824 77403 392441 439663 985823 818936 936918 8...
output:
11 800834 400417 0 0 0 0 0 0 0 0 0 637317 85553 0 0 0 0 0 0 0 0 0 623830 802005 479230 239615 0 0 0 0 0 0 0 627994 574628 298765 31217 0 0 0 0 0 0 0 491334 923904 989945 651668 765106 382553 0 0 0 0 0 873934 98385 782230 966932 541322 315917 0 0 0 0 0 554468 688881 995762 235081 931496 891374 490654...
result:
ok accepted
Test #54:
score: 0
Accepted
time: 4ms
memory: 11480kb
input:
10 999983 794854 842086 610105 159750 765999 139819 402779 735423 634341 965059 842086 78734 923242 62440 311760 970720 420675 108858 809356 125840 610105 923242 646882 315889 328927 52993 946670 206674 108625 725029 159750 62440 315889 234902 461980 796928 904896 873016 710238 15827 765999 311760 3...
output:
10 541156 0 0 0 0 0 0 0 0 0 958670 709107 0 0 0 0 0 0 0 0 268409 29136 609187 0 0 0 0 0 0 0 15053 544350 487470 925588 0 462794 0 0 0 0 83390 745709 828431 138158 667880 69079 0 0 0 0 78407 862376 791003 796950 75968 470656 0 0 0 0 963202 416903 326504 733510 627748 702969 713591 0 0 0 754150 218382...
result:
ok accepted
Test #55:
score: 0
Accepted
time: 4ms
memory: 6956kb
input:
499 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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result:
ok accepted
Test #68:
score: 0
Accepted
time: 551ms
memory: 8840kb
input:
499 3 0 1 1 0 2 1 0 0 0 0 0 2 2 1 0 1 1 1 0 0 2 2 0 0 1 1 2 1 0 2 1 2 1 2 0 1 2 0 2 0 1 0 1 2 0 0 1 0 2 1 1 1 1 2 1 1 1 0 2 1 2 0 2 2 0 0 1 2 0 2 1 2 1 0 0 0 0 1 0 0 0 0 1 1 2 0 0 2 1 2 1 1 2 1 1 2 0 0 2 2 0 2 1 1 1 2 1 1 0 2 2 2 1 0 1 2 2 0 2 0 1 1 0 1 1 0 0 2 1 0 2 0 2 0 2 0 2 0 1 1 2 2 1 0 1 1 2 ...
output:
499 2 2 0 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 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 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 ...
result:
ok accepted
Test #69:
score: 0
Accepted
time: 12ms
memory: 11512kb
input:
499 999983 970837 427661 805761 200148 399828 346930 330428 982688 709181 324151 524971 183334 923458 82142 473534 510545 870154 18642 47931 569563 419485 305754 583850 439217 66776 812819 27536 471682 789059 710166 645270 514327 404542 546798 479171 41395 696425 288117 294318 305008 666751 32186 90...
output:
1 795549 385979 820330 163922 866033 959206 350981 998139 946775 520358 398667 581145 133787 173774 536054 890211 253687 728428 462865 374454 27669 448204 416682 635082 677938 853230 34563 7736 23304 401645 698450 690502 526154 658810 162507 252747 564849 493504 112385 53971 941962 674250 267877 644...
result:
ok accepted
Test #70:
score: 0
Accepted
time: 13ms
memory: 11516kb
input:
499 999983 533875 87744 626216 37778 731741 168794 445497 743977 863692 923447 231444 923414 652989 504098 790116 196619 807203 40663 144203 354992 326588 246947 662427 387876 715651 47913 585267 320718 308716 209040 304198 957834 265517 330433 385011 370722 74984 210539 926382 883135 988103 67790 6...
output:
2 874850 0 367522 653246 70295 388244 475198 91306 637497 481610 294768 432505 357474 104365 233158 292489 955664 284570 821089 849880 115769 817251 885843 482776 382765 387916 972201 300420 119960 432251 603530 958582 196613 570124 601909 639379 639995 839464 741116 252265 841232 870770 300665 2929...
result:
ok accepted
Test #71:
score: 0
Accepted
time: 20ms
memory: 11492kb
input:
499 999983 2937 547009 321576 824612 108353 810578 665998 252457 601828 968640 174756 690117 339121 770842 954234 528779 527546 353945 914902 14559 260774 272457 762505 48537 651979 127362 818807 743546 548176 144903 988235 942670 405772 519014 525108 252319 203885 219287 367589 964377 121564 779920...
output:
3 657606 0 0 177224 365446 182723 353723 652780 663510 656447 80866 361771 151783 382717 559655 628528 46896 412632 439804 834366 321411 107271 279964 750344 794822 326312 813925 11680 513851 689455 420336 404378 121825 476599 444789 956977 967568 633800 427488 468818 240237 413525 835080 727864 206...
result:
ok accepted
Test #72:
score: 0
Accepted
time: 26ms
memory: 11556kb
input:
499 999983 350266 429618 856147 184280 953449 569731 295774 868477 664109 572685 197012 150590 921369 781202 169142 576692 489388 532752 219999 803116 605984 6721 950639 538213 127269 811205 390011 502900 990578 552900 837552 314528 283675 175485 711919 174439 938650 751597 302168 804145 248474 4823...
output:
10 602628 301314 0 0 0 0 0 0 0 0 428070 443686 0 0 0 0 0 0 0 0 247067 527042 897983 0 0 0 0 0 0 0 547041 68573 97036 339810 0 169905 0 0 0 0 651667 461592 618516 14712 800860 7356 0 0 0 0 847183 516020 84945 229159 522997 192554 0 0 0 0 727135 155964 53188 799482 915511 917775 624228 312114 0 0 5558...
result:
ok accepted
Test #73:
score: 0
Accepted
time: 158ms
memory: 11940kb
input:
499 999983 154837 490171 476591 873989 603733 657654 189694 679255 64938 355287 767618 589748 244490 696038 728838 399418 318743 508835 471628 933958 970459 267200 947576 205658 192267 599249 335696 971422 76494 835127 19056 807798 427743 696911 209000 774724 801939 907222 260519 380696 645885 82187...
output:
100 520653 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 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 75138 502706 0 251353 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...
result:
ok accepted
Test #74:
score: 0
Accepted
time: 561ms
memory: 15032kb
input:
499 999983 314402 626365 979397 783929 542573 97984 833545 67295 310723 203584 51160 425325 40635 443117 737034 380554 804627 322739 276948 200239 481288 116176 614901 216077 587236 907837 10079 82016 202133 817148 600225 969847 552970 802825 889201 856139 185058 591275 846774 770071 635713 470421 9...
output:
500 816496 0 408248 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 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 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 ...
result:
ok accepted
Test #75:
score: 0
Accepted
time: 564ms
memory: 12956kb
input:
499 999983 522565 659600 221619 337137 300499 935742 527918 80030 449590 559604 551624 210976 285716 108170 10016 392287 837766 503228 212998 614044 16231 651431 732096 967078 256577 139093 730149 31629 397097 526318 269534 7531 806611 997960 559072 637334 880503 370833 709258 507474 702839 751215 1...
output:
499 703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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 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 ...
result:
ok accepted
Test #90:
score: 0
Accepted
time: 16ms
memory: 11368kb
input:
500 999983 600084 354810 695356 694963 740261 976441 931057 451539 787514 587432 200361 32666 114363 223120 835769 636984 224102 884977 125791 54271 689191 288315 644648 920841 890752 754003 975055 395378 815025 326844 843860 832939 991340 164903 166709 179020 535873 242232 36311 719958 235327 71948...
output:
1 733001 538273 638082 509907 818222 596562 901409 613209 955004 56937 164648 257084 299554 755438 296465 569487 335267 261714 935189 494403 780033 339443 809559 531293 435307 48288 594899 571076 408658 119443 26957 381091 623818 279388 402765 975247 691310 256012 384832 158230 278751 49438 433429 2...
result:
ok accepted
Test #91:
score: 0
Accepted
time: 13ms
memory: 11464kb
input:
500 999983 236502 259388 894933 389412 31132 492352 66219 179383 751611 835854 894625 29869 505740 86443 436263 959089 919590 476734 315614 576241 87773 696110 869650 847487 323821 127730 110369 712354 250464 960583 20330 823541 310976 89061 548334 677494 249773 674827 906238 117481 542986 251993 29...
output:
2 510796 255398 364760 347237 863745 769926 519856 141931 808850 940687 53289 303937 187062 160934 983990 1662 500170 88216 619991 70299 172652 556739 135139 151813 893809 763175 363912 603883 620476 100075 689936 749012 817070 586595 493840 893722 443320 465980 401715 339283 933676 489929 355211 17...
result:
ok accepted
Test #92:
score: 0
Accepted
time: 15ms
memory: 11476kb
input:
500 999983 845665 40567 300445 360428 563105 631843 737281 289393 555114 908486 644983 798289 576515 139561 368173 474784 846747 372571 528775 291224 654637 59085 787713 221324 423820 530796 34969 404718 155974 346920 872305 21318 837913 197827 521695 345572 287218 932851 173228 801211 103457 391690...
output:
3 966462 483231 0 187274 114299 0 129195 230352 591528 272297 463601 483445 318623 70235 111251 613435 933194 549333 715318 608246 560088 388511 941496 733899 791044 933841 365127 209481 391984 982531 810059 357943 218551 60015 935929 415790 720697 141970 841436 767849 649961 503672 87581 105143 438...
result:
ok accepted
Test #93:
score: 0
Accepted
time: 27ms
memory: 11472kb
input:
500 999983 352638 3005 134609 158861 456935 487024 104305 501997 243595 664916 384997 818185 795608 396730 923463 33639 53077 887112 774020 382111 671811 462942 567818 67904 322375 229385 683518 979314 487183 536673 964850 665968 149320 472237 261544 18617 859314 465017 19885 537509 472299 897402 90...
output:
10 295902 147951 0 0 0 0 0 0 0 0 200917 105278 0 0 0 0 0 0 0 0 954438 60142 84284 42142 0 0 0 0 0 0 457803 416381 511557 50732 0 0 0 0 0 0 368629 427834 520436 181814 968727 0 0 0 0 0 651100 763959 542180 709667 456235 638757 0 0 0 0 604019 643916 379487 372190 460320 174315 710142 0 0 355071 469560...
result:
ok accepted
Test #94:
score: 0
Accepted
time: 157ms
memory: 11896kb
input:
500 999983 564414 184652 203275 785086 214667 381329 50398 492658 576572 68633 496317 742540 933273 167019 39155 68937 593470 407060 92281 343556 938557 458676 251350 803932 313687 413828 562249 119551 774099 380723 866898 650428 20020 400344 526016 398187 392697 690617 930161 405280 517232 987985 5...
output:
100 214740 0 0 107370 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 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 720510 547656 0 360255 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...
result:
ok accepted
Test #95:
score: 0
Accepted
time: 560ms
memory: 15068kb
input:
500 999983 408207 353421 412650 918446 272083 59504 213237 578503 520887 313427 285379 75257 796484 161024 118820 628274 690923 337630 991340 445603 325771 393393 251429 68301 472810 60629 108211 252846 459336 844975 61058 135355 280774 475274 628694 53345 654572 534617 694749 702577 961067 956206 1...
output:
500 813866 406933 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 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 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 ...
result:
ok accepted
Test #96:
score: 0
Accepted
time: 564ms
memory: 12968kb
input:
500 999983 382361 289975 349242 485522 253727 296806 446856 44186 627260 757617 500243 252398 818192 483600 765365 375268 953847 282377 937493 749855 462748 614289 853317 62709 917896 488953 484053 446068 304193 553543 813861 525322 369029 501387 165716 836725 730925 351900 82530 246841 316218 71813...
output:
501 199344 0 0 0 0 0 0 0 99672 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 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 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...
result:
ok accepted
Test #97:
score: 0
Accepted
time: 0ms
memory: 6960kb
input:
2 2 0 0 0 1
output:
1 0 1
result:
ok accepted
Test #98:
score: 0
Accepted
time: 1ms
memory: 6032kb
input:
2 2 1 1 1 0
output:
2 1 0 1 1
result:
ok accepted
Test #99:
score: 0
Accepted
time: 0ms
memory: 6536kb
input:
2 3 1 2 2 1
output:
1 2 1
result:
ok accepted
Test #100:
score: 0
Accepted
time: 1ms
memory: 5732kb
input:
2 3 0 2 2 0
output:
3 1 1 2 1 2 1
result:
ok accepted
Test #101:
score: 0
Accepted
time: 9ms
memory: 11492kb
input:
2 999983 700497 278087 278087 124569
output:
1 758770 388400
result:
ok accepted
Test #102:
score: 0
Accepted
time: 4ms
memory: 11404kb
input:
2 999983 444859 312909 312909 932115
output:
2 613250 306625 195585 603521
result:
ok accepted
Extra Test:
score: 0
Extra Test Passed