QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#816523 | #8807. Infiltration | XY_Eleven | 100 ✓ | 2ms | 4148kb | C++20 | 5.5kb | 2024-12-16 13:32:15 | 2024-12-16 13:32:15 |
Judging History
answer
#include <bits/stdc++.h>
// #include <windows.h>
// #include <bits/extc++.h>
// using namespace __gnu_pbds;
using namespace std;
//#pragma GCC optimize(3)
#define DB double
#define LL long long
#define ULL unsigned long long
#define in128 __int128
#define cint const int
#define cLL const LL
#define For(z,e1,e2) for(int z=(e1);z<=(e2);z++)
#define Rof(z,e1,e2) for(int z=(e2);z>=(e1);z--)
#define For_(z,e1,e2) for(int z=(e1);z<(e2);z++)
#define Rof_(z,e1,e2) for(int z=(e2);z>(e1);z--)
#define inint(e) scanf("%d",&e)
#define inll(e) scanf("%lld",&e)
#define inpr(e1,e2) scanf("%d%d",&e1,&e2)
#define in3(e1,e2,e3) scanf("%d%d%d",&e1,&e2,&e3)
#define outint(e) printf("%d\n",e)
#define outint_(e) printf("%d%c",e," \n"[i==n])
#define outint2_(e,e1,e2) printf("%d%c",e," \n"[(e1)==(e2)])
#define outll(e) printf("%lld\n",e)
#define outll_(e) printf("%lld%c",e," \n"[i==n])
#define outll2_(e,e1,e2) printf("%lld%c",e," \n"[(e1)==(e2)])
#define exc(e) if(e) continue
#define stop(e) if(e) break
#define ret(e) if(e) return
#define ll(e) (1ll*(e))
#define pb push_back
#define ft first
#define sc second
#define pii pair<int,int>
#define pli pair<long long,int>
#define vct vector
#define clean(e) while(!e.empty()) e.pop()
#define all(ev) ev.begin(),ev.end()
#define sz(ev) ((int)ev.size())
#define debug(x) printf("%s=%d\n",#x,x)
#define x0 __xx00__
#define y1 __yy11__
#define ffo fflush(stdout)
cLL mod=998244353,G=404;
// cLL mod=1000000007ll;
// cLL mod[2]={1686688681ll,1666888681ll},base[2]={166686661ll,188868881ll};
template <typename Type> void get_min(Type &w1,const Type w2) { if(w2<w1) w1=w2; } template <typename Type> void get_max(Type &w1,const Type w2) { if(w2>w1) w1=w2; }
template <typename Type> Type up_div(Type w1,Type w2) { return (w1/w2+(w1%w2?1:0)); }
template <typename Type> Type gcd(Type X_,Type Y_) { Type R_=X_%Y_; while(R_) { X_=Y_; Y_=R_; R_=X_%Y_; } return Y_; } template <typename Type> Type lcm(Type X_,Type Y_) { return (X_/gcd(X_,Y_)*Y_); }
template <typename Type> Type md(Type w1,const Type w2=mod) { w1%=w2; if(w1<0) w1+=w2; return w1; } template <typename Type> Type md_(Type w1,const Type w2=mod) { w1%=w2; if(w1<=0) w1+=w2; return w1; }
void ex_gcd(LL &X_,LL &Y_,LL A_,LL B_) { if(!B_) { X_=1ll; Y_=0ll; return ; } ex_gcd(Y_,X_,B_,A_%B_); X_=md(X_,B_); Y_=(1ll-X_*A_)/B_; } LL inv(LL A_,LL B_=mod) { LL X_=0ll,Y_=0ll; ex_gcd(X_,Y_,A_,B_); return X_; }
template <typename Type> void add(Type &w1,const Type w2,const Type M_=mod) { w1=md(w1+w2,M_); } void mul(LL &w1,cLL w2,cLL M_=mod) { w1=md(w1*md(w2,M_),M_); } template <typename Type> Type pw(Type X_,Type Y_,Type M_=mod) { Type S_=1; while(Y_) { if(Y_&1) mul(S_,X_,M_); Y_>>=1; mul(X_,X_,M_); } return S_; }
template <typename Type> Type bk(vector <Type> &V_) { auto T_=V_.back(); V_.pop_back(); return T_; } template <typename Type> Type tp(stack <Type> &V_) { auto T_=V_.top(); V_.pop(); return T_; } template <typename Type> Type frt(queue <Type> &V_) { auto T_=V_.front(); V_.pop(); return T_; }
template <typename Type> Type bg(set <Type> &V_) { auto T_=*V_.begin(); V_.erase(V_.begin()); return T_; } template <typename Type> Type bk(set <Type> &V_) { auto T_=*prev(V_.end()); V_.erase(*prev(V_.end())); return T_; }
mt19937 gen(time(NULL)); int rd() { return abs((int)gen()); }
int rnd(int l,int r) { return rd()%(r-l+1)+l; }
void main_init()
{
}
cint N=120;
int n;
vct <int> v[N],ans1[N],ans2[N];
int siz[N],mxs[N];
void grt(int p,int fa)
{
siz[p]=1,mxs[p]=0;
for(auto i:v[p])
{
exc(i==fa);
grt(i,p);
siz[p]+=siz[i];
get_max(mxs[p],siz[i]);
}
get_max(mxs[p],n-siz[p]);
}
int get_root(int p)
{
grt(p,0);
// printf("get root %d:",p);
For(i,1,n) if(mxs[i]<mxs[p]) p=i;
// printf(" %d\n",p);
return p;
}
int up[N],dep[N];
void dfs(int p,int fa)
{
dep[p]=dep[fa]+1,up[p]=fa;
for(auto i:v[p])
{
exc(i==fa);
dfs(i,p);
}
}
int a[N];
void work(int w,bool opt)
{
if(opt)
For(i,1,n) ans1[i].swap(ans2[i]);
For(i,1,n)
{
int t=ans1[i].back();
For(round,1,w)
{
stop(!up[t]);
t=up[t];
ans1[i].pb(t);
ans2[i].pb(ans2[i].back());
}
}
int len=0;
For(i,1,n) get_max(len,max(sz(ans1[i]),sz(ans2[i])));
For(i,1,n) ans1[i].resize(len,ans1[i].back());
For(i,1,n) ans2[i].resize(len,ans2[i].back());
if(opt)
For(i,1,n) ans1[i].swap(ans2[i]);
}
void main_solve()
{
inint(n);
// n=100;
For_(i,1,n)
{
int x,y; inpr(x,y); x++,y++;
// int x=i,y=i+1;
v[x].pb(y),v[y].pb(x);
}
int rt=get_root(1);
dfs(rt,0);
For(i,1,n) ans1[i].pb(i),ans2[i].pb(i);
work(3,true);
work(13,false);
work(27,true);
work(n,false);
work(n,true);
For(i,1,n) ans1[i].pb(rt),ans2[i].pb(rt);
int len=sz(ans1[1])-1;
outint(len<<1);
For(i,1,n)
For(j,1,len) printf("%d %d%c",ans1[i][j]-1,ans1[i][j]-1," \n"[j==len]);
For(i,1,n)
{
printf("%d ",i-1);
For_(j,1,len) printf("%d %d ",ans2[i][j]-1,ans2[i][j]-1);
printf("%d\n",ans2[i][len]-1);
}
}
int main()
{
// ios::sync_with_stdio(0); cin.tie(0);
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
// srand(time(NULL));
main_init();
// int _; inint(_); For(__,1,_) // T>1 ?
// printf("\n------------\n\n"),
main_solve();
return 0;
}
/*
*/
詳細信息
Subtask #1:
score: 25
Accepted
Test #1:
score: 25
Accepted
time: 2ms
memory: 4012kb
input:
100 24 87 34 69 21 46 75 83 53 52 98 63 13 27 99 41 54 25 40 9 94 77 64 22 17 26 79 70 71 52 78 20 72 92 42 1 96 4 93 97 62 74 49 91 77 35 8 70 85 39 80 74 34 11 7 54 62 38 78 44 32 75 58 6 5 86 20 72 84 64 61 56 31 41 37 82 48 89 17 7 48 95 90 23 88 59 73 91 12 50 29 42 60 25 86 50 67 73 65 95 14 2...
output:
202 0 0 0 0 0 0 76 76 90 90 23 23 61 61 56 56 79 79 70 70 8 8 30 30 31 31 41 41 99 99 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 36 36 5 5 86 86 50 50 12 12 24 24 87 87 37 37 ...
result:
points 1.0 15.000000
Test #2:
score: 25
Accepted
time: 2ms
memory: 4112kb
input:
100 54 33 69 2 78 76 91 67 29 98 63 83 56 92 44 41 73 45 30 70 89 52 24 79 22 26 90 85 82 62 84 95 43 22 57 51 96 40 53 97 83 9 31 25 72 52 19 36 7 45 43 47 12 6 50 29 39 93 11 84 37 75 70 35 47 77 74 95 5 77 26 64 32 38 96 15 17 4 17 85 3 0 78 34 65 24 71 36 10 59 68 79 65 58 86 7 1 81 74 14 88 33 ...
output:
134 0 0 0 0 0 0 3 3 16 16 23 23 35 35 70 70 30 30 21 21 51 51 57 57 60 60 98 98 29 29 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 87 87 62 62 82 82 5 5 77 77 47 47 43 43 22 22 ...
result:
points 1.0 15.000000
Test #3:
score: 25
Accepted
time: 1ms
memory: 3960kb
input:
100 7 1 52 6 78 62 36 22 90 0 36 32 24 63 91 45 49 75 66 86 70 31 2 34 72 93 79 90 75 37 24 95 30 62 35 98 4 19 35 18 61 70 67 21 83 29 45 9 16 99 59 33 22 86 25 65 58 61 37 76 2 17 14 41 13 47 73 56 63 27 60 5 78 54 10 74 3 98 0 87 89 11 2 77 5 28 80 67 55 3 81 9 66 92 52 29 43 12 8 79 44 25 99 85 ...
output:
138 0 0 0 0 0 0 90 90 79 79 8 8 19 19 4 4 88 88 92 92 66 66 86 86 22 22 36 36 32 32 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 72 72 46 46 26 26 39 39 95 95 24 24 63 63 27 27 ...
result:
points 1.0 15.000000
Test #4:
score: 25
Accepted
time: 2ms
memory: 4148kb
input:
100 79 17 99 85 10 11 58 42 71 21 5 16 8 77 43 12 74 78 92 67 44 68 36 88 18 84 26 66 47 55 64 41 9 12 25 19 54 53 61 57 24 33 23 82 75 38 40 87 14 15 47 45 6 64 62 73 66 73 30 17 1 40 55 75 50 90 77 56 37 96 6 3 14 35 96 70 63 94 83 86 49 89 53 60 32 80 95 48 41 4 61 81 94 16 24 46 7 97 69 22 13 78...
output:
202 0 0 0 0 0 0 31 31 48 48 95 95 74 74 78 78 13 13 98 98 57 57 61 61 81 81 71 71 21 21 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ...
result:
points 1.0 15.000000
Test #5:
score: 25
Accepted
time: 2ms
memory: 4128kb
input:
100 81 44 15 74 9 20 47 46 75 16 88 41 11 68 94 1 0 18 74 99 67 26 80 18 93 5 23 46 63 49 57 36 70 90 90 91 60 37 65 24 31 10 15 55 69 37 61 80 10 53 28 55 12 65 54 25 32 9 39 40 48 89 85 84 56 6 96 45 77 6 4 27 58 29 45 40 34 14 47 84 13 50 92 87 0 19 2 61 22 73 73 83 66 52 87 8 49 59 68 16 42 5 57...
output:
202 0 0 0 0 0 0 19 19 35 35 89 89 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48...
result:
points 1.0 15.000000
Test #6:
score: 25
Accepted
time: 0ms
memory: 4132kb
input:
100 82 95 33 50 69 92 3 27 10 95 34 94 49 72 97 16 60 48 25 74 63 4 14 81 97 35 10 78 27 66 44 50 39 42 68 61 76 40 84 34 12 46 4 86 17 93 83 80 29 80 89 18 37 9 32 20 33 15 30 2 55 21 31 11 46 64 11 8 30 73 79 62 24 38 51 18 60 77 19 0 68 14 86 0 32 6 31 28 35 98 87 55 56 73 7 69 24 36 54 57 57 88 ...
output:
198 0 0 0 0 0 0 86 86 4 4 63 63 28 28 31 31 11 11 8 8 65 65 51 51 18 18 89 89 77 77 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 ...
result:
points 1.0 15.000000
Test #7:
score: 25
Accepted
time: 0ms
memory: 4040kb
input:
100 38 33 1 33 33 27 33 34 33 28 15 33 33 30 33 75 61 33 33 84 54 33 32 33 33 17 63 33 79 33 14 33 44 33 24 33 33 89 33 25 33 93 33 10 0 33 33 9 47 33 33 95 62 33 39 33 60 33 33 57 33 5 33 91 4 33 87 33 33 58 48 33 50 33 18 33 20 33 8 33 33 49 33 65 23 33 7 33 81 33 33 52 33 31 2 33 33 59 51 33 53 3...
output:
6 0 0 33 33 33 33 1 1 33 33 33 33 2 2 33 33 33 33 3 3 33 33 33 33 4 4 33 33 33 33 5 5 33 33 33 33 6 6 33 33 33 33 7 7 33 33 33 33 8 8 33 33 33 33 9 9 33 33 33 33 10 10 33 33 33 33 11 11 33 33 33 33 12 12 33 33 33 33 13 13 33 33 33 33 14 14 33 33 33 33 15 15 33 33 33 33 16 16 33 33 33 33 17 17 33 33 ...
result:
points 1.0 3.000000
Test #8:
score: 25
Accepted
time: 1ms
memory: 3912kb
input:
100 25 85 84 85 17 85 85 51 85 30 61 85 85 6 94 85 85 52 85 88 85 66 10 85 34 85 85 82 85 14 65 85 79 85 85 15 24 85 85 35 85 11 0 85 85 55 64 85 85 81 73 85 45 85 31 85 54 85 85 41 27 85 85 92 78 85 85 23 85 96 2 85 85 90 85 33 60 85 91 85 85 75 85 19 42 85 85 97 85 76 36 85 4 85 85 86 85 9 85 62 9...
output:
6 0 0 85 85 85 85 1 1 85 85 85 85 2 2 85 85 85 85 3 3 85 85 85 85 4 4 85 85 85 85 5 5 85 85 85 85 6 6 85 85 85 85 7 7 85 85 85 85 8 8 85 85 85 85 9 9 85 85 85 85 10 10 85 85 85 85 11 11 85 85 85 85 12 12 85 85 85 85 13 13 85 85 85 85 14 14 85 85 85 85 15 15 85 85 85 85 16 16 85 85 85 85 17 17 85 85 ...
result:
points 1.0 3.000000
Test #9:
score: 25
Accepted
time: 1ms
memory: 3896kb
input:
100 31 84 31 91 31 13 31 38 31 10 41 31 51 31 17 31 31 50 31 12 31 66 96 31 31 68 31 92 23 31 90 31 31 47 31 80 44 31 31 22 59 31 79 31 31 52 56 31 69 31 31 94 31 27 31 25 31 53 31 70 55 31 31 95 31 35 31 78 32 31 11 31 1 31 67 31 31 57 62 31 31 61 86 31 31 8 42 31 28 31 31 81 31 20 31 7 16 31 31 98...
output:
6 0 0 31 31 31 31 1 1 31 31 31 31 2 2 31 31 31 31 3 3 31 31 31 31 4 4 31 31 31 31 5 5 31 31 31 31 6 6 31 31 31 31 7 7 31 31 31 31 8 8 31 31 31 31 9 9 31 31 31 31 10 10 31 31 31 31 11 11 31 31 31 31 12 12 31 31 31 31 13 13 31 31 31 31 14 14 31 31 31 31 15 15 31 31 31 31 16 16 31 31 31 31 17 17 31 31 ...
result:
points 1.0 3.000000
Test #10:
score: 25
Accepted
time: 1ms
memory: 4000kb
input:
100 21 77 77 71 77 86 77 22 92 77 77 83 23 77 20 77 26 77 77 99 58 77 77 56 77 13 44 77 77 30 60 77 77 51 77 19 61 77 77 31 77 52 15 77 77 48 77 97 77 98 46 77 77 80 77 57 77 34 77 66 77 24 7 77 77 82 38 77 65 77 77 64 18 77 77 27 85 77 77 11 37 77 77 87 72 77 88 77 3 77 77 2 47 77 29 77 32 77 77 79...
output:
6 0 0 77 77 77 77 1 1 77 77 77 77 2 2 77 77 77 77 3 3 77 77 77 77 4 4 77 77 77 77 5 5 77 77 77 77 6 6 77 77 77 77 7 7 77 77 77 77 8 8 77 77 77 77 9 9 77 77 77 77 10 10 77 77 77 77 11 11 77 77 77 77 12 12 77 77 77 77 13 13 77 77 77 77 14 14 77 77 77 77 15 15 77 77 77 77 16 16 77 77 77 77 17 17 77 77 ...
result:
points 1.0 3.000000
Test #11:
score: 25
Accepted
time: 1ms
memory: 3984kb
input:
100 61 64 67 61 41 61 61 1 9 61 79 61 61 55 61 47 80 61 61 82 61 39 68 61 88 61 69 61 76 61 61 37 44 61 61 4 87 61 73 61 11 61 61 15 0 61 94 61 48 61 61 2 93 61 61 42 61 63 61 84 61 31 61 58 29 61 61 24 32 61 61 23 61 49 61 28 43 61 61 46 61 5 77 61 61 14 98 61 61 53 7 61 61 65 86 61 61 70 61 81 61 ...
output:
6 0 0 61 61 61 61 1 1 61 61 61 61 2 2 61 61 61 61 3 3 61 61 61 61 4 4 61 61 61 61 5 5 61 61 61 61 6 6 61 61 61 61 7 7 61 61 61 61 8 8 61 61 61 61 9 9 61 61 61 61 10 10 61 61 61 61 11 11 61 61 61 61 12 12 61 61 61 61 13 13 61 61 61 61 14 14 61 61 61 61 15 15 61 61 61 61 16 16 61 61 61 61 17 17 61 61 ...
result:
points 1.0 3.000000
Test #12:
score: 25
Accepted
time: 1ms
memory: 3932kb
input:
100 79 38 85 79 71 79 0 79 79 34 8 79 79 65 79 22 12 79 81 79 79 89 79 74 79 29 39 79 79 31 33 79 79 77 94 79 3 79 79 49 80 79 79 90 79 23 40 79 79 42 79 98 79 56 79 11 88 79 79 53 79 36 66 79 79 51 79 82 79 69 21 79 79 67 79 7 61 79 72 79 28 79 79 5 79 55 79 95 68 79 24 79 79 25 59 79 92 79 79 10 7...
output:
6 0 0 79 79 79 79 1 1 79 79 79 79 2 2 79 79 79 79 3 3 79 79 79 79 4 4 79 79 79 79 5 5 79 79 79 79 6 6 79 79 79 79 7 7 79 79 79 79 8 8 79 79 79 79 9 9 79 79 79 79 10 10 79 79 79 79 11 11 79 79 79 79 12 12 79 79 79 79 13 13 79 79 79 79 14 14 79 79 79 79 15 15 79 79 79 79 16 16 79 79 79 79 17 17 79 79 ...
result:
points 1.0 3.000000
Test #13:
score: 25
Accepted
time: 1ms
memory: 3992kb
input:
100 1 23 29 1 11 1 1 32 47 1 1 42 35 1 1 44 1 64 5 1 75 1 1 99 1 9 1 69 26 1 10 1 78 1 96 1 30 1 14 1 55 1 49 1 1 37 1 45 1 73 1 84 57 1 79 1 21 1 81 1 1 93 1 90 40 1 59 1 66 1 1 16 67 1 1 27 19 1 7 1 98 1 65 1 1 50 1 12 20 1 1 95 1 74 1 80 3 1 31 1 22 1 1 94 1 92 1 51 41 1 25 1 1 62 1 60 1 34 1 38 ...
output:
6 0 0 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 3 3 1 1 1 1 4 4 1 1 1 1 5 5 1 1 1 1 6 6 1 1 1 1 7 7 1 1 1 1 8 8 1 1 1 1 9 9 1 1 1 1 10 10 1 1 1 1 11 11 1 1 1 1 12 12 1 1 1 1 13 13 1 1 1 1 14 14 1 1 1 1 15 15 1 1 1 1 16 16 1 1 1 1 17 17 1 1 1 1 18 18 1 1 1 1 19 19 1 1 1 1 20 20 1 1 1 1 21 21 1 1 1 1 22 22 1 1 ...
result:
points 1.0 3.000000
Test #14:
score: 25
Accepted
time: 1ms
memory: 3932kb
input:
100 48 16 68 48 48 69 48 42 60 48 94 48 48 28 31 48 8 48 48 93 48 12 48 88 61 48 48 19 48 29 40 48 39 48 89 48 90 48 48 59 13 48 48 18 48 64 41 48 48 33 52 48 48 75 48 6 48 32 48 45 48 71 91 48 48 78 48 50 48 82 55 48 4 48 97 48 48 7 48 23 73 48 26 48 77 48 48 11 48 98 34 48 86 48 74 48 44 48 48 62 ...
output:
6 0 0 48 48 48 48 1 1 48 48 48 48 2 2 48 48 48 48 3 3 48 48 48 48 4 4 48 48 48 48 5 5 48 48 48 48 6 6 48 48 48 48 7 7 48 48 48 48 8 8 48 48 48 48 9 9 48 48 48 48 10 10 48 48 48 48 11 11 48 48 48 48 12 12 48 48 48 48 13 13 48 48 48 48 14 14 48 48 48 48 15 15 48 48 48 48 16 16 48 48 48 48 17 17 48 48 ...
result:
points 1.0 3.000000
Test #15:
score: 25
Accepted
time: 1ms
memory: 3856kb
input:
100 15 52 33 15 15 51 15 38 15 37 0 15 67 15 96 15 85 15 57 15 15 80 15 99 15 19 15 76 7 15 32 15 50 15 64 15 56 15 72 15 43 15 15 9 15 23 48 15 97 15 65 15 15 93 14 15 15 81 15 27 41 15 75 15 16 15 15 70 15 78 15 83 15 95 61 15 15 35 45 15 24 15 79 15 15 54 91 15 15 34 31 15 15 10 88 15 8 15 92 15 ...
output:
6 0 0 15 15 15 15 1 1 15 15 15 15 2 2 15 15 15 15 3 3 15 15 15 15 4 4 15 15 15 15 5 5 15 15 15 15 6 6 15 15 15 15 7 7 15 15 15 15 8 8 15 15 15 15 9 9 15 15 15 15 10 10 15 15 15 15 11 11 15 15 15 15 12 12 15 15 15 15 13 13 15 15 15 15 14 14 15 15 15 15 15 15 15 15 15 15 16 16 15 15 15 15 17 17 15 15 ...
result:
points 1.0 3.000000
Test #16:
score: 25
Accepted
time: 1ms
memory: 3888kb
input:
100 16 91 98 8 95 48 64 83 50 13 63 39 37 4 17 92 3 40 13 39 79 98 65 19 9 20 84 48 32 18 77 38 15 0 56 85 95 23 88 93 70 0 39 25 96 22 80 94 33 71 74 71 46 4 37 73 48 55 44 93 27 38 98 90 97 53 54 93 3 61 48 24 42 7 19 81 34 93 17 30 63 85 1 9 76 8 55 75 42 97 2 60 12 35 76 73 3 9 42 47 76 96 21 61...
output:
46 0 0 0 0 0 0 70 70 44 44 26 26 28 28 37 37 4 4 13 13 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 1 1 1 1 1 1 9 9 3 3 61 61 21 21 5 5 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 2 2 2 2 2 2 29 29 37 37 4 4 13 13 39 39 3...
result:
points 1.0 13.000000
Test #17:
score: 25
Accepted
time: 0ms
memory: 3900kb
input:
100 31 13 13 73 58 78 1 77 90 28 89 43 14 8 60 12 64 84 16 37 68 41 82 30 67 84 48 95 46 36 49 50 76 87 88 84 23 17 37 34 80 33 80 55 3 60 19 77 54 93 18 52 26 74 78 82 94 21 68 96 40 29 51 8 25 86 14 7 23 4 24 50 96 91 57 98 38 45 21 85 74 84 72 38 0 18 17 63 15 89 48 50 57 44 35 74 26 73 59 96 20 ...
output:
54 0 0 0 0 0 0 18 18 52 52 13 13 73 73 26 26 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 1 1 1 1 1 1 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 ...
result:
points 1.0 13.000000
Test #18:
score: 25
Accepted
time: 1ms
memory: 3948kb
input:
100 90 33 8 58 90 15 4 81 91 1 30 90 34 38 8 11 57 46 26 22 69 45 32 96 77 34 23 69 59 63 49 84 31 5 54 27 32 39 73 19 34 85 45 30 15 25 10 69 58 83 13 26 37 16 54 53 77 94 12 6 20 68 17 3 1 79 67 43 99 54 38 36 28 25 25 70 83 2 71 32 19 51 10 86 97 59 9 42 91 66 88 49 98 64 18 37 39 25 93 9 59 44 6...
output:
50 0 0 0 0 0 0 39 39 32 32 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 1 1 1 1 1 1 91 91 87 87 12 12 54 54 99 99 46 46 57 57 48 48 19 19 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 2 2 2 2 2...
result:
points 1.0 13.000000
Test #19:
score: 25
Accepted
time: 0ms
memory: 4028kb
input:
100 66 53 12 70 1 15 34 76 68 80 86 41 58 83 76 4 27 93 61 80 18 60 38 69 89 88 22 18 9 65 37 43 34 92 89 16 52 36 37 67 57 37 87 77 40 22 53 26 88 6 45 64 34 19 70 35 22 73 20 7 55 0 51 18 58 3 10 99 13 81 93 48 67 62 18 96 79 33 52 5 37 15 82 16 75 87 71 7 94 4 91 38 44 98 23 59 31 40 30 67 16 35 ...
output:
58 0 0 0 0 0 0 55 55 10 10 99 99 94 94 4 4 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 1 1 1 1 1 1 15 15 37 37 38 38 69 69 80 80 68 68 28 28 10 10 99 99 94 94 4 4 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 7...
result:
points 1.0 13.500000
Test #20:
score: 25
Accepted
time: 1ms
memory: 4080kb
input:
100 92 60 7 93 65 88 8 30 25 61 1 35 90 5 71 11 87 76 86 75 13 89 19 35 12 35 18 81 14 50 67 83 84 38 6 10 71 50 22 87 30 4 96 37 38 46 21 84 72 44 87 85 22 47 46 20 29 41 71 90 97 33 6 75 62 39 63 99 42 91 39 79 28 94 30 83 54 52 24 82 5 36 70 6 45 4 63 46 32 58 3 44 0 32 74 84 73 77 31 5 6 88 38 3...
output:
62 0 0 0 0 0 0 32 32 58 58 29 29 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 1 1 1 1 1 1 35 35 18 18 37 37 96 96 38 38 34 34 9 9 41 41 29 29 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40...
result:
points 1.0 14.000000
Test #21:
score: 25
Accepted
time: 0ms
memory: 3892kb
input:
100 17 78 18 61 50 10 58 3 77 62 61 1 22 48 92 6 80 66 8 49 11 65 36 80 90 35 31 66 51 62 96 60 90 96 97 75 20 13 63 44 37 95 66 47 7 62 74 39 4 17 18 11 16 97 58 57 47 50 63 73 28 88 76 13 37 31 45 41 9 26 5 95 21 85 98 14 47 21 89 85 54 41 26 96 7 40 32 36 97 77 15 0 91 67 94 99 68 43 13 49 51 71 ...
output:
62 0 0 0 0 0 0 54 54 41 41 45 45 28 28 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 1 1 1 1 1 1 61 61 18 18 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 ...
result:
points 1.0 14.000000
Test #22:
score: 25
Accepted
time: 1ms
memory: 4024kb
input:
100 6 79 78 92 16 92 13 46 70 97 34 38 28 97 54 99 8 21 84 28 67 89 40 73 27 97 95 50 62 52 61 73 6 72 21 54 77 44 58 18 3 11 65 83 95 76 41 90 53 75 1 41 59 20 47 44 10 86 39 2 86 80 96 55 85 70 45 86 0 51 7 82 69 10 29 17 64 68 94 35 90 52 77 99 36 12 54 25 70 36 39 6 36 58 20 30 63 64 85 4 31 95 ...
output:
62 0 0 0 0 0 0 99 99 54 54 25 25 1 1 41 41 18 18 58 58 36 36 46 46 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 1 1 1 1 1 1 41 41 18 18 58 58 36 36 46 46 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67...
result:
points 1.0 14.000000
Test #23:
score: 25
Accepted
time: 1ms
memory: 3956kb
input:
100 60 56 2 56 97 78 34 33 90 92 25 76 43 66 5 26 99 16 7 91 12 26 39 67 96 97 87 39 40 61 21 72 41 2 67 31 59 63 27 57 2 94 40 10 37 70 30 45 69 79 9 27 68 14 26 6 81 77 5 42 47 38 39 21 66 74 43 22 56 80 40 12 79 32 33 50 83 43 62 33 21 8 33 42 36 28 93 0 5 17 4 72 60 53 15 53 6 64 33 30 0 94 37 8...
output:
70 0 0 0 0 0 0 94 94 2 2 56 56 80 80 73 73 82 82 1 1 39 39 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 1 1 1 1 1 1 39 39 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 2...
result:
points 1.0 15.000000
Test #24:
score: 25
Accepted
time: 2ms
memory: 4000kb
input:
100 9 25 60 18 13 97 45 20 48 19 29 73 1 62 7 86 57 27 43 5 80 4 33 81 1 78 71 15 30 36 68 82 46 4 62 61 18 82 85 56 70 5 10 6 67 79 88 6 31 92 44 90 84 2 91 26 39 7 45 99 23 65 46 14 70 15 32 89 75 34 96 42 67 77 38 40 42 31 53 97 24 16 53 89 19 26 40 59 0 29 21 81 2 24 68 95 74 37 47 64 83 78 11 7...
output:
198 0 0 0 0 0 0 84 84 2 2 24 24 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 1...
result:
points 1.0 15.000000
Test #25:
score: 25
Accepted
time: 2ms
memory: 4128kb
input:
100 61 57 63 41 76 25 64 33 64 67 50 54 75 89 19 15 62 27 21 16 39 86 56 0 56 8 71 60 90 72 52 32 48 31 24 82 37 21 37 63 68 83 91 71 58 74 54 49 18 78 38 93 18 87 77 87 13 49 88 15 72 5 40 23 57 51 85 96 84 85 47 39 74 26 44 46 53 29 12 80 26 92 25 35 73 95 47 28 30 94 67 23 24 48 11 83 45 28 91 17...
output:
202 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
points 1.0 15.000000