QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#792640 | #9806. Growing Tree | Carucao | AC ✓ | 25ms | 4108kb | C++20 | 4.2kb | 2024-11-29 12:20:29 | 2024-11-29 12:20:29 |
Judging History
answer
#include<bits/stdc++.h>
#define ls i<<1
#define rs i<<1|1
#define fi first
#define se second
#define min amin
#define max amax
#define eb emplace_back
using namespace std;
using ll=long long;
using LL=__int128;
using pii=pair<int,int>;
const int N=1<<11;
const int inf=0x3f3f3f3f;
const int p=998244353;
template<typename T=int>T read(){T x;cin>>x;return x;}
template<typename U,typename V>U min(const U &x,const V &y){return x<y?x:y;}
template<typename U,typename V>U max(const U &x,const V &y){return y<x?x:y;}
template<typename U,typename ...V>U min(const U &x,const V &...y){return min(x,min(y...));}
template<typename U,typename ...V>U max(const U &x,const V &...y){return max(x,max(y...));}
template<typename U,typename V>bool cmin(U &x,const V &y){return y<x?x=y,true:false;}
template<typename U,typename V>bool cmax(U &x,const V &y){return x<y?x=y,true:false;}
template<typename U,typename ...V>bool cmin(U &x,const V &...y){return cmin(x,min(y...));}
template<typename U,typename ...V>bool cmax(U &x,const V &...y){return cmax(x,max(y...));}
template<typename U,typename V>U qpow(U x,V n){U y(1);for(;n;n>>=1,x*=x)if(n&1)y*=x;return y;}
ll sqrt_floor(const ll &x){ll l=0,r=inf;while(l+1^r){ll mid=l+r>>1;(x<mid*mid?r:l)=mid;}return l;}
ll sqrt_ceil(const ll &x){ll l=-1,r=inf;while(l+1^r){ll mid=l+r>>1;(mid*mid<x?l:r)=mid;}return r;}
istream &operator>>(istream &is,LL &x){string a;is>>a;bool k=a[0]=='-';if(k)a=a.substr(1);x=0;for(char &t:a)x=x*10+t-48;if(k)x=-x;return is;}
ostream &operator<<(ostream &os,LL x){if(x<0)os<<'-',x=-x;string a;do a+=x%10|48;while(x/=10);reverse(a.begin(),a.end());return os<<a;}
mt19937 rng(time(0));
struct mint{
int x;
mint():x(){}
mint(const int &x):x(x<0?x+p:x){}
mint inv()const{return qpow(*this,p-2);}
mint operator-()const{return mint(x?p-x:x);}
mint &operator+=(const mint &t){return (x+=t.x)<p?0:x-=p,*this;}
mint &operator-=(const mint &t){return (x-=t.x)<0?x+=p:0,*this;}
mint &operator*=(const mint &t){return x=ll(x)*t.x%p,*this;}
mint &operator/=(const mint &t){return *this*=t.inv();}
mint operator+(const mint &t)const{return mint(*this)+=t;}
mint operator-(const mint &t)const{return mint(*this)-=t;}
mint operator*(const mint &t)const{return mint(*this)*=t;}
mint operator/(const mint &t)const{return mint(*this)/=t;}
operator int()const{return x;}
bool operator==(const mint &t)const{return x==t.x;}
friend mint operator+(const mint &x,const int &y){return mint(x)+=y;}
friend mint operator-(const mint &x,const int &y){return mint(x)-=y;}
friend mint operator*(const mint &x,const int &y){return mint(x)*=y;}
friend mint operator/(const mint &x,const int &y){return mint(x)/=y;}
friend mint operator+(const int &x,const mint &y){return mint(x)+=y;}
friend mint operator-(const int &x,const mint &y){return mint(x)-=y;}
friend mint operator*(const int &x,const mint &y){return mint(x)*=y;}
friend mint operator/(const int &x,const mint &y){return mint(x)/=y;}
friend istream &operator>>(istream &is,mint &t){return is>>t.x;}
friend ostream &operator<<(ostream &os,const mint &t){return os<<t.x;}
};
int a[N],n,ans;
vector<int>q[N];
void mg(vector<int>&a,vector<int>&b,vector<int>&c){
c.clear();
auto i=a.begin(),j=b.begin();
while(i!=a.end()&&j!=b.end()){
if(*i==*j)return c.clear();
c.eb(*(*i<*j?i:j)++);
}
for(;i!=a.end();++i){
c.eb(*i);
}
for(;j!=b.end();++j){
c.eb(*j);
}
}
void dfs(int i,int s){
if(!--i)return void(ans=s);
mg(q[ls],q[rs],q[i]);
if(q[i].empty()){
if(++s==ans||s+__lg(i)>n)return;
q[i]=q[ls];
dfs(i,s);
if(s<ans){
q[i]=q[rs];
dfs(i,s);
}
}
else{
dfs(i,s);
}
}
void solve(){
cin>>n;
int s=1<<n;
for(int i=2;i<s<<1;++i){
cin>>a[i];
a[i]+=a[i>>1];
if(i>=s)q[i].assign(1,a[i]);
}
ans=inf;
dfs(s,0);
cout<<(ans^inf?ans:-1)<<'\n';
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin>>T;
while(T--){
solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3684kb
input:
3 2 1 2 4 3 2 1 2 1 2 3 3 2 1 2 1 2 3 3 1 1
output:
1 2 -1
result:
ok 3 number(s): "1 2 -1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3952kb
input:
94 5 44 65 38 61 64 94 71 53 65 10 24 36 98 74 11 4 5 46 72 34 9 24 37 32 76 29 48 88 17 14 36 4 22 6 71 53 24 61 89 79 39 57 99 61 27 85 99 46 81 75 90 25 16 13 1 87 55 81 56 78 67 2 3 83 3 74 14 45 17 22 41 62 74 25 1 56 22 7 21 73 83 99 3 91 16 53 8 10 49 29 54 81 45 10 12 68 32 9 30 11 99 85 73 ...
output:
2 0 -1 2 0 1 -1 0 0 3 0 0 0 1 2 1 0 2 0 1 0 -1 0 -1 0 0 -1 -1 -1 -1 -1 4 -1 0 3 2 7 -1 -1 -1 1 2 4 0 0 2 7 1 6 0 -1 2 -1 0 0 0 -1 1 -1 -1 0 0 1 1 -1 0 1 2 0 -1 0 0 1 1 -1 0 -1 0 0 0 -1 3 -1 1 7 0 0 0 0 1 0 -1 3 3
result:
ok 94 numbers
Test #3:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
1 10 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 10000...
output:
-1
result:
ok 1 number(s): "-1"
Test #4:
score: 0
Accepted
time: 15ms
memory: 3764kb
input:
1000 7 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000000 50000...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #5:
score: 0
Accepted
time: 5ms
memory: 3748kb
input:
1000 6 50000001 50000000 49999999 50000001 49999999 50000001 49999999 50000001 49999999 50000000 50000001 50000001 50000000 49999999 50000001 50000000 49999999 49999999 50000001 50000001 50000001 49999999 50000001 49999999 50000001 50000000 50000001 50000001 50000001 50000000 50000000 49999999 50000...
output:
-1 2 3 1 -1 -1 -1 -1 1 1 -1 -1 2 -1 0 0 0 -1 1 -1 -1 1 -1 0 1 -1 -1 2 -1 -1 -1 -1 1 -1 2 -1 -1 1 1 -1 1 0 2 -1 -1 -1 3 -1 -1 1 2 1 1 2 -1 -1 -1 3 -1 -1 -1 -1 3 -1 -1 -1 -1 1 -1 -1 -1 -1 2 0 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 2 2 -1 -1 -1 0 -1 -1 0 3 -1 -1 -1...
result:
ok 1000 numbers
Test #6:
score: 0
Accepted
time: 2ms
memory: 3792kb
input:
1000 7 50000001 50000001 50000001 49999999 50000002 49999999 49999999 50000001 49999999 49999998 50000002 50000000 50000000 50000002 49999998 50000000 50000001 49999999 50000001 49999998 50000000 49999998 49999999 49999998 50000001 50000000 49999999 49999999 49999998 49999999 50000000 49999999 50000...
output:
-1 -1 1 2 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 2 0 0 -1 1 1 -1 1 -1 2 0 -1 -1 -1 -1 0 -1 1 4 -1 3 -1 -1 2 -1 2 2 0 -1 0 -1 -1 -1 0 -1 1 -1 -1 -1 3 2 -1 3 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 2 1 1 -1 -1 -1 -1 0 -1 -1 0 4 -1 -1 1 -1 -1 -1 1 -1 -1 2 1 -1 -1 2 -1 1 1 -1 -1 0 -1 -1 3 -1 -1 0 -1 1 -1 -1 -1 -...
result:
ok 1000 numbers
Test #7:
score: 0
Accepted
time: 5ms
memory: 3844kb
input:
1000 1 50000002 50000004 6 49999995 49999996 50000000 49999998 49999997 49999998 50000002 49999998 50000003 49999998 49999995 50000001 49999998 50000005 49999999 50000001 49999995 49999995 49999996 50000002 49999997 50000005 49999998 49999996 49999998 50000002 50000003 49999996 50000004 49999998 500...
output:
0 -1 -1 -1 0 1 -1 0 -1 -1 -1 0 2 3 -1 -1 -1 4 -1 -1 0 -1 0 -1 -1 1 0 -1 3 2 1 0 3 0 -1 -1 0 1 0 2 -1 -1 -1 0 3 1 0 0 3 -1 -1 2 -1 -1 -1 0 1 1 1 1 1 -1 2 -1 -1 -1 2 -1 0 -1 -1 0 2 -1 0 -1 2 1 2 -1 -1 -1 1 -1 0 -1 -1 -1 -1 4 -1 -1 -1 -1 -1 -1 4 0 -1 -1 -1 -1 0 2 2 -1 0 -1 -1 0 0 1 0 -1 0 0 -1 0 0 3 -1...
result:
ok 1000 numbers
Test #8:
score: 0
Accepted
time: 5ms
memory: 3996kb
input:
1000 7 50000005 50000000 50000005 49999994 49999998 49999996 50000002 49999998 49999999 49999999 50000004 49999995 50000009 49999995 49999997 50000000 49999992 50000006 50000003 50000008 50000003 49999991 49999998 50000001 49999997 49999990 50000007 49999998 50000007 49999999 50000009 49999998 49999...
output:
-1 -1 0 -1 1 -1 -1 0 -1 3 -1 0 -1 0 0 0 -1 2 0 -1 -1 -1 0 1 0 2 -1 0 0 -1 -1 0 0 -1 4 -1 1 1 -1 3 2 0 5 -1 -1 1 -1 0 -1 0 -1 -1 -1 0 1 2 0 -1 0 -1 1 -1 -1 0 -1 0 -1 4 -1 3 -1 1 3 3 -1 2 -1 -1 -1 2 -1 5 0 0 0 -1 -1 2 -1 5 0 -1 -1 0 0 -1 2 0 -1 0 -1 4 0 -1 0 2 0 0 -1 0 -1 -1 1 -1 -1 1 -1 -1 1 1 0 -1 0...
result:
ok 1000 numbers
Test #9:
score: 0
Accepted
time: 17ms
memory: 3740kb
input:
1000 7 49999988 49999986 50000013 50000001 49999982 50000000 50000010 49999984 50000019 50000011 50000001 50000012 50000016 50000009 49999984 49999985 49999989 50000000 50000015 49999981 50000002 50000013 50000001 50000019 50000009 50000007 50000014 49999999 49999997 49999997 49999998 49999996 50000...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #10:
score: 0
Accepted
time: 22ms
memory: 4056kb
input:
1000 7 49999953 49999968 49999984 49999956 50000008 50000033 49999983 49999989 50000027 49999958 50000036 50000043 50000038 49999957 50000026 49999952 49999955 50000028 49999983 50000008 50000036 50000049 49999985 49999959 49999955 50000012 49999993 49999969 49999997 49999966 50000017 50000022 50000...
output:
-1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 6 -1 6 5 -1 -1 -1 7 -1 6 6 -1 -1 6 6 -1 7 -1 6 -1 -1 -1 -1 6 -1 -1 -1 6 -1 -1 6 -1 -1 -1 -1 6 5 -1 -1 5 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 7 -1 7 -1 -1 6 -1 6 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 6 5 6 -1 4 7 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #11:
score: 0
Accepted
time: 22ms
memory: 3796kb
input:
1000 7 50000069 49999968 49999970 50000014 50000066 50000093 50000078 50000045 49999984 50000042 49999980 49999981 50000100 49999934 49999964 49999984 50000023 49999950 49999929 50000057 49999965 50000095 50000059 49999910 50000014 50000006 50000060 49999991 50000014 49999946 50000072 49999919 49999...
output:
6 4 4 7 4 4 5 4 5 4 4 6 5 6 3 5 6 5 3 4 -1 6 3 4 -1 4 5 4 5 4 6 3 -1 4 3 3 5 5 6 5 5 -1 5 5 3 4 6 5 -1 5 4 -1 5 4 4 6 4 4 3 6 4 2 5 3 4 7 3 5 4 5 4 5 6 6 5 7 -1 4 6 -1 3 6 6 5 -1 3 4 6 5 7 3 5 5 6 3 -1 -1 4 5 5 5 6 -1 4 4 4 3 6 7 5 7 4 4 6 5 -1 -1 4 5 5 7 4 6 4 6 5 6 5 6 4 -1 6 5 6 -1 -1 5 4 5 6 5 5...
result:
ok 1000 numbers
Test #12:
score: 0
Accepted
time: 15ms
memory: 4052kb
input:
1000 7 50000094 49999913 50000055 49999859 49999841 50000015 50000042 50000089 49999834 50000128 49999964 49999820 49999911 50000112 49999910 49999960 49999918 50000061 50000080 50000023 49999887 49999934 50000029 49999863 50000031 49999862 49999908 49999891 50000093 49999909 50000015 50000099 50000...
output:
4 3 4 2 4 3 3 4 3 4 2 2 3 3 4 5 3 -1 4 4 3 4 4 4 4 1 3 3 3 4 -1 4 5 2 3 3 2 5 3 6 3 5 4 5 6 5 3 3 4 2 2 3 3 4 2 1 4 3 5 4 2 4 2 4 4 3 5 4 3 4 6 3 2 5 2 2 2 5 3 4 2 3 2 6 3 4 5 4 4 3 3 3 2 4 3 5 4 5 -1 1 3 2 2 4 5 5 1 2 2 -1 3 2 4 5 2 7 2 3 3 3 5 4 5 3 6 2 2 5 4 2 5 2 -1 2 3 4 3 4 3 4 3 4 2 4 3 2 3 3...
result:
ok 1000 numbers
Test #13:
score: 0
Accepted
time: 22ms
memory: 3772kb
input:
1000 7 49999647 50000321 50000292 49999681 50000305 49999618 50000278 49999677 49999976 49999581 49999501 50000223 50000139 49999633 49999672 50000252 50000158 49999589 49999529 50000123 50000324 49999565 49999573 49999766 49999719 49999674 50000171 49999667 50000080 50000086 49999535 50000008 50000...
output:
0 3 2 2 2 1 2 2 1 2 1 4 1 1 1 1 2 2 3 2 1 2 2 5 0 2 1 2 1 3 0 3 1 2 0 2 2 3 2 2 1 1 2 2 0 3 0 1 2 2 2 1 3 -1 2 1 1 1 2 2 1 -1 4 2 3 3 3 2 0 3 2 2 3 1 2 2 1 2 3 5 2 3 2 1 2 2 1 2 3 3 1 2 3 2 1 1 2 2 3 1 3 1 0 2 1 1 1 3 1 3 3 1 1 0 2 2 1 1 4 1 2 2 3 2 3 2 1 1 3 2 1 2 -1 1 0 1 2 3 2 0 1 0 2 2 3 3 2 1 2...
result:
ok 1000 numbers
Test #14:
score: 0
Accepted
time: 18ms
memory: 3844kb
input:
1000 7 49999296 50000153 49999247 50000001 49999647 50000551 50000894 50000684 49999095 50000634 50000853 50000116 49999968 49999634 50000930 50000569 50000547 50000870 50000219 49999656 49999913 50000748 49999296 50000129 49999664 50000266 49999096 49999687 50000986 50000301 50000019 50000444 50000...
output:
2 2 1 1 1 1 3 0 2 0 0 1 2 2 1 2 3 1 1 2 0 2 1 1 2 1 3 1 3 2 1 2 0 1 1 0 2 1 2 1 1 2 2 0 1 0 2 1 1 1 0 0 1 1 1 0 3 1 1 1 1 1 0 1 1 1 1 1 0 2 2 1 1 1 2 2 3 2 3 0 1 2 0 1 1 1 2 1 2 2 0 0 1 2 2 1 2 0 0 1 1 1 1 2 0 1 1 0 2 1 2 1 0 0 1 2 3 2 0 1 1 1 1 1 2 3 1 1 1 2 2 2 2 1 1 1 2 1 1 0 1 0 2 1 0 1 0 1 0 0 ...
result:
ok 1000 numbers
Test #15:
score: 0
Accepted
time: 18ms
memory: 3840kb
input:
1000 7 50001954 50001257 49999003 50000567 50000029 50001824 49999008 49998588 49998872 49998692 49999609 49999765 49998988 49998766 50001881 49999615 50001806 50001690 49998880 50001629 49999472 50000395 49999551 49998733 49999199 50001325 49998419 50000167 50001687 49999326 49998552 49999754 50001...
output:
1 0 0 0 1 1 1 2 1 1 2 1 0 0 0 1 1 1 2 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 2 1 2 1 2 1 1 0 0 0 0 1 0 1 1 2 1 0 0 0 0 0 1 2 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 0 2 1 1 1 1 0 1 1 0 1 0 0 1 0 1 1 2 1 1 2 -1 0 1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 0 1 0 0 0 1 2 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0...
result:
ok 1000 numbers
Test #16:
score: 0
Accepted
time: 12ms
memory: 3736kb
input:
1000 7 66666666 33333333 66666666 66666666 66666666 33333333 33333333 66666666 66666666 66666666 33333333 66666666 66666666 33333333 66666666 66666666 66666666 33333333 66666666 66666666 33333333 33333333 66666666 33333333 33333333 66666666 66666666 33333333 66666666 33333333 66666666 66666666 33333...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #17:
score: 0
Accepted
time: 5ms
memory: 3780kb
input:
1000 3 66666666 66666665 66666666 33333334 33333332 33333333 33333332 33333332 66666667 66666667 33333334 66666666 33333332 33333334 8 33333334 66666667 66666667 66666666 33333334 33333333 33333332 33333332 66666667 66666665 66666666 33333332 33333333 66666666 66666667 66666667 66666666 33333334 333...
output:
-1 -1 2 1 2 -1 1 2 -1 1 -1 -1 0 -1 1 -1 1 -1 -1 1 -1 -1 2 1 -1 -1 -1 0 -1 0 2 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 -1 0 -1 -1 1 -1 -1 0 0 -1 1 3 -1 3 -1 0 0 -1 -1 -1 -1 -1 1 1 -1 -1 1 1 0 -1 1 3 -1 0 1 -1 1 -1 0 -1 0 2 0 0 -1 -1 0 -1 -1 -1 -1 -1 0 1 3 0 -1 -1 0 0 -1 -1 2 1 2 1 -1 4 -1 -1 2 -1 0 0 ...
result:
ok 1000 numbers
Test #18:
score: 0
Accepted
time: 2ms
memory: 3744kb
input:
1000 3 33333333 66666668 33333332 33333332 33333334 33333334 33333332 66666665 66666665 33333333 66666668 66666664 33333331 33333335 6 66666664 66666665 33333332 33333334 66666665 33333331 66666668 66666664 33333331 66666668 66666668 66666665 33333335 66666665 66666664 33333331 66666664 66666667 333...
output:
1 -1 4 -1 1 -1 1 0 1 -1 -1 0 -1 0 0 0 0 -1 -1 1 0 -1 1 -1 -1 0 2 0 -1 1 1 0 2 1 -1 4 -1 -1 -1 -1 1 0 3 5 0 -1 -1 0 0 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 1 4 0 0 -1 -1 1 0 -1 -1 2 -1 -1 0 -1 -1 -1 0 -1 2 -1 1 -1 0 2 -1 3 -1 1 3 -1 1 0 0 1 1 -1 -1 -1 5 1 0 0 0 0 -1 1 1 -1 -1 3 -1 -1 -1 1 ...
result:
ok 1000 numbers
Test #19:
score: 0
Accepted
time: 6ms
memory: 3800kb
input:
1000 6 33333338 66666666 33333336 66666662 66666662 66666662 66666665 66666667 66666667 66666661 66666668 33333330 33333330 66666665 33333338 66666667 66666670 66666668 66666666 33333338 66666668 33333331 33333328 66666663 66666661 66666668 66666663 33333335 33333336 66666664 33333329 66666671 33333...
output:
-1 0 0 1 2 -1 3 1 1 1 2 -1 0 1 0 0 0 0 2 0 1 0 1 1 -1 1 -1 1 -1 3 0 -1 0 0 0 1 -1 -1 3 0 2 -1 0 -1 1 0 0 -1 1 1 0 0 -1 -1 0 3 -1 0 0 0 0 2 1 0 -1 -1 0 3 0 0 0 0 0 1 0 2 -1 1 3 0 0 -1 0 2 1 0 2 -1 0 2 -1 1 0 0 3 3 2 -1 3 0 0 -1 1 -1 -1 1 -1 1 1 4 0 -1 0 0 -1 2 3 1 0 0 -1 -1 0 0 -1 -1 2 1 -1 2 0 1 -1 ...
result:
ok 1000 numbers
Test #20:
score: 0
Accepted
time: 18ms
memory: 3780kb
input:
1000 7 66666670 33333331 33333327 66666666 33333325 33333335 66666672 33333340 66666667 66666669 66666675 33333330 33333331 66666659 66666668 66666657 33333343 66666674 33333326 33333327 66666666 33333340 33333328 33333328 66666658 33333337 33333342 33333332 66666660 33333328 66666665 66666663 66666...
output:
-1 -1 -1 -1 -1 -1 -1 -1 7 -1 -1 -1 -1 -1 -1 -1 -1 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...
result:
ok 1000 numbers
Test #21:
score: 0
Accepted
time: 23ms
memory: 3948kb
input:
1000 7 33333317 33333339 33333317 33333339 66666653 33333330 66666676 66666649 33333350 33333315 33333320 33333343 66666654 33333345 66666673 66666666 66666652 66666668 33333323 66666677 66666654 33333331 66666657 33333350 33333346 66666650 66666651 33333333 66666681 33333318 33333317 33333324 66666...
output:
4 -1 5 -1 -1 5 5 -1 6 -1 -1 -1 -1 6 5 -1 -1 -1 5 -1 -1 -1 -1 6 -1 -1 6 -1 -1 4 -1 5 5 5 7 -1 -1 -1 -1 -1 -1 7 2 -1 6 5 -1 5 -1 -1 -1 -1 -1 -1 5 5 6 -1 -1 -1 5 -1 -1 3 7 7 5 -1 3 -1 5 5 4 6 5 -1 6 -1 5 -1 5 -1 -1 -1 6 -1 -1 5 -1 -1 5 6 6 5 -1 -1 5 5 -1 6 4 -1 6 -1 6 6 -1 -1 5 -1 -1 5 5 5 5 -1 6 5 5 4...
result:
ok 1000 numbers
Test #22:
score: 0
Accepted
time: 23ms
memory: 4064kb
input:
1000 7 66666630 66666671 66666622 66666688 33333303 33333322 66666625 33333354 33333334 66666692 33333302 33333328 33333327 66666638 66666716 66666664 66666633 33333378 33333359 66666640 33333319 66666656 66666670 66666656 66666651 66666661 66666624 66666669 33333283 33333334 33333300 66666674 33333...
output:
3 3 3 2 3 2 4 3 3 1 5 4 4 2 3 2 5 2 2 4 3 2 2 4 3 4 3 -1 3 3 4 5 6 4 4 4 4 3 -1 3 5 3 2 4 4 -1 5 3 3 4 4 4 3 4 4 4 5 3 5 -1 4 4 3 2 4 2 4 2 -1 4 4 4 4 3 2 2 4 4 4 4 -1 3 2 4 3 -1 5 3 2 4 3 3 3 3 3 3 4 1 3 4 4 3 2 3 4 3 3 3 3 3 2 3 2 5 3 4 3 3 3 2 4 4 -1 4 2 3 5 4 5 3 4 3 5 3 3 3 3 3 3 2 3 3 3 4 3 2 ...
result:
ok 1000 numbers
Test #23:
score: 0
Accepted
time: 21ms
memory: 3756kb
input:
1000 7 33333342 33333411 33333372 66666646 66666643 66666602 66666621 33333433 66666731 66666635 66666680 33333388 66666704 33333424 66666704 33333347 33333248 66666747 33333318 33333311 33333313 33333301 33333290 66666765 33333346 66666723 33333390 33333396 33333315 33333262 33333365 66666690 33333...
output:
1 2 2 4 1 3 3 3 4 -1 2 1 4 2 1 3 4 3 3 5 3 1 -1 3 1 2 2 3 1 1 2 1 4 1 1 2 0 2 2 3 5 -1 3 2 1 2 2 3 3 2 3 2 2 4 2 0 2 1 -1 1 1 2 2 0 3 2 3 2 1 -1 1 2 1 3 2 2 3 3 1 2 3 -1 3 3 3 1 1 3 3 3 3 1 4 2 1 3 1 2 3 0 4 2 2 2 3 1 3 2 4 2 2 2 3 2 4 1 1 2 3 3 1 2 2 0 2 4 3 1 2 3 2 3 -1 2 2 1 1 3 2 -1 2 2 1 0 2 4 ...
result:
ok 1000 numbers
Test #24:
score: 0
Accepted
time: 21ms
memory: 3776kb
input:
1000 7 33333387 66666531 33333438 66666840 66666642 33333375 66666843 66666765 33333264 66666681 66666811 33333522 33333245 33333518 66666580 66666614 33333217 66666551 33333426 33333463 33333219 66666801 33333328 66666507 33333456 33333284 33333257 66666502 66666528 33333467 66666553 66666751 33333...
output:
2 0 1 0 1 1 2 0 2 2 1 2 1 2 2 1 1 1 2 0 2 1 1 3 1 2 0 3 1 1 1 0 -1 1 3 1 0 1 0 2 2 1 2 1 2 2 3 1 1 1 0 2 2 1 2 2 2 1 1 1 0 1 0 3 1 2 1 1 1 3 1 0 1 2 1 1 1 1 0 1 3 0 1 3 1 0 1 1 1 1 1 2 2 1 0 1 1 4 1 2 0 0 1 0 2 1 3 2 1 1 1 1 3 0 1 1 2 1 1 0 2 1 3 2 1 1 -1 2 2 1 1 1 1 2 0 2 1 2 2 2 0 1 2 2 1 1 2 1 2 ...
result:
ok 1000 numbers
Test #25:
score: 0
Accepted
time: 19ms
memory: 3852kb
input:
1000 7 66666931 33333140 33333494 33333771 66666774 66667012 66666297 66666438 66666659 66666751 33333189 66666381 66666581 33333715 33333577 66666448 33333424 33333715 33333256 33333758 66666535 33333735 33333692 66666360 33332881 33333547 33332906 33333704 66666194 33333122 66667083 33333465 66667...
output:
0 0 0 1 1 1 1 0 1 0 0 0 2 1 0 0 2 0 0 0 0 3 2 2 0 1 1 0 2 0 6 2 0 1 1 0 2 0 1 0 0 1 2 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 2 1 1 1 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 2 1 0 1 1 0 0 0 1 0 3 1 1 0 1 0 0 1 1 0 1 0 1 2 2 0 0 0 1 1 1 1 1 0 1 1 2 1 1 1 2 0 1 0 2 1 1 6 1 2 2 1 0 1 1 1 0 1 1 ...
result:
ok 1000 numbers
Test #26:
score: 0
Accepted
time: 22ms
memory: 3816kb
input:
1000 7 33333321 33333691 66666595 33332402 66667630 33332437 66666918 66667315 33333325 66666374 66666224 33333589 33333950 33333837 33332534 66667328 33332614 66666016 66666404 33334049 66666415 66667557 66667586 66666087 33333098 33333485 33333640 33332355 66666981 66667093 66666927 66666804 66667...
output:
0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 2 0 1 1 1 1 0 0 1 0 0 2 1 1 1 0 0 1 0 0 0 0 0 0 1 0 2 1 0 0 0 1 0 1 1 0 2 0 0 2 2 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 3 0 0 0 0 0 1 0 0 2 0 0 0 0 1 0 0 1 0 0 0 0 0 0 ...
result:
ok 1000 numbers
Test #27:
score: 0
Accepted
time: 16ms
memory: 3736kb
input:
1000 7 16666667 16666667 66666668 50000001 33333334 66666668 50000001 33333334 50000001 50000001 16666667 33333334 33333334 66666668 33333334 16666667 33333334 66666668 83333335 50000001 83333335 33333334 66666668 66666668 66666668 66666668 16666667 83333335 50000001 66666668 83333335 33333334 83333...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #28:
score: 0
Accepted
time: 5ms
memory: 3808kb
input:
1000 4 83333336 50000001 33333333 16666666 33333333 83333336 33333335 50000002 66666667 33333333 33333335 83333336 50000002 16666666 16666666 16666667 83333335 33333333 66666667 50000000 83333335 50000000 50000001 50000001 83333335 66666667 66666668 16666666 83333335 66666669 5 50000000 83333334 166...
output:
2 4 3 -1 -1 -1 1 1 2 0 -1 0 1 0 -1 -1 3 0 0 1 1 -1 -1 -1 1 0 2 -1 -1 4 1 2 -1 -1 1 -1 3 -1 4 -1 2 -1 -1 2 0 3 0 3 0 3 0 -1 0 2 1 0 0 0 -1 -1 0 0 0 -1 2 0 -1 1 -1 -1 5 0 -1 -1 -1 -1 -1 0 -1 1 -1 0 0 0 -1 1 0 0 0 -1 -1 -1 -1 -1 0 -1 1 0 0 1 1 -1 4 -1 3 -1 -1 -1 -1 1 -1 -1 -1 1 2 4 1 -1 0 -1 0 0 -1 2 0...
result:
ok 1000 numbers
Test #29:
score: 0
Accepted
time: 6ms
memory: 3752kb
input:
1000 2 66666668 83333337 16666666 16666666 16666665 16666669 4 50000002 66666668 33333336 83333336 83333333 33333333 16666667 50000000 16666665 16666668 33333334 66666667 16666668 50000003 16666665 33333332 33333334 16666667 50000002 83333335 50000002 66666670 16666666 33333333 50000002 33333334 666...
output:
1 1 3 -1 -1 -1 0 1 -1 0 -1 1 -1 5 0 0 -1 -1 -1 0 -1 4 0 0 -1 1 1 1 2 0 4 -1 1 0 4 0 -1 -1 0 1 -1 2 0 0 0 0 0 1 2 3 0 -1 -1 -1 -1 1 0 3 5 -1 -1 -1 1 -1 0 -1 0 0 5 0 -1 -1 0 1 -1 1 1 -1 -1 0 1 1 0 2 3 3 2 0 -1 0 0 0 -1 3 0 0 0 0 0 -1 3 2 0 2 1 -1 -1 4 0 0 0 1 1 1 0 0 2 1 -1 -1 3 1 1 0 0 0 0 0 -1 -1 1 ...
result:
ok 1000 numbers
Test #30:
score: 0
Accepted
time: 20ms
memory: 3784kb
input:
1000 7 33333335 83333340 16666668 16666667 83333339 83333338 66666672 83333336 66666665 33333331 66666668 16666665 83333335 83333337 66666669 83333337 33333334 83333339 83333339 66666671 50000001 33333330 83333340 33333335 33333337 33333338 49999997 50000002 16666662 83333335 49999999 16666672 33333...
output:
-1 -1 6 -1 -1 6 -1 6 -1 -1 6 -1 6 -1 -1 6 -1 5 -1 -1 -1 -1 -1 7 5 -1 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 4 -1 4 -1 -1 -1 6 7 -1 -1 -1 -1 6 7 -1 -1 -1 6 -1 -1 -1 -1 -1 7 -1 -1 -1 -1 -1 5 5 -1 -1 6 -1 7 -1 6 -1 -1 6 -1 -1 6 7 -1 -1 -1 -1 -1 -1 7 -1 -1 -1 -1 6 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 -...
result:
ok 1000 numbers
Test #31:
score: 0
Accepted
time: 25ms
memory: 4040kb
input:
1000 7 16666669 33333331 16666658 83333339 66666663 16666675 16666670 16666676 33333337 33333342 66666678 33333333 33333337 66666667 83333339 83333342 50000002 50000008 16666670 33333334 16666674 66666676 49999997 33333331 83333330 16666670 49999995 33333343 49999991 83333325 16666672 16666666 50000...
output:
4 4 4 -1 6 7 4 -1 -1 5 6 5 4 4 4 -1 6 4 6 5 5 4 4 -1 2 5 2 -1 4 -1 4 6 6 5 -1 5 -1 5 5 4 5 4 5 -1 -1 6 4 3 4 5 5 5 3 3 4 4 -1 -1 6 5 -1 -1 4 4 6 -1 2 4 2 -1 5 4 -1 3 -1 -1 4 5 -1 5 4 5 4 5 -1 -1 3 -1 5 4 6 4 4 -1 6 6 -1 5 4 -1 4 7 4 -1 2 6 5 -1 4 -1 6 4 5 6 3 -1 4 4 5 -1 4 -1 4 -1 3 6 -1 3 6 -1 -1 5...
result:
ok 1000 numbers
Test #32:
score: 0
Accepted
time: 22ms
memory: 3824kb
input:
1000 7 66666652 83333340 16666649 33333342 66666649 33333343 33333342 66666649 50000021 66666654 66666657 66666671 83333316 49999982 66666679 16666673 16666683 33333339 49999986 66666681 83333343 33333344 83333330 33333329 16666677 16666654 66666650 83333338 83333345 83333347 33333353 83333320 83333...
output:
4 3 3 5 4 2 4 2 2 4 1 2 3 3 2 4 4 3 4 4 4 3 2 5 2 3 2 3 4 3 2 2 -1 2 3 4 3 4 1 3 4 3 1 2 -1 3 3 4 -1 3 4 5 3 3 3 3 4 3 4 3 -1 2 5 3 2 4 -1 3 -1 2 -1 2 3 1 4 3 4 4 2 3 2 5 2 3 -1 3 4 3 3 1 3 3 3 3 3 2 2 2 3 4 -1 3 -1 3 2 4 4 -1 3 3 5 4 3 3 1 4 3 2 3 1 2 3 4 4 5 2 2 3 -1 3 1 5 -1 3 2 3 1 4 4 3 4 3 5 4...
result:
ok 1000 numbers
Test #33:
score: 0
Accepted
time: 22ms
memory: 3776kb
input:
1000 7 66666684 66666627 66666717 50000041 83333288 49999995 33333313 66666695 49999973 66666656 33333363 16666661 33333358 66666698 16666633 49999970 16666628 33333305 16666661 83333312 66666692 83333308 16666649 66666664 66666641 83333290 66666671 49999964 33333368 33333364 33333293 16666678 33333...
output:
3 1 2 2 1 1 2 1 2 4 1 2 1 2 4 1 1 3 2 1 5 2 1 3 2 2 1 2 3 2 0 2 3 2 2 1 2 2 2 1 -1 2 1 2 5 0 1 3 2 3 1 0 2 1 2 2 -1 2 1 1 3 3 3 1 1 1 2 2 1 1 2 1 3 2 1 2 1 1 1 1 2 3 1 2 2 3 2 0 3 1 0 2 2 2 1 1 2 2 3 1 2 1 1 2 1 2 2 0 1 2 -1 2 0 1 1 1 1 2 1 4 2 3 2 1 0 0 0 1 1 3 2 1 1 3 1 2 1 1 2 1 4 1 0 2 1 1 3 4 1...
result:
ok 1000 numbers
Test #34:
score: 0
Accepted
time: 23ms
memory: 3792kb
input:
1000 7 16666750 16666592 16666629 49999940 66666674 49999929 66666761 33333270 66666647 66666719 83333295 66666660 33333361 16666673 49999948 66666648 83333236 83333408 33333322 16666568 33333238 66666652 16666708 66666624 49999909 66666651 16666589 83333256 33333297 83333301 50000022 83333348 33333...
output:
1 2 0 1 1 1 2 0 2 0 0 1 1 1 1 1 2 1 0 2 -1 3 1 0 0 1 1 2 1 1 1 2 -1 1 1 1 2 1 0 1 0 1 2 2 1 1 1 2 0 1 2 1 1 1 1 0 1 2 1 2 1 0 0 1 1 1 1 1 0 2 1 2 0 0 1 1 1 1 0 0 1 1 0 2 1 0 1 0 2 1 1 1 2 1 1 0 0 -1 1 2 2 1 1 2 0 1 1 0 0 2 -1 2 1 2 1 2 2 0 2 0 0 1 2 1 1 1 2 1 0 1 2 2 0 1 0 1 1 1 1 1 2 0 2 1 1 0 0 2 ...
result:
ok 1000 numbers
Test #35:
score: 0
Accepted
time: 23ms
memory: 3836kb
input:
1000 7 66666666 16666801 66666866 50000178 66666682 49999813 83333300 33333393 33333387 16666616 33333304 33333506 83333503 16666747 66666859 33333510 33333206 83333275 33333260 83333463 33333523 49999817 66666693 33333240 33333481 16666857 16666527 33333276 66666684 50000200 33333138 16666509 83333...
output:
0 2 1 1 3 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 1 1 2 2 0 0 2 0 1 0 1 0 1 0 0 1 2 0 1 0 0 1 0 1 1 1 0 1 0 0 0 2 2 1 2 2 1 1 0 2 0 0 1 1 0 1 0 1 0 0 2 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 2 0 0 0 1 0 0 0 0 0 1 0 3 1 0 1 0 0 1 7 1 0 0 1 2 0 1 0 1 1 0 0 1 3 2 0 0 1 0 1 0 2 1 1 1 1 1 1 0 ...
result:
ok 1000 numbers
Test #36:
score: 0
Accepted
time: 15ms
memory: 4012kb
input:
1000 7 63636363 18181818 81818181 81818181 90909090 54545454 18181818 54545454 72727272 54545454 63636363 45454545 45454545 72727272 63636363 54545454 18181818 36363636 90909090 36363636 54545454 18181818 63636363 63636363 63636363 54545454 9090909 27272727 27272727 36363636 9090909 63636363 4545454...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #37:
score: 0
Accepted
time: 6ms
memory: 4040kb
input:
1000 7 63636364 63636362 72727272 63636363 45454545 36363636 63636364 54545454 54545454 90909090 36363636 72727271 18181817 36363637 81818180 18181819 54545455 18181818 90909090 81818181 81818181 27272727 72727271 72727272 18181817 54545454 63636364 63636362 90909089 81818182 72727271 72727273 90909...
output:
-1 0 -1 0 -1 0 0 3 1 0 1 3 0 -1 5 0 -1 4 -1 -1 0 -1 -1 1 1 -1 3 -1 -1 5 -1 0 1 1 5 -1 0 0 0 -1 2 3 0 3 0 1 -1 1 -1 0 -1 0 2 0 2 3 0 -1 0 2 0 0 0 1 0 -1 2 2 4 0 -1 -1 0 4 -1 1 0 -1 0 0 0 2 -1 -1 0 -1 1 0 -1 1 1 -1 0 1 -1 0 0 0 0 0 0 -1 0 0 0 1 0 0 -1 -1 1 -1 0 0 1 -1 -1 0 1 0 0 2 1 -1 5 0 2 4 0 -1 3 ...
result:
ok 1000 numbers
Test #38:
score: 0
Accepted
time: 20ms
memory: 3952kb
input:
1000 7 81818179 72727272 63636362 72727272 45454544 63636365 9090911 27272728 27272726 27272725 36363634 9090909 27272726 18181816 18181820 54545455 45454544 54545454 36363636 36363637 27272727 90909092 72727272 81818182 45454546 45454546 9090909 45454547 9090908 9090908 45454543 63636365 90909088 9...
output:
-1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 -1 6 -1 -1 -1 6 -1 -1 -1 5 -1 -1 -1 -1 6 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 6 -1 -1 -1 6 -1 -1 -1 -1 -1 5 -1 -1 -1 7 -1 -1 -1 -1 -1 5 -1 -1 -1 6 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 6 -1 -1 -1 7 -1 -1 -1 -1 -1 6 -1 -1 5 -1...
result:
ok 1000 numbers
Test #39:
score: 0
Accepted
time: 24ms
memory: 3856kb
input:
1000 7 81818176 36363636 45454547 81818183 18181817 63636362 54545451 9090904 45454550 81818177 81818180 36363631 63636367 45454547 45454550 54545459 72727275 36363639 63636358 18181818 81818181 63636361 90909088 54545458 45454549 36363641 36363640 54545450 54545449 36363639 54545457 54545456 272727...
output:
3 -1 5 5 3 -1 4 3 3 -1 3 2 4 5 4 5 4 -1 4 5 4 4 4 4 5 5 6 -1 6 4 3 5 6 4 -1 6 5 3 6 3 4 5 -1 5 6 6 6 4 4 -1 4 4 -1 4 4 -1 4 5 3 5 4 1 3 3 4 4 6 4 3 3 4 -1 4 4 6 4 7 5 -1 -1 -1 5 3 5 4 5 4 5 5 5 4 -1 6 5 2 2 3 5 2 5 -1 -1 5 -1 -1 4 4 4 3 5 -1 -1 6 5 6 -1 6 -1 -1 4 5 -1 -1 4 4 5 5 6 6 5 6 -1 -1 2 6 -1...
result:
ok 1000 numbers
Test #40:
score: 0
Accepted
time: 23ms
memory: 3812kb
input:
1000 7 27272736 90909090 45454540 72727265 27272724 90909082 90909088 18181816 72727279 36363644 63636365 27272728 81818188 27272724 18181821 63636363 63636370 90909080 45454544 54545461 54545447 27272730 9090908 18181826 45454548 63636366 81818186 72727275 45454555 18181818 27272724 18181827 818181...
output:
-1 3 3 2 1 2 5 4 4 3 3 4 5 2 5 3 3 3 2 5 5 3 3 2 4 3 3 1 -1 5 4 2 4 3 4 2 -1 3 3 5 4 -1 3 3 3 2 2 3 3 2 4 3 4 1 4 3 2 3 4 3 4 4 -1 2 1 2 3 3 3 2 3 3 -1 3 5 3 5 3 3 2 3 4 3 2 3 4 5 2 4 2 5 2 3 4 3 3 2 2 2 2 3 2 2 2 3 4 4 3 4 3 3 6 4 -1 2 5 1 3 3 3 1 3 -1 3 3 3 2 5 2 4 4 5 4 4 2 4 4 2 4 2 4 2 3 4 3 2 ...
result:
ok 1000 numbers
Test #41:
score: 0
Accepted
time: 22ms
memory: 3828kb
input:
1000 7 54545443 63636380 36363621 81818165 81818195 72727284 9090892 81818178 36363652 63636371 18181811 45454553 36363646 27272714 90909098 27272723 45454525 81818163 36363652 9090889 27272731 81818163 90909079 18181800 90909083 36363627 81818169 54545460 90909071 63636359 72727252 27272713 5454543...
output:
2 2 1 1 1 2 2 3 2 2 4 1 3 1 2 2 2 2 1 1 2 1 2 1 3 4 1 2 3 -1 1 2 2 1 2 1 2 3 2 2 3 4 2 1 3 1 3 2 1 3 2 1 3 2 2 1 3 1 3 3 2 2 3 2 3 3 3 2 0 3 2 1 1 2 3 2 1 1 2 2 1 1 1 2 2 1 3 3 1 1 3 4 1 2 3 2 2 2 3 0 2 2 2 -1 2 -1 2 2 1 3 -1 3 2 2 1 3 -1 2 2 2 1 2 1 3 2 2 4 3 2 -1 2 3 2 2 3 1 3 2 3 4 1 2 2 2 2 3 3 ...
result:
ok 1000 numbers
Test #42:
score: 0
Accepted
time: 22ms
memory: 3840kb
input:
1000 7 63636316 90909085 63636393 54545479 63636391 36363630 90909094 72727224 72727276 72727244 45454520 63636331 36363657 81818208 72727260 81818134 45454526 81818204 90909055 45454545 9090943 54545476 72727241 81818141 72727290 90909055 81818220 9090951 27272684 54545488 45454577 90909047 7272723...
output:
2 0 3 1 1 0 1 1 0 0 1 1 1 1 2 0 1 2 1 1 1 0 1 1 1 1 1 1 1 -1 -1 1 0 1 2 1 4 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 2 1 3 0 0 0 1 -1 1 2 1 0 1 1 1 0 3 2 1 0 0 0 3 1 0 0 1 1 0 0 0 1 1 2 2 -1 0 0 2 3 2 1 1 0 1 0 1 1 2 0 2 2 2 1 0 1 1 1 1 0 1 1 0 1 0 2 2 1 2 0 2 0 1 1 2 3 2 1 1 0 -1 0 0 1 2 1 0 1 1 0 0 0 1 1...
result:
ok 1000 numbers
Test #43:
score: 0
Accepted
time: 21ms
memory: 3912kb
input:
1000 7 36363558 9090932 9090976 90909068 18181774 81818176 36363555 45454504 18181857 45454450 45454642 36363608 36363644 18181772 90909122 72727236 45454571 72727335 72727316 18181755 63636270 27272794 63636437 72727215 63636434 72727278 81818148 54545441 45454462 72727346 18181917 63636389 3636373...
output:
1 0 0 2 2 0 0 2 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 2 0 1 0 2 -1 0 0 0 2 0 1 0 0 1 0 1 0 0 2 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 6 0 1 0 1 0 1 1 1 1 0 3 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 2 0 9 0 1 0 1 0 0 2 1 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 1...
result:
ok 1000 numbers
Test #44:
score: 0
Accepted
time: 22ms
memory: 4108kb
input:
1000 7 18181699 90909007 9090770 45454565 72727250 27272551 72727271 45454731 63636321 81818229 9090746 18181790 36363649 18182004 18181731 27272740 18181625 18181926 54545263 9091096 45454728 90908949 63636450 36363661 54545628 45454555 63636356 81818253 54545380 81818174 90909185 45454449 54545416...
output:
0 0 0 0 0 0 1 2 0 2 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 2 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 2 0 0 0 0 1 1 2 0 0 0 1 1 1 0 0 0 2 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 6 1 0 0 0 0 2 1 0 1 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 4 1 0 0 1 1 0 ...
result:
ok 1000 numbers
Test #45:
score: 0
Accepted
time: 12ms
memory: 3760kb
input:
1000 7 95238100 80952385 38095240 33333335 19047620 19047620 9523810 57142860 38095240 9523810 80952385 38095240 85714290 57142860 9523810 76190480 85714290 66666670 80952385 23809525 23809525 9523810 80952385 95238100 4761905 61904765 4761905 85714290 71428575 33333335 14285715 42857145 66666670 95...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #46:
score: 0
Accepted
time: 21ms
memory: 3712kb
input:
1000 7 57142861 42857146 23809526 85714289 61904764 90476195 90476194 76190481 23809524 47619051 80952384 80952385 33333336 33333335 4761904 38095239 85714289 76190480 14285716 38095239 80952385 23809526 4761904 14285716 66666669 33333336 33333336 23809524 47619049 90476195 71428575 95238100 8571428...
output:
-1 -1 -1 -1 -1 6 -1 -1 -1 6 -1 6 6 -1 -1 -1 5 -1 -1 -1 -1 -1 6 -1 -1 6 -1 -1 -1 7 -1 6 -1 6 -1 -1 5 -1 -1 -1 -1 -1 5 -1 -1 6 -1 6 -1 -1 5 -1 -1 -1 -1 5 -1 -1 6 6 -1 -1 -1 -1 -1 4 -1 5 -1 -1 -1 6 -1 6 6 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 6 6 5 -1 -1 -1 -1 -1 -1 5 -1 5 6 -1 -1 5 -1 -1...
result:
ok 1000 numbers
Test #47:
score: 0
Accepted
time: 24ms
memory: 4044kb
input:
1000 7 38095238 57142862 28571428 19047620 90476195 23809524 76190481 90476195 42857143 42857145 47619051 14285717 80952387 47619050 80952384 95238102 23809526 80952386 4761903 71428577 57142860 33333335 80952383 47619048 14285713 76190480 61904767 95238099 9523809 47619050 9523811 38095238 90476196...
output:
6 5 4 6 5 5 7 4 -1 5 6 4 4 5 3 5 5 6 -1 6 4 -1 4 4 -1 5 6 2 3 -1 -1 4 3 -1 -1 6 4 -1 -1 5 6 2 4 4 3 4 5 -1 -1 5 5 5 4 4 -1 3 6 6 5 4 -1 -1 4 -1 4 4 -1 6 -1 6 6 5 -1 3 -1 -1 -1 -1 6 4 -1 5 6 4 5 5 4 -1 -1 5 4 4 6 -1 5 -1 4 5 -1 5 -1 3 4 5 5 6 6 4 5 5 6 6 4 6 5 6 3 -1 4 5 5 3 3 4 5 5 4 4 3 6 3 4 5 -1 ...
result:
ok 1000 numbers
Test #48:
score: 0
Accepted
time: 24ms
memory: 3852kb
input:
1000 7 52380960 90476190 85714294 14285713 90476190 71428579 71428576 33333333 71428580 71428570 14285716 76190482 19047621 19047616 71428572 76190482 38095237 80952383 14285711 80952380 90476198 23809527 66666671 85714291 23809526 42857149 66666670 23809530 80952388 61904760 33333333 19047625 57142...
output:
3 3 4 4 5 5 -1 1 2 4 4 2 2 5 4 1 1 4 2 -1 2 2 4 3 2 5 4 3 2 3 3 6 4 1 5 2 2 3 1 2 5 3 5 5 2 2 1 4 2 -1 4 3 1 3 -1 5 2 2 4 3 3 3 3 -1 3 3 2 2 4 2 2 5 3 4 1 4 2 1 3 2 3 3 2 3 5 2 2 3 1 3 5 3 3 5 5 4 4 3 3 3 4 2 2 5 1 2 3 4 3 3 4 4 3 3 3 2 3 3 3 2 1 4 2 3 3 1 5 -1 2 3 2 3 2 4 3 3 3 4 2 4 5 4 2 4 3 6 3 ...
result:
ok 1000 numbers
Test #49:
score: 0
Accepted
time: 22ms
memory: 3824kb
input:
1000 7 85714281 33333326 61904771 85714299 33333341 61904766 47619060 23809517 19047617 4761911 95238094 33333332 9523813 23809516 90476190 4761900 85714283 61904769 61904760 90476205 66666667 47619058 66666661 38095248 42857151 9523802 57142864 71428574 66666675 42857149 76190488 14285725 61904765 ...
output:
4 2 3 2 2 2 2 3 1 1 4 1 2 2 2 2 2 1 -1 3 4 -1 0 1 2 2 4 2 2 3 0 1 1 1 3 2 3 3 2 2 4 1 2 0 1 2 2 5 3 2 2 1 3 -1 2 1 2 2 4 2 1 3 3 3 4 1 2 1 4 2 1 1 2 3 3 2 -1 3 3 2 1 2 3 1 2 4 3 3 3 1 4 3 4 3 2 2 2 3 5 -1 3 3 2 2 2 2 3 1 1 2 2 3 1 3 4 2 2 1 1 -1 2 3 1 2 2 1 2 2 1 1 2 2 4 2 1 1 3 1 2 2 1 3 2 4 1 1 1 ...
result:
ok 1000 numbers
Test #50:
score: 0
Accepted
time: 18ms
memory: 3912kb
input:
1000 7 14285698 23809520 85714302 9523820 61904765 33333343 42857144 38095240 47619058 52380952 23809509 33333331 33333342 80952372 14285717 33333338 76190481 95238080 95238105 80952399 66666661 52380969 4761897 85714287 71428559 33333345 33333317 90476178 14285723 52380941 33333334 66666671 7619047...
output:
1 3 1 1 1 2 0 0 0 1 1 0 3 2 2 2 2 2 1 2 1 2 2 1 2 3 1 2 2 1 2 1 3 0 2 2 2 1 3 1 2 2 1 2 2 0 1 1 4 1 1 1 0 1 2 1 0 1 1 1 0 0 2 0 1 1 2 2 2 1 4 1 1 1 2 1 2 1 2 1 1 2 2 1 1 1 2 1 2 2 4 0 3 2 0 2 0 1 1 0 1 1 2 0 2 1 2 2 1 0 0 1 1 0 2 1 4 2 2 2 4 2 2 0 2 1 2 0 0 1 1 2 0 1 0 2 0 1 1 1 2 1 0 1 1 0 1 0 1 1 ...
result:
ok 1000 numbers
Test #51:
score: 0
Accepted
time: 15ms
memory: 3916kb
input:
1000 7 66666625 61904733 47619053 80952350 61904784 80952364 76190516 61904770 85714278 71428526 38095245 85714292 61904785 14285722 52380927 61904760 76190524 19047611 85714270 61904721 14285755 57142895 4761855 38095234 14285685 52380949 33333310 76190512 47619002 14285679 14285676 61904743 571428...
output:
0 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 3 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 2 3 0 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 0 3 1 2 0 0 1 1 1 0 1 1 0 1 0 1 2 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 2 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 2 0 5 0 0 2 2 1 0 ...
result:
ok 1000 numbers
Test #52:
score: 0
Accepted
time: 17ms
memory: 3916kb
input:
1000 7 9523794 66666681 47619061 71428503 19047592 9523722 14285756 38095245 33333242 28571445 61904858 90476273 52380888 14285773 42857211 61904685 52380909 9523794 76190475 52381048 23809615 52380984 19047624 33333289 4761912 80952485 76190382 61904709 42857049 90476233 66666760 14285659 23809471 ...
output:
2 0 0 1 0 0 0 0 0 0 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 2 1 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 ...
result:
ok 1000 numbers
Test #53:
score: 0
Accepted
time: 18ms
memory: 3764kb
input:
1000 7 49019600 54901952 60784304 54901952 64705872 43137248 98039200 72549008 19607840 96078416 86274496 98039200 50980384 21568624 52941168 60784304 41176464 9803920 96078416 92156848 94117632 41176464 47058816 11764704 25490192 35294112 7843136 45098032 47058816 62745088 64705872 52941168 2352940...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
result:
ok 1000 numbers
Test #54:
score: 0
Accepted
time: 24ms
memory: 3864kb
input:
1000 7 80392144 37254895 54901953 68627440 54901953 86274497 45098032 11764703 21568623 74509792 78431359 39215680 31372544 74509791 86274495 45098031 74509793 1960783 33333327 78431360 17647055 13725488 47058815 17647056 62745087 94117633 37254897 62745088 21568624 1960783 70588223 43137248 1960784...
output:
5 3 4 3 4 3 4 5 3 4 5 4 5 2 4 3 5 -1 -1 3 4 2 6 3 5 6 4 3 -1 3 6 5 3 4 5 4 -1 3 2 6 3 4 3 3 4 4 3 4 4 3 3 5 -1 3 4 4 5 4 4 3 7 4 3 4 4 3 4 3 3 5 5 4 4 3 2 -1 3 3 4 5 4 5 3 -1 4 5 5 3 3 6 3 5 5 3 5 2 -1 -1 5 -1 4 6 4 3 6 4 3 6 4 3 4 6 3 2 5 4 2 3 5 4 -1 4 5 2 5 3 4 6 3 3 -1 5 6 4 4 -1 3 5 -1 5 -1 3 4...
result:
ok 1000 numbers
Test #55:
score: 0
Accepted
time: 23ms
memory: 4008kb
input:
1000 7 5882351 96078416 33333329 80392145 39215682 41176464 98039199 58823519 88235279 70588222 72549007 84313710 9803922 5882354 90196064 29411759 35294112 82352927 45098030 72549008 56862737 68627441 47058816 15686274 1960786 54901950 60784305 96078414 13725487 25490194 92156848 11764705 84313710 ...
output:
1 3 2 3 2 2 2 3 3 2 2 3 2 1 4 3 4 4 4 -1 1 3 2 3 2 5 2 1 4 2 2 1 2 3 3 3 5 4 2 4 2 2 3 2 2 3 3 5 2 1 4 2 3 2 3 -1 4 3 3 3 2 5 2 4 2 3 2 2 4 2 2 2 3 1 2 2 5 3 5 2 3 4 1 3 3 2 2 4 1 2 5 2 3 1 2 3 1 2 2 6 5 4 1 5 2 -1 2 5 2 2 3 5 4 4 3 3 3 3 4 4 3 1 3 1 2 1 3 3 2 3 6 1 3 0 6 5 3 3 3 4 1 -1 4 3 1 1 3 3 ...
result:
ok 1000 numbers
Test #56:
score: 0
Accepted
time: 18ms
memory: 3780kb
input:
1000 7 92156850 39215678 25490192 3921569 19607836 56862735 84313708 1960788 52941171 7843139 43137247 94117629 37254901 19607843 54901951 82352925 56862741 15686276 37254895 64705869 41176459 70588226 41176469 23529404 5882348 49019597 49019599 58823516 64705871 92156845 43137253 70588228 50980388 ...
output:
2 3 2 2 3 3 3 4 3 3 2 2 1 1 2 3 2 3 2 1 2 1 1 1 2 2 2 2 1 1 1 3 1 0 1 2 1 1 2 1 2 1 1 1 3 1 2 1 2 2 3 1 1 3 1 1 1 1 2 4 2 3 2 1 1 2 1 1 1 2 3 0 2 1 0 2 2 3 2 3 2 1 2 1 1 0 2 0 0 1 1 0 0 1 0 0 2 2 2 1 1 1 2 1 2 1 3 1 2 2 1 1 2 2 2 1 2 2 1 2 2 2 3 1 2 1 2 2 1 1 0 1 3 0 2 2 3 2 3 3 0 2 1 1 2 1 3 2 1 3 ...
result:
ok 1000 numbers
Test #57:
score: 0
Accepted
time: 23ms
memory: 3784kb
input:
1000 7 45098025 78431365 29411760 92156855 94117629 1960774 29411758 29411769 7843135 72549004 5882352 92156854 56862732 41176460 66666654 39215687 19607848 5882361 88235283 76470573 86274495 45098042 43137239 9803916 60784299 52941172 56862729 68627439 5882344 94117623 45098023 11764713 98039195 19...
output:
0 2 2 1 2 1 1 1 1 2 1 1 2 1 0 1 2 2 0 0 0 2 0 1 1 1 1 1 0 0 0 1 2 1 1 1 0 0 1 1 0 2 0 0 1 2 1 1 1 1 1 3 3 1 1 1 0 1 2 1 1 0 1 0 1 2 1 3 1 2 0 0 1 0 1 1 1 2 0 2 0 0 1 0 1 0 1 0 1 2 1 0 1 1 1 3 1 1 1 0 1 1 2 1 1 1 1 1 0 1 0 0 0 1 0 1 0 2 1 0 4 0 1 0 0 0 1 1 2 2 1 2 1 0 1 1 1 1 4 0 0 1 2 2 0 0 0 1 2 0 ...
result:
ok 1000 numbers
Test #58:
score: 0
Accepted
time: 22ms
memory: 3840kb
input:
1000 7 50980378 15686287 25490182 54901956 49019587 17647036 60784314 47058806 68627457 82352917 11764686 39215668 80392151 78431340 86274493 29411779 70588211 94117645 7843129 11764706 7843130 23529411 92156855 41176481 5882367 45098033 3921553 96078433 35294106 64705862 47058810 76470570 74509790 ...
output:
0 1 0 1 1 0 0 0 1 0 1 1 0 0 2 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 2 0 0 1 1 1 1 0 0 1 1 2 0 1 1 0 0 0 1 0 0 1 0 2 1 0 1 0 2 1 1 0 2 1 0 1 1 0 3 1 0 1 1 0 1 0 1 1 0 2 1 1 0 1 0 1 1 0 3 0 1 1 0 -1 2 1 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 1 2 0 2 1 0 1 5 0 2 0 0 2 1 1 0 1 2 1...
result:
ok 1000 numbers
Test #59:
score: 0
Accepted
time: 22ms
memory: 3788kb
input:
1000 7 80198019 71287128 38613861 21782178 79207920 6930693 56435643 14851485 59405940 79207920 42574257 63366336 89108910 990099 79207920 58415841 74257425 40594059 38613861 79207920 22772277 34653465 76237623 44554455 16831683 81188118 52475247 77227722 67326732 4950495 61386138 60396039 57425742 ...
output:
7 -1 7 -1 5 -1 -1 5 6 6 -1 -1 7 -1 7 -1 -1 6 -1 -1 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 7 -1 7 -1 6 -1 6 -1 7 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 6 -1 7 4 -1 -1 -1 -1 6 6 -1 7 -1 7 7 -1 -1 -1 -1 7 -1 -1 -1 6 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 -1 -1 6 -1 -1 -1 -1 -1 -1 -1 -1 6 -1 5 -1 -1 -1...
result:
ok 1000 numbers
Test #60:
score: 0
Accepted
time: 22ms
memory: 3788kb
input:
1000 7 96039603 55445543 36633662 24752476 25742573 36633664 34653465 38613862 48514852 23762376 42574256 33663366 79207919 23762375 35643565 46534652 41584159 78217822 44554456 22772276 34653465 16831684 68316831 43564355 84158415 7920793 18811880 36633664 55445543 11881187 72277226 48514850 594059...
output:
3 1 3 2 2 2 1 4 2 2 2 1 3 3 3 1 4 2 4 3 3 -1 2 4 2 3 2 3 4 5 3 3 1 4 2 3 -1 4 2 1 2 2 3 1 2 1 3 2 -1 2 2 1 4 3 4 2 1 4 3 4 2 3 2 2 4 3 2 4 1 2 1 3 2 2 1 3 2 -1 3 2 4 3 3 4 0 4 2 3 3 2 1 3 0 2 4 3 4 1 1 2 2 -1 2 3 4 3 4 2 2 3 2 2 4 3 2 1 3 4 3 4 3 2 4 3 3 2 1 2 3 3 1 3 3 2 1 3 2 2 5 4 3 1 3 3 3 1 1 3...
result:
ok 1000 numbers
Test #61:
score: 0
Accepted
time: 18ms
memory: 3860kb
input:
1000 7 12871285 46534651 33663365 22772276 74257426 51485146 11881188 61386136 45544554 66336633 31683170 2970298 64356433 46534653 94059407 38613859 21782179 23762375 66336635 69306932 49504952 98019799 76237623 46534651 57425744 40594061 80198020 99009900 50495050 35643564 83168318 44554456 455445...
output:
1 2 4 2 1 1 2 2 1 1 3 2 1 2 2 0 1 2 2 -1 2 2 1 3 4 1 1 2 3 2 4 1 1 2 2 1 1 2 3 2 4 2 2 1 2 1 2 3 2 3 3 3 3 2 2 2 1 3 2 2 1 1 1 1 3 3 1 0 2 2 2 2 1 1 1 2 3 3 0 2 1 3 0 2 2 2 1 3 1 4 1 1 1 3 1 3 3 1 0 3 2 0 1 2 2 1 3 2 -1 2 3 3 2 2 3 4 1 4 1 2 1 1 1 3 0 1 1 1 2 1 1 1 3 1 1 1 2 3 2 3 1 1 1 2 3 -1 4 2 1...
result:
ok 1000 numbers
Test #62:
score: 0
Accepted
time: 24ms
memory: 3788kb
input:
1000 7 56435647 5940597 29702969 41584160 11881189 21782177 54455443 36633659 30693067 92079212 24752476 3960399 32673272 95049508 69306930 22772272 36633668 51485150 97029698 7920795 95049500 45544549 72277222 58415844 64356436 37623757 65346531 85148512 22772274 70297032 5940592 19801981 70297031 ...
output:
1 1 1 1 0 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 -1 2 1 1 1 1 1 2 1 0 2 0 0 0 2 2 0 1 2 2 1 1 4 1 2 1 2 1 2 0 1 0 0 1 1 0 2 0 3 1 1 0 1 2 3 1 0 1 0 0 1 0 1 1 2 1 2 3 1 2 1 1 2 1 2 1 0 1 2 2 0 0 1 1 0 1 0 0 0 1 0 2 0 1 0 0 0 2 1 2 0 1 2 1 1 2 2 0 2 0 0 1 1 0 1 0 0 1 1 0 0 2 1 2 1 1 0 3 1 0 2 1 2 1 0 1 1 0 1...
result:
ok 1000 numbers
Test #63:
score: 0
Accepted
time: 24ms
memory: 3848kb
input:
1000 7 65346539 25742584 13861389 34653465 68316827 10891090 39603965 68316829 51485144 52475242 55445545 98019807 7920797 9900993 30693078 92079216 65346541 24752472 93069301 84158419 29702962 31683164 74257430 78217828 58415843 4950485 38613871 32673276 87128719 34653461 8910894 42574256 2970301 5...
output:
0 0 1 0 0 0 0 0 1 0 1 0 1 0 2 2 1 0 2 2 0 1 0 0 1 1 0 0 1 2 1 0 0 0 1 1 0 0 1 3 0 1 0 0 1 1 2 0 0 0 0 1 1 1 1 1 1 2 1 0 0 0 1 0 0 2 0 0 1 0 0 0 1 1 0 0 2 1 1 1 0 0 1 0 1 2 1 1 0 0 0 0 0 0 0 0 1 1 1 0 2 0 0 0 0 0 0 0 0 1 0 2 0 1 1 0 0 1 0 0 0 0 1 1 1 2 -1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1...
result:
ok 1000 numbers
Test #64:
score: 0
Accepted
time: 22ms
memory: 3848kb
input:
1000 7 18811881 35643545 58415826 66336640 95049499 68316821 5940576 27722774 82178199 54455465 20792079 34653483 20792090 65346530 94059419 38613867 94059405 23762387 61386128 9900991 90099027 11881199 45544559 40594074 83168297 49504964 60396046 96039601 52475263 11881200 63366323 26732672 4554455...
output:
0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 2 0 0 0 0 1 0 1 1 0 0 1 2 0 0 0 1 0 1 1 0 0 0 2 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 4 0 1 1 2 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 2 0 1 0 0 0 0 0 1 8 1 0 0 0 0 0 0 0 0 0 0 1 0 0 ...
result:
ok 1000 numbers
Test #65:
score: 0
Accepted
time: 21ms
memory: 3816kb
input:
1000 7 16417896 59701440 37313400 79601920 40795984 10945264 79601920 99004888 78606896 34328328 19900480 11442776 82586992 47263640 82089480 84577040 81591968 5970144 15920384 96019816 51741248 34328328 72139240 34328328 73134264 49751200 56716368 79104408 2985072 96019816 5472632 3980096 4975120 2...
output:
-1 5 6 3 5 3 6 4 7 -1 -1 4 -1 3 -1 -1 6 4 5 4 5 -1 3 6 5 4 6 5 4 6 6 3 -1 5 4 6 5 6 6 3 -1 4 -1 6 5 -1 6 6 4 6 5 4 -1 5 -1 3 4 6 5 5 -1 5 6 6 -1 3 4 3 4 5 3 6 -1 5 6 6 6 4 7 -1 4 4 5 5 -1 -1 5 -1 4 -1 4 5 4 6 4 4 6 4 5 -1 4 -1 5 -1 6 6 6 4 6 5 5 5 5 4 4 6 4 6 4 4 -1 5 -1 4 6 3 5 4 7 5 6 4 5 5 7 6 4 ...
result:
ok 1000 numbers
Test #66:
score: 0
Accepted
time: 22ms
memory: 4072kb
input:
1000 7 23880575 55223831 38308425 32835791 61193977 73631775 20397993 60696464 23383065 3980095 68159144 46268617 27860672 56716368 60198952 34825841 21890529 26368136 74626800 73631775 59203929 27363159 70149191 85572065 59701441 14427849 37313400 60696465 497513 2487561 58706416 49751201 28855696 ...
output:
1 3 4 3 1 2 1 2 3 3 2 1 1 2 1 3 2 1 2 3 1 -1 2 2 2 1 2 1 1 2 1 2 2 1 2 2 0 1 1 1 2 1 1 2 1 1 2 2 2 1 2 2 1 1 1 1 3 3 0 2 2 2 0 3 3 1 1 3 1 1 2 1 2 0 3 1 1 1 3 1 2 3 0 3 3 1 0 2 -1 2 2 2 1 1 0 2 2 2 2 2 1 2 3 1 1 2 2 2 2 3 2 3 2 1 2 1 1 2 2 2 1 0 1 2 1 2 2 2 2 4 2 2 2 1 1 2 0 0 2 2 1 1 1 1 1 1 1 2 2 ...
result:
ok 1000 numbers
Test #67:
score: 0
Accepted
time: 22ms
memory: 3772kb
input:
1000 7 31840766 99004887 86567090 34328330 38308423 32835791 8955216 22885554 71144218 73631774 16417896 80596946 72139238 14427850 93532256 80596943 53233786 46766126 77611872 47761153 67164121 16417896 68159145 37313399 93532255 83084502 66169097 90049674 94029770 55721345 64179047 95024790 965173...
output:
1 1 1 1 1 1 1 1 0 1 1 1 1 0 2 0 0 2 0 0 1 0 1 1 1 3 2 1 1 2 1 0 2 1 1 0 1 0 2 8 3 0 1 1 1 1 2 0 1 2 1 2 2 0 1 0 1 2 1 0 2 0 1 3 1 0 1 1 1 2 1 0 1 1 2 1 2 0 2 1 0 1 1 1 2 1 2 1 1 1 2 1 2 1 1 1 0 0 2 1 2 1 1 0 2 0 1 1 1 1 0 0 1 2 2 0 0 1 2 0 1 2 1 0 0 3 1 1 2 0 0 0 3 0 1 1 1 2 3 1 1 2 1 1 1 3 1 2 2 1 ...
result:
ok 1000 numbers
Test #68:
score: 0
Accepted
time: 22ms
memory: 3788kb
input:
1000 7 3980098 30845745 32835797 93532251 4477604 18407939 30348228 56218857 12437801 86567086 9452724 85074555 54228811 90547183 79104411 19402968 64676560 8955221 50746221 16417892 38308428 87562114 18905455 39303448 97014840 29850721 13432823 78606901 36318381 77114359 76616843 85074550 13432827 ...
output:
1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 2 0 1 0 1 0 0 1 0 2 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 2 0 0 0 0 2 1 0 0 1 1 0 1 1 2 1 1 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 2 0 0 0 2 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 0 ...
result:
ok 1000 numbers
Test #69:
score: 0
Accepted
time: 19ms
memory: 3832kb
input:
1000 7 65174077 93532260 49253698 30348240 49253694 49253692 62188997 40298475 39800957 19900480 21890528 85572057 92039717 9950247 47761142 30845741 71641733 51741245 89054656 7960194 26865640 62686503 57711388 46268608 21890537 94029773 11442784 81591971 85074560 23880585 32835785 26865638 8109444...
output:
0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 0 1 1 5 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 ...
result:
ok 1000 numbers
Test #70:
score: 0
Accepted
time: 18ms
memory: 3824kb
input:
1000 7 93014066 65668729 36726584 14371272 66866335 20159701 50299452 8383242 80439203 67664739 68063941 41517008 96207682 72455163 41517008 91816460 69660749 82036011 97604889 75249577 95409278 5588828 67664739 91417258 41916210 17165686 63473118 94012071 51297457 72455163 17964090 23552918 3992020...
output:
3 3 4 3 1 1 4 1 3 3 1 3 3 2 2 4 3 4 4 1 2 2 4 3 2 2 4 1 2 5 2 2 4 3 2 3 3 3 2 2 1 3 3 3 4 3 3 4 3 2 4 3 3 3 2 1 3 4 3 5 1 2 2 2 4 3 3 4 3 3 3 3 1 2 2 2 3 4 3 2 3 3 3 2 1 3 3 1 2 3 4 3 2 2 4 4 2 4 4 4 3 3 1 4 3 3 3 3 3 1 4 2 2 4 2 2 4 3 -1 1 4 3 4 5 4 5 2 3 3 5 5 3 3 1 4 3 3 2 3 2 2 2 2 5 1 3 3 4 3 3...
result:
ok 1000 numbers
Test #71:
score: 0
Accepted
time: 22ms
memory: 3844kb
input:
1000 7 15568879 82435212 16367281 15568877 35129777 83632819 26546934 72854365 78043990 97006087 28942144 36327382 94012071 16367283 52495064 90219652 25748529 71057957 59680700 4990024 97804490 1996011 86826434 51297457 74051970 83034016 95808481 5189627 70459154 75648778 20159700 82634815 29740549...
output:
1 1 0 0 1 0 0 0 1 1 0 0 2 1 0 0 0 0 1 1 2 1 0 1 7 0 1 1 2 0 0 1 0 1 1 0 2 2 1 2 0 0 1 1 1 1 1 2 0 0 0 1 1 1 0 2 1 0 0 1 1 0 2 2 0 2 0 1 1 0 1 1 0 3 1 0 0 0 1 2 1 0 1 1 0 1 1 0 2 1 1 1 1 0 0 1 0 2 0 0 2 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 -1 1 0 0 0 0 2 1 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 2 1 0 1 0 1 1 1...
result:
ok 1000 numbers
Test #72:
score: 0
Accepted
time: 23ms
memory: 3776kb
input:
1000 7 99201696 60678703 95608877 16766483 5988032 8982044 61876310 37724588 96606882 44910226 46706635 49301448 32734566 19361296 63672720 88622846 79241595 60279501 83433216 34331373 40918206 98203694 67664737 51896261 67864340 51297455 48902244 56886283 48702642 37924191 22355312 39321395 1696608...
output:
0 1 1 0 0 0 0 1 1 1 2 0 0 0 1 0 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 2 0 2 2 0 1 2 1 1 0 0 1 0 1 0 0 0 0 1 1 0 0 7 0 2 1 0 0 0 1 1 1 1 1 2 1 0 1 0 0 1 3 0 1 0 2 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 3 0 0 2 1 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 -1 0 0 0 0 2 0 1 2 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 2 1...
result:
ok 1000 numbers
Test #73:
score: 0
Accepted
time: 22ms
memory: 3900kb
input:
1000 7 83516400 63236700 49850100 86013900 83116800 93206700 8091900 13586400 93306600 13686300 79520400 97502400 66733200 6393600 78721200 50949000 47652300 77522400 12287700 37162800 19280700 97102800 62537400 23276700 92807100 45254700 30569400 33466500 53346600 5094900 46653300 94305600 199800 7...
output:
2 1 2 -1 3 2 1 1 2 2 3 1 2 1 1 1 3 2 1 2 2 2 1 1 1 1 1 1 2 1 2 2 1 4 2 3 3 3 2 1 2 1 1 0 2 0 1 3 1 2 0 3 1 1 3 2 2 2 1 1 2 1 4 1 2 1 1 1 2 2 2 1 1 0 1 1 2 2 2 2 3 1 1 2 0 2 1 1 2 3 0 3 4 2 2 2 1 2 3 2 1 1 2 2 2 2 2 3 1 2 2 3 2 2 1 3 1 1 2 1 1 1 2 2 1 2 2 1 1 2 2 3 2 1 3 1 2 3 3 1 2 2 2 3 1 2 2 4 2 3...
result:
ok 1000 numbers
Test #74:
score: 0
Accepted
time: 22ms
memory: 4004kb
input:
1000 7 94605301 31967999 39560399 36663300 18581401 5894100 25774199 45953999 22977001 87612301 58741201 94904999 15684301 28271700 34265701 29870099 24375600 72127799 43256701 81418501 40759199 15884099 22177800 3196800 39760201 78221701 46753200 69730199 42557400 86213701 47752201 44255700 6413580...
output:
1 0 1 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 2 0 0 1 0 1 0 2 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 1 0 1 1 2 0 0 0 0 0 0 0 1 5 0 0 0 1 0 0 0 1 0 0 1 0 1 0 2 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 ...
result:
ok 1000 numbers
Test #75:
score: 0
Accepted
time: 18ms
memory: 3828kb
input:
1000 7 46653298 60739200 29370602 87212702 73026900 67232698 43456500 7892101 71828099 2397601 89210701 41158800 94205702 79720202 60239699 79020898 81918001 96203700 55044898 96103800 62237701 12887098 62537400 53446500 86513400 11188802 62837102 95604302 2197800 77722202 48851099 53446498 38561400...
output:
0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 3 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 2 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 5 1 0 0 2 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 ...
result:
ok 1000 numbers
Test #76:
score: 0
Accepted
time: 22ms
memory: 4076kb
input:
1000 7 85007475 42978500 62868550 11694150 65617175 33883050 26636675 43128425 16241875 17841075 37781100 34232875 94802575 29635175 96001975 34232875 48375800 96901525 3398300 44377800 61269350 36231875 86656650 92253850 22788600 42278850 83258350 56071950 26136925 48425775 33483250 149925 16591700...
output:
0 2 2 2 2 2 0 1 3 1 3 3 4 2 2 2 1 1 2 2 0 1 1 1 0 1 2 1 1 0 0 2 0 2 0 0 0 3 0 2 1 0 1 2 2 1 1 2 1 1 2 0 1 1 1 1 2 1 0 1 2 1 1 3 1 1 2 1 0 1 1 1 1 1 0 0 2 0 1 1 1 1 1 3 3 1 1 9 1 2 1 0 1 0 2 2 1 1 1 2 1 2 2 0 1 1 2 2 1 0 1 1 1 1 1 1 1 1 3 1 1 1 1 2 2 0 2 0 3 1 2 1 1 2 2 1 2 1 1 1 1 1 1 0 1 2 2 0 1 1 ...
result:
ok 1000 numbers
Test #77:
score: 0
Accepted
time: 15ms
memory: 3848kb
input:
1000 7 61019475 72163901 92903525 36981499 7696149 40229875 85457250 59320326 81009476 39980000 12593700 32933525 84107925 55372301 58970499 73613176 36781599 23838074 54072949 51724125 22088950 60319825 31334326 7846075 46226875 34382801 81759099 59420276 35532224 89005474 34082950 39930026 8895549...
output:
0 1 0 0 0 0 0 1 0 0 2 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 2 0 0 2 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 4 0 1 0 0 0 2 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 6 0 0 0 0 0 0 0 0 2 ...
result:
ok 1000 numbers
Extra Test:
score: 0
Extra Test Passed