QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#539798 | #8940. Piggy Sort | ucup-team087# | AC ✓ | 38ms | 11028kb | C++20 | 18.7kb | 2024-08-31 15:42:22 | 2024-08-31 15:42:22 |
Judging History
answer
#ifndef LOCAL
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#endif
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define int ll
bool dbg=false;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define pb push_back
#define eb emplace_back
#define a first
#define b second
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed
#define si(x) int(x.size())
#ifdef LOCAL
#define dmp(x) cerr<<__LINE__<<" "<<#x<<" "<<x<<endl
#else
#define dmp(x) void(0)
#endif
template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b;return true;}else return false;}
template<class t,class u> bool chmin(t&a,u b){if(b<a){a=b;return true;}else return false;}
template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;
using pi=pair<int,int>;
using vi=vc<int>;
using vvi=vc<vc<int>>;
template<class t,class u>
ostream& operator<<(ostream& os,const pair<t,u>& p){
return os<<"{"<<p.a<<","<<p.b<<"}";
}
template<class t> ostream& operator<<(ostream& os,const vc<t>& v){
os<<"{";
for(auto e:v)os<<e<<",";
return os<<"}";
}
#define mp make_pair
#define mt make_tuple
#define one(x) memset(x,-1,sizeof(x))
#define zero(x) memset(x,0,sizeof(x))
#ifdef LOCAL
void dmpr(ostream&os){os<<endl;}
template<class T,class... Args>
void dmpr(ostream&os,const T&t,const Args&... args){
os<<t<<" ";
dmpr(os,args...);
}
#define dmp2(...) dmpr(cerr,__LINE__,##__VA_ARGS__)
#else
#define dmp2(...) void(0)
#endif
using uint=unsigned;
using ull=unsigned long long;
template<class t,size_t n>
ostream& operator<<(ostream&os,const array<t,n>&a){
return os<<vc<t>(all(a));
}
ll rand_int(ll l, ll r) { //[l, r]
//#ifdef LOCAL
static mt19937_64 gen;
/*#else
static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
#endif*/
return uniform_int_distribution<ll>(l, r)(gen);
}
ll rand_int(ll k){ //[0,k)
return rand_int(0,k-1);
}
string rand_string(int n,char lw,char up){
string s(n,'?');
rep(i,n)s[i]=rand_int(lw,up);
return s;
}
int current_run_id,run_batch_size=1000;
int calc_random_limit(){
return current_run_id/run_batch_size+1;
}
template<class t>
void generate_single(t&a){
a=rand_int(1,calc_random_limit());
}
void generate_single(string&a){
int n;generate_single(n);
a=rand_string(n,'a','b');
}
template<class t,class u>
void generate_single(pair<t,u>&a){
generate_single(a.a);
generate_single(a.b);
}
//https://trap.jp/post/1224/
template<class... Args>
void input(Args&... a){
if(dbg){
(generate_single(a),...);
}else{
(cin >> ... >> a);
}
}
#define INT(...) int __VA_ARGS__;input(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;input(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;input(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;input(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;input(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;input(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;input(__VA_ARGS__)
#define overload3(a,b,c,d,...) d
#define VI2(name,size) vi name(size);rep(i_##name,size)input(name[i_##name]);
#define VI3(name,size,offset) vi name(size);rep(i_##name,size)input(name[i_##name]),name[i_##name]+=offset;
#define VI(...) overload3(__VA_ARGS__,VI3,VI2)(__VA_ARGS__)
#define VPI(name,size) vc<pi> name(size);rep(i_##name,size)input(name[i_##name]);
#define VVI(name,sizeN,sizeM) vvi name(sizeN,vi(sizeM));\
rep(i_##name,sizeN)rep(j_##name,sizeM)input(name[i_##name][j_##name]);
#define VS(name,size) vc<string> name(size);rep(i_##name,size)input(name[i_##name]);
#define overload5(a,b,c,d,e,f,...) f
#define VVC4(type,name,sizeN,sizeM) vvc<type> name(sizeN,vc<type>(sizeM));
#define VVC5(type,name,sizeN,sizeM,ini) vvc<type> name(sizeN,vc<type>(sizeM,ini));
#define VVC(...) overload5(__VA_ARGS__,VVC5,VVC4)(__VA_ARGS__)
template<class T>
T vvvc(T v){
return v;
}
template<class T,class...Args>
auto vvvc(int n,T v,Args...args){
return vector(n,vvvc(v,args...));
}
template<int i,class T>
void print_tuple(ostream&,const T&){
}
template<int i,class T,class H,class ...Args>
void print_tuple(ostream&os,const T&t){
if(i)os<<",";
os<<get<i>(t);
print_tuple<i+1,T,Args...>(os,t);
}
template<class ...Args>
ostream& operator<<(ostream&os,const tuple<Args...>&t){
os<<"{";
print_tuple<0,tuple<Args...>,Args...>(os,t);
return os<<"}";
}
ll read(){
ll i;
cin>>i;
return i;
}
vi readvi(int n,int off=0){
vi v(n);
rep(i,n)v[i]=read()+off;
return v;
}
pi readpi(int off=0){
int a,b;cin>>a>>b;
return pi(a+off,b+off);
}
void printsuc(int suc){
if(suc==1){
if(dbg)cout<<endl;
else{
#ifdef LOCAL
cout<<endl;
#else
cout<<"\n";
#endif
}
}
if(suc==2)
cout<<" ";
}
template<class t>
void print_single(t x,int suc=1){
cout<<x;
printsuc(suc);
}
template<class t,class u>
void print_single(const pair<t,u>&p,int suc=1){
print_single(p.a,2);
print_single(p.b,suc);
}
template<class T>
void print_single(const vector<T>&v,int suc=1){
rep(i,v.size())
print_single(v[i],i==int(v.size())-1?3:2);
printsuc(suc);
}
template<class T,size_t N>
void print_single(const array<T,N>&v,int suc=1){
rep(i,N)
print_single(v[i],i==int(N)-1?3:2);
printsuc(suc);
}
template<class T>
void print(const T&t){
print_single(t);
}
template<class T,class ...Args>
void print(const T&t,const Args&...args){
print_single(t,2);
print(args...);
}
template<class T>
void printvv(const vvc<T>&vs){
for(const auto&row:vs)print(row);
}
string readString(){
string s;
cin>>s;
return s;
}
template<class T>
T sq(const T& t){
return t*t;
}
void YES(bool ex=true){
cout<<"YES\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void NO(bool ex=true){
cout<<"NO\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void Yes(bool ex=true){
cout<<"Yes\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void No(bool ex=true){
cout<<"No\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
//#define CAPITAL
/*
void yes(bool ex=true){
#ifdef CAPITAL
cout<<"YES"<<"\n";
#else
cout<<"Yes"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void no(bool ex=true){
#ifdef CAPITAL
cout<<"NO"<<"\n";
#else
cout<<"No"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}*/
void possible(bool ex=true){
#ifdef CAPITAL
cout<<"POSSIBLE"<<"\n";
#else
cout<<"Possible"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void impossible(bool ex=true){
#ifdef CAPITAL
cout<<"IMPOSSIBLE"<<"\n";
#else
cout<<"Impossible"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
constexpr ll ten(int n){
return n==0?1:ten(n-1)*10;
}
const ll infLL=LLONG_MAX/3;
#ifdef int
const int inf=infLL;
#else
const int inf=INT_MAX/2-100;
#endif
int topbit(signed t){
return t==0?-1:31-__builtin_clz(t);
}
int topbit(ll t){
return t==0?-1:63-__builtin_clzll(t);
}
int topbit(ull t){
return t==0?-1:63-__builtin_clzll(t);
}
int botbit(signed a){
return a==0?32:__builtin_ctz(a);
}
int botbit(ll a){
return a==0?64:__builtin_ctzll(a);
}
int botbit(ull a){
return a==0?64:__builtin_ctzll(a);
}
int popcount(signed t){
return __builtin_popcount(t);
}
int popcount(ll t){
return __builtin_popcountll(t);
}
int popcount(ull t){
return __builtin_popcountll(t);
}
int bitparity(ll t){
return __builtin_parityll(t);
}
bool ispow2(int i){
return i&&(i&-i)==i;
}
ll mask(int i){
return (ll(1)<<i)-1;
}
ull umask(int i){
return (ull(1)<<i)-1;
}
ll minp2(ll n){
if(n<=1)return 1;
else return ll(1)<<(topbit(n-1)+1);
}
bool inc(int a,int b,int c){
return a<=b&&b<=c;
}
template<class S> void mkuni(S&v){
sort(all(v));
v.erase(unique(all(v)),v.ed);
}
template<class t> bool isuni(vc<t> v){
int s=si(v);
mkuni(v);
return si(v)==s;
}
template<class t>
void myshuffle(vc<t>&a){
rep(i,si(a))swap(a[i],a[rand_int(0,i)]);
}
template<class S,class u>
int lwb(const S&v,const u&a){
return lower_bound(all(v),a)-v.bg;
}
template<class t,class u>
bool bis(const vc<t>&v,const u&a){
return binary_search(all(v),a);
}
//VERIFY: yosupo
//KUPC2017J
//AOJDSL1A
//without rank
struct unionfind{
vi p,s;
int c;
unionfind(int n):p(n,-1),s(n,1),c(n){}
void clear(){
fill(all(p),-1);
fill(all(s),1);
c=si(p);
}
int find(int a){
return p[a]==-1?a:(p[a]=find(p[a]));
}
//set b to a child of a
bool unite(int a,int b){
a=find(a);
b=find(b);
if(a==b)return false;
p[b]=a;
s[a]+=s[b];
c--;
return true;
}
bool same(int a,int b){
return find(a)==find(b);
}
int sz(int a){
return s[find(a)];
}
};
vvc<int> readGraph(int n,int m){
vvc<int> g(n);
rep(i,m){
int a,b;
cin>>a>>b;
//sc.read(a,b);
a--;b--;
g[a].pb(b);
g[b].pb(a);
}
return g;
}
vvc<int> rand_tree(int n){
vvc<int> t(n);
unionfind uf(n);
while(uf.c>1){
int a=rand_int(n);
int b=rand_int(n);
if(uf.unite(a,b)){
t[a].pb(b);
t[b].pb(a);
}
}
return t;
}
vvc<int> readTree(int n){
if(dbg){
return rand_tree(n);
}else{
return readGraph(n,n-1);
}
}
void printTree(const vvc<int> t){
int n=si(t);
int degsum=0;
rep(i,n)degsum+=si(t[i]);
if(degsum==n-1){
//directed
rep(i,si(t))for(auto j:t[i]){
print(i+1,j+1);
}
}else if(degsum==2*(n-1)){
//undirected
rep(i,si(t))for(auto j:t[i])if(i<j){
print(i+1,j+1);
}
}else{
assert(false);
}
}
template<class t>
vc<t> presum(const vc<t>&a){
vc<t> s(si(a)+1);
rep(i,si(a))s[i+1]=s[i]+a[i];
return s;
}
vc<ll> presum(const vi&a){
vc<ll> s(si(a)+1);
rep(i,si(a))s[i+1]=s[i]+a[i];
return s;
}
//BIT で数列を管理するときに使う (CF850C)
template<class t>
vc<t> predif(vc<t> a){
gnr(i,1,si(a))a[i]-=a[i-1];
return a;
}
template<class t>
vvc<ll> imos(const vvc<t>&a){
int n=si(a),m=si(a[0]);
vvc<ll> b(n+1,vc<ll>(m+1));
rep(i,n)rep(j,m)
b[i+1][j+1]=b[i+1][j]+b[i][j+1]-b[i][j]+a[i][j];
return b;
}
//verify してないや
void transvvc(int&n,int&m){
swap(n,m);
}
template<class t,class... Args>
void transvvc(int&n,int&m,vvc<t>&a,Args&...args){
assert(si(a)==n);
vvc<t> b(m,vi(n));
rep(i,n){
assert(si(a[i])==m);
rep(j,m)b[j][i]=a[i][j];
}
a.swap(b);
transvvc(n,m,args...);
}
//CF854E
void rotvvc(int&n,int&m){
swap(n,m);
}
template<class t,class... Args>
void rotvvc(int&n,int&m,vvc<t>&a,Args&...args){
assert(si(a)==n);
vvc<t> b(m,vi(n));
rep(i,n){
assert(si(a[i])==m);
rep(j,m)b[m-1-j][i]=a[i][j];
}
a.swap(b);
rotvvc(n,m,args...);
}
//ソートして i 番目が idx[i]
//CF850C
template<class t>
vi sortidx(const vc<t>&a){
int n=si(a);
vi idx(n);iota(all(idx),0);
sort(all(idx),[&](int i,int j){return a[i]<a[j];});
return idx;
}
//vs[i]=a[idx[i]]
//例えば sortidx で得た idx を使えば単にソート列になって返ってくる
//CF850C
template<class t>
vc<t> a_idx(const vc<t>&a,const vi&idx){
int n=si(a);
assert(si(idx)==n);
vc<t> vs(n);
rep(i,n)vs[i]=a[idx[i]];
return vs;
}
//CF850C
vi invperm(const vi&p){
int n=si(p);
vi q(n);
rep(i,n)q[p[i]]=i;
return q;
}
template<class t,class s=t>
s SUM(const vc<t>&a){
return accumulate(all(a),s(0));
}
template<class t,size_t K,class s=t>
s SUM(const array<t,K>&a){
return accumulate(all(a),s(0));
}
template<class t>
t MAX(const vc<t>&a){
return *max_element(all(a));
}
template<class t>
pair<t,int> MAXi(const vc<t>&a){
auto itr=max_element(all(a));
return mp(*itr,itr-a.bg);
}
template<class A>
auto MIN(const A&a){
return *min_element(all(a));
}
template<class t>
pair<t,int> MINi(const vc<t>&a){
auto itr=min_element(all(a));
return mp(*itr,itr-a.bg);
}
vi vid(int n){
vi res(n);iota(all(res),0);
return res;
}
template<class S>
void soin(S&s){
sort(all(s));
}
template<class S,class F>
void soin(S&s,F&&f){
sort(all(s),forward<F>(f));
}
template<class S>
S soout(S s){
soin(s);
return s;
}
template<class S>
void rein(S&s){
reverse(all(s));
}
template<class S>
S reout(S s){
rein(s);
return s;
}
template<class t,class u>
pair<t,u>&operator+=(pair<t,u>&a,pair<t,u> b){
a.a+=b.a;a.b+=b.b;return a;}
template<class t,class u>
pair<t,u>&operator-=(pair<t,u>&a,pair<t,u> b){
a.a-=b.a;a.b-=b.b;return a;}
template<class t,class u>
pair<t,u> operator+(pair<t,u> a,pair<t,u> b){return mp(a.a+b.a,a.b+b.b);}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a,pair<t,u> b){return mp(a.a-b.a,a.b-b.b);}
template<class t,class u,class v>
pair<t,u>&operator*=(pair<t,u>&a,v b){
a.a*=b;a.b*=b;return a;}
template<class t,class u,class v>
pair<t,u> operator*(pair<t,u> a,v b){return a*=b;}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a){return mp(-a.a,-a.b);}
namespace std{
template<class t,class u>
istream&operator>>(istream&is,pair<t,u>&a){
return is>>a.a>>a.b;
}
}
template<class t>
t gpp(vc<t>&vs){
assert(si(vs));
t res=move(vs.back());
vs.pop_back();
return res;
}
template<class t,class u>
void pb(vc<t>&a,const vc<u>&b){
a.insert(a.ed,all(b));
}
template<class t,class...Args>
vc<t> cat(vc<t> a,Args&&...b){
(pb(a,forward<Args>(b)),...);
return a;
}
template<class t,class u>
vc<t>& operator+=(vc<t>&a,u x){
for(auto&v:a)v+=x;
return a;
}
template<class t,class u>
vc<t> operator+(vc<t> a,u x){
return a+=x;
}
template<class t>
vc<t>& operator+=(vc<t>&a,const vc<t>&b){
a.resize(max(si(a),si(b)));
rep(i,si(b))a[i]+=b[i];
return a;
}
template<class t>
vc<t> operator+(const vc<t>&a,const vc<t>&b){
vc<t> c(max(si(a),si(b)));
rep(i,si(a))c[i]+=a[i];
rep(i,si(b))c[i]+=b[i];
return c;
}
template<class t,class u>
vc<t>& operator-=(vc<t>&a,u x){
for(auto&v:a)v-=x;
return a;
}
template<class t,class u>
vc<t> operator-(vc<t> a,u x){
return a-=x;
}
template<class t,class u>
vc<t>& operator*=(vc<t>&a,u x){
for(auto&v:a)v*=x;
return a;
}
template<class t,class u>
vc<t> operator*(vc<t> a,u x){
return a*=x;
}
template<class t,class u>
vc<t>& operator/=(vc<t>&a,u x){
for(auto&v:a)v/=x;
return a;
}
template<class t,class u>
vc<t> operator/(vc<t> a,u x){
return a/=x;
}
template<class t>
vc<t>& operator<<=(vc<t>&a,int k){
assert(k>=0);
a.insert(a.bg,k,t(0));
return a;
}
template<class t>
vc<t> operator<<(vc<t> a,int k){
return a<<=k;
}
template<class t>
vc<t>& operator>>=(vc<t>&a,int k){
if(si(a)<=k)a.clear();
else a.erase(a.bg,a.bg+k);
return a;
}
template<class t>
vc<t> operator>>(vc<t> a,int k){
return a>>=k;
}
template<class t,class u>
void remval(vc<t>&a,const u&v){
a.erase(remove(all(a),v),a.ed);
}
//消した要素の個数を返してくれる
//UCUP 2-8-F
template<class t,class F>
int remif(vc<t>&a,F f){
auto itr=remove_if(all(a),f);
int res=a.ed-itr;
a.erase(itr,a.ed);
return res;
}
template<class VS,class u>
void fila(VS&vs,const u&a){
fill(all(vs),a);
}
template<class t,class u>
int findid(const vc<t>&vs,const u&a){
auto itr=find(all(vs),a);
if(itr==vs.ed)return -1;
else return itr-vs.bg;
}
template<class t>
void rtt(vc<t>&vs,int i){
rotate(vs.bg,vs.bg+i,vs.ed);
}
//Multiuni2023-8 C
//f(lw)=false,...,f(n-1)=false,f(n)=true,...,f(up)=true,
//のときに n を返す
template<class F>
int find_min_true(int lw,int up,F f){
while(up-lw>1){
const int mid=(lw+up)/2;
if(f(mid))up=mid;
else lw=mid;
}
return up;
}
//f(lw)=true,f(up)=false
template<class F>
int find_max_true(int lw,int up,F f){
while(up-lw>1){
const int mid=(lw+up)/2;
if(f(mid))lw=mid;
else up=mid;
}
return lw;
}
template<class t> using pqmin=priority_queue<t,vc<t>,greater<t>>;
template<class t> using pqmax=priority_queue<t>;
using T=tuple<int,int,int>;
template<class t>
struct BIT{
vc<t> raw,buf;
int s;
BIT(int n=0){init(n);}
BIT(const vc<t>&a){init(a);}
void init(int n){
s=n;
raw.clear();raw.resize(s);
buf.clear();buf.resize(s);
}
void init(const vc<t>&a){
s=si(a);
raw=a;
buf.resize(s);
rep(i,s)buf[i]=a[i];
rep(i,s){
int j=i+((i+1)&(-i-1));
if(j<s)buf[j]+=buf[i];
}
}
void add(int i,t v){
if(s<=i)return;
raw[i]+=v;
for(;i<s;i+=(i+1)&(-i-1))
buf[i]+=v;
}
t get(int i){
t res=t();
for(;i>=0;i-=(i+1)&(-i-1))
res+=buf[i];
return res;
}
t sum(int b,int e){
return get(e-1)-get(b-1);
}
void add_range(int b,int e,t v){
add(b,v);
add(e,-v);
}
int kth(int k){
int res=0;
for(int i=topbit(s);i>=0;i--){
int w=res+(1<<i);
if(w<=s&&buf[w-1]<=k){
k-=buf[w-1];
res=w;
}
}
return res;
}
//UCUP 2-9-I
int kth_helper(int i,int k){
return kth(k+get(i-1));
}
t operator[](int i)const{
return raw[i];
}
};
bool xcut(const pi&a,const pi&b,int x,int&dst){
//dmp2(a,b,x);
int num=a.b*(b.a-x)-b.b*(a.a-x);
int den=b.a-a.a;
if(num%den)return false;
dst=num/den;
//dmp(dst);
return true;
}
void slv(){
INT(n,m);
VVI(x,m,n);
{
vi ss(m);
rep(i,m)ss[i]=SUM(x[i]);
vi idx=sortidx(ss);
x=a_idx(x,idx);
}
vi ts(m);
rep(i,m)ts[i]=SUM(x[i]);
if(ts==vi(m,ts[0]))ts=vid(m);
dmp(x);
dmp(ts);
vi tilt(n);
vvc<int> vs(m);
vc<BIT<int>> cnt(m);
rep(i,m){
vs[i]=x[i];
mkuni(vs[i]);
cnt[i].init(si(vs[i]));
for(auto v:x[i])
cnt[i].add(lwb(vs[i],v),1);
}
rep(step,n){
vi zs(m);
rep(i,m){
int j=cnt[i].kth(0);
zs[i]=vs[i][j];
}
//dmp(zs);
vi tar(m);
bool done=false;
rep(i,m-1){
pi a(ts[i],zs[i]);
pi b(ts[i+1],zs[i+1]);
bool ok=true;
rep(j,m){
if(!xcut(a,b,ts[j],tar[j])){
ok=false;
break;
}
}
if(ok){
//dmp(tar);
rep(j,m){
int k=lwb(vs[j],tar[j]);
if(k<si(vs[j])&&vs[j][k]==tar[j]&&cnt[j].raw[k]){
}else{
ok=false;
break;
}
}
if(ok){
rep(j,m){
int k=lwb(vs[j],tar[j]);
cnt[j].add(k,-1);
}
done=true;
{
int from=lwb(vs[0],tar[0]);
tilt[from]=tar[m-1]-tar[0];
}
break;
}
}
}
assert(done);
}
dmp(tilt);
vi ans=vid(n);
stable_sort(all(ans),[&](int i,int j){return tilt[i]<tilt[j];});
print(invperm(ans)+1);
}
signed main(signed argc,char*argv[]){
if(argc>1&&strcmp(argv[1],"D")==0)dbg=true;
cin.tie(0);
ios::sync_with_stdio(0);
cout<<fixed<<setprecision(20);
if(dbg){
while(1){
if(current_run_id%run_batch_size==0){
cerr<<"Current Run "<<current_run_id<<endl;
}
slv();
current_run_id++;
}
}else{
int t;cin>>t;rep(_,t)
slv();
}
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
3 2 4 1 2 3 4 5 6 7 8 1 2 1 1 3 4 1 2 3 6 9 9 10 15 17 12 18 21
output:
1 2 1 3 1 2
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
41 1 2 -19 9531 2 3 11 13 3175 4759 2211 3313 10 19 -54 -25 -19 -18 -1 3 61 63 85 88 -54 753 863 2397 3111 4649 4671 4756 5507 7762 -54 369 479 1245 1575 2345 2367 2452 2819 3922 -54 553 663 1797 2311 3449 3471 3556 4107 5762 -54 87 197 399 447 653 675 760 845 1102 -54 320 430 1098 1379 2051 2073 21...
output:
1 1 2 1 2 6 10 5 7 9 4 3 8 8 7 5 9 2 1 6 3 4 1 6 5 9 8 2 3 10 4 7 3 5 10 6 7 4 9 8 2 1 4 3 1 8 2 5 6 7 3 1 5 2 6 9 8 7 4 10 2 3 1 4 3 2 9 1 4 6 7 5 8 1 5 2 6 7 3 4 8 9 9 8 5 7 2 3 4 6 1 1 2 4 8 5 7 10 6 9 3 7 1 3 2 9 8 10 4 5 6 7 8 1 2 5 6 3 9 4 8 1 2 7 6 9 3 5 4 8 1 2 4 5 10 9 3 6 7 6 4 1 8 7 9 10 ...
result:
ok 41 lines
Test #3:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
46 8 12 -50 -35 -20 -10 -9 4 13 91 -24 30 32 143 146 147 173 221 -44 -8 10 13 26 27 61 103 -46 -12 -3 8 14 15 45 99 -22 32 36 147 158 159 189 237 -47 -14 -11 7 8 9 37 97 -31 18 23 104 105 117 129 165 -45 -10 5 9 20 21 53 101 -36 8 18 74 75 77 119 125 -30 20 24 110 111 125 131 173 -48 -19 -16 2 3 6 2...
output:
1 7 3 5 6 2 8 4 1 2 3 3 6 1 5 10 8 7 2 9 4 2 5 3 6 9 10 8 7 1 4 1 4 5 2 6 3 7 8 6 4 5 7 9 2 3 1 6 7 2 8 9 1 10 3 5 4 4 5 1 3 2 1 2 1 2 4 5 7 6 3 8 9 6 3 4 9 7 1 2 8 10 5 1 6 7 8 4 9 5 3 2 1 4 2 6 5 8 3 7 2 1 5 1 7 6 3 2 4 7 3 8 4 1 2 9 5 6 10 6 1 2 5 3 4 2 1 3 4 7 8 5 9 2 1 4 3 6 7 8 9 3 5 4 1 6 2 1...
result:
ok 46 lines
Test #4:
score: 0
Accepted
time: 1ms
memory: 3900kb
input:
48 3 4 -4952 -1539 836 -4294 5909 12778 -4811 57 3395 -4529 3249 8513 8 11 -9107 -1143 1324 3936 4088 4381 7658 9440 -2753 531 6032 14986 18097 18264 20240 22022 -5224 -120 5276 9673 12692 12763 15347 17129 -2047 717 6248 16504 19621 19856 21638 23420 -6283 -399 4952 7396 10304 10477 13250 15032 -48...
output:
1 2 3 3 1 6 8 2 7 4 5 8 4 6 1 2 9 10 5 3 7 1 2 3 6 1 10 7 5 3 9 4 8 2 1 2 8 3 2 7 10 6 1 9 5 4 9 5 2 7 6 1 8 4 3 6 4 3 2 7 5 1 1 4 2 3 1 3 8 9 6 7 4 1 2 10 5 5 1 6 4 2 3 2 1 9 6 4 5 3 8 7 3 5 6 7 9 2 4 8 1 4 2 1 3 5 6 4 5 6 3 7 1 2 1 9 7 10 1 8 5 3 6 2 4 8 3 6 9 2 5 4 7 1 4 3 9 5 7 6 2 1 8 1 4 2 7 5...
result:
ok 48 lines
Test #5:
score: 0
Accepted
time: 1ms
memory: 3740kb
input:
40 10 20 -4289879 -3663596 -3442064 -3379220 -670906 -329052 1547135 1640345 2662172 3577480 -4280827 -3609576 -3374758 -3321039 -598417 -319197 1583489 1685532 2700424 3645662 -4276115 -3581456 -3339722 -3290753 -560683 -314067 1602413 1709054 2720336 3681154 -4271279 -3552596 -3303764 -3259670 -52...
output:
1 6 8 7 10 2 3 5 4 9 2 3 1 9 8 3 6 4 2 10 1 7 5 2 1 8 5 3 4 10 7 6 9 7 2 6 1 9 5 8 3 4 2 6 3 9 7 1 4 5 8 3 6 7 5 1 2 8 4 3 4 10 9 8 7 6 2 5 1 3 8 2 6 1 4 5 7 4 2 5 7 1 6 3 1 8 3 10 9 7 4 6 5 2 1 3 5 4 2 8 6 7 3 1 4 5 10 2 9 1 2 3 5 10 2 7 6 4 1 8 3 9 4 10 7 6 8 9 5 1 2 3 5 7 10 1 4 9 3 6 2 8 4 2 1 3...
result:
ok 40 lines
Test #6:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
79 5 7 -5 -1 7 8 10 -1 1 10 19 20 -1 4 10 25 26 -1 5 10 27 28 -2 -1 10 13 14 -4 -1 9 10 10 -1 3 10 23 24 5 6 -7 -5 2 3 5 2 3 11 13 14 -5 -3 2 3 6 2 3 7 9 12 2 3 3 5 10 2 3 5 7 11 3 4 -10 -7 -5 -10 1 3 -10 -4 -2 -10 0 2 5 10 -10 -6 -1 6 7 -10 4 7 9 11 -10 7 8 13 13 -10 7 14 16 19 -10 7 12 15 17 -10 6...
output:
3 1 4 5 2 4 5 1 2 3 1 2 3 1 4 5 3 2 3 2 1 1 3 4 5 1 2 3 4 1 5 2 1 4 2 5 3 2 3 4 5 1 2 3 1 1 1 3 4 5 2 1 3 2 4 5 5 2 1 3 4 1 3 4 5 2 2 1 3 4 5 1 4 2 3 5 4 1 2 3 1 4 2 3 1 1 3 4 5 2 1 3 4 2 1 2 3 1 1 2 3 4 5 2 1 3 4 5 1 2 1 2 3 5 4 1 2 3 2 5 1 3 4 1 2 4 3 5 1 2 1 3 4 5 1 2 3 4 1 5 1 3 4 2 5 3 1 2 2 1 ...
result:
ok 79 lines
Test #7:
score: 0
Accepted
time: 6ms
memory: 4416kb
input:
4 89 162 -98 -97 -94 -92 -91 -88 -82 -80 -77 -71 -70 -66 -64 -63 -62 -60 -56 -53 -48 -44 -43 -40 -37 -36 -34 -32 -31 -26 -25 -23 -21 -18 -17 -12 -11 -9 -8 -7 -4 -1 1 2 6 9 16 18 19 20 22 23 24 27 28 33 34 36 40 41 43 45 47 49 51 52 53 54 55 58 59 63 68 69 70 74 75 76 77 78 79 80 82 83 90 92 93 96 97...
output:
1 67 68 2 3 4 29 30 69 31 32 33 34 70 71 35 36 37 5 38 72 73 39 40 41 42 43 74 6 44 75 45 7 76 46 77 47 8 9 10 48 11 49 12 13 14 15 16 78 17 79 18 19 80 20 21 50 51 52 53 22 54 55 23 56 57 24 81 25 82 26 83 58 59 84 60 27 61 62 63 85 64 65 86 66 28 87 88 89 10 11 12 13 1 4 5 6 7 8 2 9 3 14 15 16 1 6...
result:
ok 4 lines
Test #8:
score: 0
Accepted
time: 4ms
memory: 4136kb
input:
6 97 148 -94 -93 -91 -90 -89 -85 -84 -82 -79 -76 -75 -73 -67 -65 -62 -61 -60 -59 -58 -57 -56 -54 -52 -50 -48 -47 -44 -42 -41 -36 -34 -31 -29 -28 -27 -25 -22 -21 -19 -18 -15 -14 -5 -3 3 4 7 8 9 10 11 12 16 17 18 19 29 33 34 35 37 39 41 44 45 47 51 52 55 56 59 61 62 63 64 65 66 68 69 70 71 74 76 77 79...
output:
44 45 1 46 2 3 4 5 47 6 48 49 7 50 8 51 9 52 53 54 10 55 11 12 13 56 57 58 59 60 14 61 62 63 15 64 65 16 66 17 18 67 19 20 68 21 69 70 71 22 72 73 23 24 74 75 76 77 78 25 26 27 28 29 79 30 31 32 33 34 35 80 36 81 82 37 83 84 85 86 38 87 88 39 89 90 91 40 92 93 94 41 95 42 96 43 97 45 46 47 1 2 48 49...
result:
ok 6 lines
Test #9:
score: 0
Accepted
time: 1ms
memory: 3672kb
input:
125 1 2 1 8 2 3 -1 2 8 11 9 12 3 5 -2 -1 0 -2 -1 0 -2 -1 0 -2 -1 0 -2 -1 0 3 4 -3 -1 0 -3 -1 6 -3 -1 1 -3 -1 5 3 5 0 1 3 0 1 9 0 1 8 0 1 7 0 1 12 3 5 -1 2 3 0 2 4 2 4 8 2 5 9 2 2 6 3 5 -1 1 3 -1 4 6 -1 5 7 -1 10 12 -1 8 10 3 4 -3 -1 3 -1 1 5 1 3 7 6 8 12 2 3 -1 1 -1 1 -1 1 3 4 1 2 3 2 3 6 2 3 7 2 3 ...
output:
1 1 2 1 2 3 1 2 3 1 2 3 2 1 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 2 3 1 1 2 3 1 2 1 2 1 2 3 1 2 3 2 1 1 2 3 1 2 3 1 2 1 1 2 3 1 1 2 1 2 1 1 2 3 3 1 2 1 3 2 1 2 1 2 1 2 1 2 1 2 3 3 1 2 1 2 3 1 1 1 2 3 2 3 1 3 1 2 1 2 1 3 2 3 1 2 3 1 1 2 3 1 1 2 3 1 2 3 1 3 2 1 2 1 3 1 2 1 2 1 2 1 2 3 1 3 2 2 3 1 1 1 1 3 2 2 ...
result:
ok 125 lines
Test #10:
score: 0
Accepted
time: 19ms
memory: 8172kb
input:
1 313 500 -4934898 -4922921 -4840685 -4775612 -4764872 -4727198 -4693308 -4666087 -4655510 -4584215 -4578427 -4567563 -4514324 -4459534 -4437224 -4420210 -4416294 -4400358 -4391202 -4374732 -4322821 -4301462 -4237369 -4209493 -4180742 -4131190 -4121838 -4112321 -4019936 -3988109 -3980007 -3979429 -3...
output:
226 273 146 206 237 44 313 1 272 86 231 248 199 242 271 175 130 76 70 115 124 267 200 283 102 147 164 46 279 205 100 10 227 233 134 41 137 6 282 32 110 212 112 72 280 51 119 198 23 264 284 19 269 302 129 163 256 58 230 3 195 2 247 101 179 128 107 126 224 125 150 94 82 289 62 87 186 64 59 204 16 303 ...
result:
ok single line: '226 273 146 206 237 44 313 1 2...3 43 14 114 71 8 294 28 104 168'
Test #11:
score: 0
Accepted
time: 27ms
memory: 10504kb
input:
1 469 500 -998 -996 -991 -988 -983 -978 -975 -972 -966 -955 -953 -951 -945 -941 -933 -932 -931 -929 -927 -926 -925 -923 -922 -920 -914 -910 -901 -893 -891 -890 -878 -877 -872 -845 -826 -821 -820 -814 -813 -809 -808 -803 -799 -795 -792 -791 -790 -789 -781 -775 -769 -766 -763 -760 -754 -752 -749 -748 ...
output:
370 164 211 118 378 379 274 116 217 234 241 161 96 84 6 371 125 364 358 349 454 312 112 203 335 48 397 146 9 415 455 282 254 279 459 281 324 173 81 297 182 109 126 433 196 219 463 193 257 50 380 70 225 336 275 249 212 23 149 406 311 52 122 304 123 128 400 283 341 198 215 85 344 194 260 413 180 248 9...
result:
ok single line: '370 164 211 118 378 379 274 11...5 443 113 100 307 359 60 462 37'
Test #12:
score: 0
Accepted
time: 38ms
memory: 10724kb
input:
1 462 500 -2999 -2982 -2973 -2971 -2953 -2931 -2926 -2922 -2915 -2898 -2897 -2863 -2857 -2853 -2851 -2834 -2832 -2829 -2822 -2814 -2809 -2805 -2793 -2777 -2737 -2724 -2723 -2686 -2679 -2660 -2633 -2629 -2587 -2577 -2545 -2491 -2479 -2448 -2444 -2417 -2393 -2379 -2362 -2355 -2351 -2350 -2327 -2321 -2...
output:
338 1 2 339 232 3 233 234 4 115 235 236 340 237 341 5 116 117 6 342 343 238 344 118 345 7 8 9 346 239 119 347 348 349 10 11 350 12 240 120 121 351 13 122 241 123 124 14 352 15 353 125 16 242 354 17 18 126 127 128 243 355 129 244 356 130 131 245 246 132 133 357 358 134 19 135 359 136 137 360 138 247 ...
result:
ok single line: '338 1 2 339 232 3 233 234 4 11...460 461 336 113 462 114 231 337'
Test #13:
score: 0
Accepted
time: 33ms
memory: 10212kb
input:
1 457 500 -1000 -993 -991 -985 -981 -977 -975 -973 -968 -966 -954 -951 -945 -944 -941 -940 -935 -932 -931 -929 -928 -925 -922 -916 -907 -906 -899 -896 -894 -890 -886 -878 -876 -875 -870 -867 -866 -863 -861 -860 -856 -851 -849 -841 -840 -834 -833 -823 -822 -821 -816 -812 -811 -807 -806 -803 -800 -791...
output:
202 37 82 123 419 164 83 1 292 203 368 245 331 2 369 293 294 38 420 204 165 421 84 370 246 332 422 295 39 371 3 124 125 205 40 372 126 127 333 206 334 335 207 296 41 336 337 42 208 373 247 166 248 4 249 5 128 423 167 129 297 130 131 338 374 168 424 425 85 43 375 298 339 426 427 376 340 250 44 251 29...
result:
ok single line: '202 37 82 123 419 164 83 1 292... 456 418 457 289 81 290 291 330'
Test #14:
score: 0
Accepted
time: 26ms
memory: 10752kb
input:
1 473 500 -994 -992 -991 -988 -982 -980 -974 -973 -969 -968 -959 -958 -953 -952 -948 -943 -938 -936 -935 -933 -931 -920 -911 -910 -908 -906 -904 -891 -886 -878 -869 -867 -861 -859 -857 -856 -851 -850 -847 -845 -841 -839 -838 -837 -831 -823 -819 -817 -816 -812 -807 -806 -803 -802 -801 -796 -795 -793 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...466 467 468 469 470 471 472 473'
Test #15:
score: 0
Accepted
time: 19ms
memory: 8692kb
input:
1 349 500 -500 -499 -498 -496 -494 -489 -488 -486 -484 -483 -482 -480 -477 -475 -472 -470 -466 -464 -463 -462 -452 -443 -442 -440 -435 -432 -431 -428 -427 -423 -422 -421 -420 -417 -415 -414 -413 -408 -405 -402 -398 -394 -392 -381 -379 -377 -376 -375 -373 -370 -368 -363 -355 -343 -338 -333 -332 -331 ...
output:
1 162 163 2 164 165 166 167 168 3 4 169 5 6 7 170 171 172 8 9 173 174 10 11 175 12 13 176 14 15 177 178 16 17 179 180 181 18 19 182 20 21 22 183 23 184 185 24 25 186 187 188 26 189 27 28 29 30 31 32 33 190 34 35 191 192 193 36 194 37 38 39 40 195 41 196 197 42 198 199 200 43 201 202 203 44 45 204 46...
result:
ok single line: '1 162 163 2 164 165 166 167 16...158 159 346 347 160 348 349 161'
Test #16:
score: 0
Accepted
time: 37ms
memory: 9960kb
input:
1 463 500 -250 -249 -248 -247 -245 -244 -243 -242 -241 -240 -238 -237 -236 -235 -234 -233 -232 -231 -230 -229 -228 -227 -225 -224 -223 -222 -221 -220 -219 -217 -216 -215 -214 -213 -212 -211 -210 -209 -208 -207 -206 -205 -204 -203 -202 -201 -200 -199 -198 -197 -196 -195 -194 -193 -192 -191 -190 -189 ...
output:
1 2 310 166 3 4 167 311 5 312 313 314 168 6 315 169 316 170 171 172 173 7 317 318 8 9 174 175 10 176 177 319 178 320 11 179 321 322 12 13 323 14 324 325 180 15 181 16 182 17 18 19 20 21 183 326 184 185 327 22 328 23 329 24 330 331 332 186 333 334 25 187 335 336 26 27 28 29 30 31 32 188 189 33 337 19...
result:
ok single line: '1 2 310 166 3 4 167 311 5 312 ...163 307 462 308 463 164 165 309'
Test #17:
score: 0
Accepted
time: 35ms
memory: 10640kb
input:
1 486 500 -250 -249 -248 -247 -246 -245 -244 -243 -242 -241 -240 -239 -238 -237 -236 -235 -234 -233 -232 -231 -230 -229 -228 -227 -226 -225 -224 -223 -221 -220 -219 -218 -217 -216 -215 -213 -212 -211 -210 -209 -208 -207 -206 -203 -202 -201 -200 -199 -198 -197 -196 -195 -194 -193 -192 -191 -190 -189 ...
output:
230 231 232 233 1 2 3 234 4 235 5 236 237 238 239 240 241 242 243 244 6 245 7 246 247 248 249 8 250 9 10 11 12 13 14 15 16 251 17 18 19 252 20 253 254 255 21 256 257 258 22 259 23 260 261 262 24 263 264 265 25 26 27 28 266 29 30 31 32 267 33 268 269 270 34 271 35 36 272 37 38 39 273 274 40 275 41 27...
result:
ok single line: '230 231 232 233 1 2 3 234 4 23...482 227 228 483 229 484 485 486'
Test #18:
score: 0
Accepted
time: 21ms
memory: 11028kb
input:
1 474 500 -250 -249 -248 -247 -245 -244 -243 -242 -241 -240 -239 -238 -237 -236 -235 -234 -233 -232 -230 -229 -228 -227 -226 -225 -224 -223 -222 -221 -220 -219 -218 -216 -215 -214 -213 -211 -210 -209 -208 -207 -206 -205 -204 -203 -202 -201 -200 -199 -198 -197 -196 -195 -194 -193 -192 -191 -190 -189 ...
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...467 468 469 470 471 472 473 474'
Test #19:
score: 0
Accepted
time: 27ms
memory: 11016kb
input:
1 493 500 -4999873 -4998932 -4987995 -4948600 -4945916 -4910512 -4906606 -4895922 -4861190 -4815582 -4815231 -4784510 -4775893 -4753199 -4720915 -4683597 -4674135 -4632317 -4618568 -4610615 -4603123 -4601966 -4598490 -4588135 -4586540 -4569010 -4565307 -4540505 -4524074 -4514196 -4506903 -4492185 -4...
output:
89 280 66 83 9 242 478 195 127 136 453 90 26 105 349 284 212 468 39 191 479 437 76 266 178 302 16 378 155 17 422 292 23 348 111 182 40 254 137 196 138 267 404 183 163 368 164 108 407 145 172 41 415 50 331 379 308 373 473 197 227 18 184 51 106 165 33 10 1 345 159 128 116 213 220 261 319 235 34 408 61...
result:
ok single line: '89 280 66 83 9 242 478 195 127... 246 110 425 38 314 477 328 104'
Test #20:
score: 0
Accepted
time: 14ms
memory: 10820kb
input:
1 473 500 -4989689 -4975384 -4961191 -4951731 -4945745 -4873385 -4859791 -4848340 -4839644 -4839076 -4792163 -4759149 -4716421 -4691746 -4688045 -4683899 -4658571 -4649480 -4647187 -4640499 -4632676 -4602813 -4592329 -4529686 -4518469 -4511641 -4453375 -4416799 -4394123 -4391758 -4391415 -4342653 -4...
output:
355 123 124 240 356 125 357 241 242 358 1 243 359 126 360 127 361 128 244 129 2 3 362 363 245 130 364 246 247 4 365 5 248 6 366 249 131 7 367 132 368 8 133 134 135 9 136 369 137 370 138 10 139 250 371 251 11 12 13 140 252 141 14 253 372 373 374 375 254 15 16 142 255 376 143 377 378 256 144 145 17 18...
result:
ok single line: '355 123 124 240 356 125 357 24...353 354 121 239 471 122 472 473'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
250 1 2 -10000000 10000000 1 2 -10000000 9999999 1 2 -9999999 10000000 1 2 -9999999 9999999 1 2 -10000000 10000000 1 2 -10000000 9999999 1 2 -9999999 10000000 1 2 -9999999 9999999 1 2 -10000000 10000000 1 2 -10000000 9999999 1 2 -9999999 10000000 1 2 -9999999 9999999 1 2 -10000000 10000000 1 2 -1000...
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 250 lines
Test #22:
score: 0
Accepted
time: 36ms
memory: 11008kb
input:
1 499 500 -10000000 -9999999 -9999998 -9999997 -9999996 -9999995 -9999994 -9999993 -9999992 -9999991 -9999990 -9999989 -9999988 -9999987 -9999986 -9999985 -9999984 -9999983 -9999982 -9999981 -9999980 -9999979 -9999978 -9999977 -9999976 -9999975 -9999974 -9999973 -9999972 -9999971 -9999970 -9999969 -...
output:
428 80 442 195 267 443 196 388 50 334 197 121 1 27 444 220 103 2 335 389 28 29 151 3 390 268 104 409 366 122 247 248 313 51 4 81 336 123 337 198 429 269 367 368 338 173 124 5 285 445 339 52 446 221 199 82 430 83 105 270 271 249 53 410 84 286 447 314 30 431 222 340 369 6 391 31 85 125 54 411 392 86 7...
result:
ok single line: '428 80 442 195 267 443 196 388...497 498 245 494 499 495 172 246'
Extra Test:
score: 0
Extra Test Passed