QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#870642 | #8620. Jigsaw Puzzle | ucup-team087# | AC ✓ | 2ms | 4224kb | C++23 | 26.0kb | 2025-01-25 17:10:42 | 2025-01-25 17:10:47 |
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{
#ifdef USE_FAST_IO
sc.read(a...);
#else
(cin >> ... >> a);
#endif
}
}
#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].a,name[i_##name].b);
#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 VMI(name,size) vc<mint> name(size);rep(i_##name,size){INT(tmp_##name);name[i_##name]=tmp_##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<<"}";
}
void printsuc(int suc){
#ifdef USE_FAST_IO
if(suc==1)pr.write('\n');
if(suc==2)pr.write(' ');
#else
if(suc==1){
if(dbg)cout<<endl;
else{
#ifdef LOCAL
cout<<endl;
#else
cout<<"\n";
#endif
}
}
if(suc==2)
cout<<" ";
#endif
}
template<class t>
void print_single(t x,int suc=1){
#ifdef USE_FAST_IO
pr.write(x);
#else
cout<<x;
#endif
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);
}
}
vi readRooted(int n){
assert(!dbg);
vi par(n,-1);
rng(i,1,n){
input(par[i]);
par[i]--;
assert(inc(0,par[i],i-1));
}
return par;
}
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,size_t n>
array<t,n>&operator+=(array<t,n>&a,const array<t,n>&b){
rep(i,n)a[i]+=b[i];
return a;
}
template<class t,size_t n>
array<t,n>&operator-=(array<t,n>&a,const array<t,n>&b){
rep(i,n)a[i]-=b[i];
return a;
}
template<class t,size_t n,class v>
array<t,n>&operator*=(array<t,n>&a,v b){
rep(i,n)a[i]*=b;
return a;
}
template<class t,size_t n>
array<t,n> operator+(array<t,n> a,const array<t,n>&b){return a+=b;}
template<class t,size_t n>
array<t,n> operator-(array<t,n> a,const array<t,n>&b){return a-=b;}
template<class t,size_t n,class v>
array<t,n> operator*(array<t,n> a,v b){return 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>
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>
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 t>
void rempos(vc<t>&a,int i){
assert(inc(0,i,si(a)-1));
a.erase(a.bg+i);
}
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>;
namespace std{
__float128 abs(__float128 x){
return x<0?-x:x;
}
__float128 sin(__float128 x){
return sinl(x);
}
__float128 cos(__float128 x){
return cosl(x);
}
__float128 acos(__float128 x){
return acosl(x);
}
__float128 atan2(__float128 y,__float128 x){
return atan2l(y,x);
}
__float128 sqrt(__float128 x){
return sqrtl(x);
}
__float128 fmod(__float128 x,__float128 y){
return fmodl(x,y);
}
ostream&operator<<(ostream&os,__float128 v){
return os<<(long double)v;
}
istream&operator>>(istream&is,__float128&v){
long double z;
is>>z;
v=z;
return is;
}
}
//copied from yosupo's library
//PARTLY VERIFIED
//USACO 2022 January ptlatinum C
#define GEOF
#ifdef GEOF
using ld=long double;
//using ld=__float128;
//using ld=double;
const ld PI=acos(ld(-1));
#else
using ld=ll;
#endif
const ld eps=1e-9;
int sgn(ld a){return a<-eps?-1:(a>eps?1:0);}
int sgn(ld a,ld b){return sgn(a-b);}
/*
using pt=complex<ld>;
#define x real()
#define y imag()
*/
struct pt {
ld x,y;
//pt(ld _x = ld(0), ld _y = ld(0)) : x(_x), y(_y) {}
pt():x(0),y(0){}
pt(ld xx,ld yy):x(xx),y(yy){}
pt operator+(const pt& r) const { return {x + r.x, y + r.y}; }
pt operator-(const pt& r) const { return {x - r.x, y - r.y}; }
pt operator*(const pt& r) const {
return {x * r.x - y * r.y, x * r.y + y * r.x};
}
pt inv()const{
ld d=norm();
return {x/d,-y/d};
}
pt operator/(const pt&r)const{
return operator*(r.inv());
}
pt operator*(const ld& r) const { return {x * r, y * r}; }
pt operator/(const ld& r) const { return {x / r, y / r}; }
pt& operator+=(const pt& r) { return *this = *this + r; }
pt& operator-=(const pt& r) { return *this = *this - r; }
pt& operator*=(const pt& r) { return *this = *this * r; }
pt& operator/=(const pt& r) { return *this = *this / r; }
pt& operator*=(const ld& r) { return *this = *this * r; }
pt& operator/=(const ld& r) { return *this = *this / r; }
pt operator-() const { return {-x, -y}; }
static int cmp(const pt&a,const pt&b){
int v=sgn(a.x,b.x);
return v?v:sgn(a.y,b.y);
}
bool operator<(const pt& r) const {
return cmp(*this,r)<0;
}
bool operator<=(const pt& r) const {
return cmp(*this,r)<=0;
}
bool operator>(const pt& r) const {
return cmp(*this,r)>0;
}
bool operator==(const pt& r) const { return sgn((*this - r).rabs()) == 0; }
bool operator!=(const pt& r) const { return !(*this == r); }
pt conj()const{ return pt(x,-y);}
ld norm() const { return x * x + y * y; }
ld rabs() const { return max(std::abs(x), std::abs(y)); } // robust abs
ld srabs() const{ return std::abs(x)>std::abs(y)?x:y; } // signed robust abs
pair<ld, ld> to_pair() const { return {x, y}; }
#ifdef GEOF
ld abs() const { return sqrt(norm()); }
ld arg() const { return atan2(y, x); }
static pt polar(ld le, ld th) { return {le * cos(th), le * sin(th)}; }
#endif
};
istream& operator>>(istream& is, pt& p){
return is>>p.x>>p.y;
}
ostream& operator<<(ostream& os, const pt& p) {
return os << "pt(" << p.x << ", " << p.y << ")";
}
ld norm(const pt&a){
return a.norm();
}
ld rabs(const pt&a){
return a.rabs();
}
ld srabs(const pt&a){
return a.srabs();
}
#ifdef GEOF
ld abs(const pt&a){
return sqrt(norm(a));
}
//XXII Opencup Gpt of Ural K
pt normalized(const pt&a){
return a/abs(a);
}
ld arg(const pt&a){return a.arg();}
//normalize to [-PI,PI)
//Contest 2: ptKU Contest 1, ptTZ Summer 2022 Day 4
ld normarg(ld a){
ld res=fmod(a+PI,2*PI);
if(res<0)res+=PI;
else res-=PI;
return res;
}
//normalize to [0,2*PI)
//Multiuni2023-10-E
ld normarg_nonnegative(ld a){
ld res=fmod(a,2*PI);
if(res<0)res+=2*PI;
return res;
}
//AOJ1183
//arg between ab
//assume given lengths are valid
ld arg(ld a,ld b,ld c){
return acos(min(max((a*a+b*b-c*c)/(2*a*b),ld(-1)),ld(1)));
}
//UCUP 2-20-D
ld heron(ld a,ld b,ld c){
ld s=(a+b+c)/2;
return sqrt(s*(s-a)*(s-b)*(s-c));
}
#endif
ld norm(const pt&a,const pt&b){
return (a-b).norm();
}
ld dot(const pt&a,const pt&b){return a.x*b.x+a.y*b.y;}
ld crs(const pt& a,const pt& b){return a.x*b.y-a.y*b.x;}
ld crs(const pt& a,const pt& b,const pt& c){return crs(b-a,c-a);}
int ccw(const pt& a,const pt& b){return sgn(crs(a,b));}
int ccw(const pt& a,const pt& b,const pt& c){return ccw(b-a,c-a);}
//(-pi,0](0,pi]
int argtype(const pt&a){
if(sgn(a.y)==0)return a.x<0?1:0;
return a.y<0?0:1;
}
int argcmp(const pt&a,const pt&b){
int at=argtype(a),bt=argtype(b);
if(at!=bt)return at<bt?-1:1;
return -ccw(a,b);
};
bool argless(const pt&a,const pt&b){return argcmp(a,b)<0;}
//c の位置を聞く関数です,b じゃないです
//(-2)[a,-1](0)[b,1](2)
int bet(pt a,pt b,pt c){
pt d=b-a;
ld e=dot(d,c-a);
if(sgn(e)<=0)return sgn(e)-1;
return sgn(e-norm(d))+1;
}
//AOJ0153
//三角形 abc に d が含まれるか?0-no,1-edge,2-in
int cont(pt a,pt b,pt c,pt d){
if(ccw(a,b,c)==-1) swap(b,c);
return min({ccw(a,b,d),ccw(b,c,d),ccw(c,a,d)})+1;
}
//(a,b) を結ぶ直線を考え,x 座標との交点の y 座標を求める
//(分子,分母)を返す
pair<ld,ld> xcut(const pt&a,const pt&b,ld x){
return mp(a.y*(b.x-x)-b.y*(a.x-x),b.x-a.x);
}
//XXII Opencup Gpt of Ural K
pt rot90(pt a){
return pt(-a.y,a.x);
}
#ifdef GEOF
//Multiuni 2024-6-C
pt rot(pt a,ld b){
ld c=cos(b),s=sin(b);
return pt(a.x*c-a.y*s,a.x*s+a.y*c);
}
ld xcutval(const pt&a,const pt&b,ld x){
auto [p,q]=xcut(a,b,x);
return p/q;
}
//AOJ1183
//Xmas2010 E
//-+ の 順で返す
//a の符号により,small/large が決まる
int qeq(ld a,ld b,ld c,ld&d,ld&e){
if(sgn(a)==0){
if(sgn(b)==0)return 0;
d=-c/b;
return 1;
}
ld f=b*b-4*a*c;
if(sgn(f)<0)return 0;
ld g=sqrt(max(f,ld(0)));
d=(-b-g)/(2*a);
e=(-b+g)/(2*a);
return sgn(f)+1;
}
#else
pt normdir(pt a){
if(a==pt(0,0))return a;
int g=gcd(a.x,a.y);
return pt(a.x/g,a.y/g);
}
#endif
ld area2(const vc<pt>&ps){
ld res=0;
rep(i,si(ps))res+=crs(ps[i],ps[(i+1)%si(ps)]);
return res;
}
template<class... Args>void inputpt(Args&... a){(input(a.x,a.y),...);}
#define PT(...) ld __VA_ARGS__;inputpt(__VA_ARGS__)
#define VPT(name,size) vc<pt> name(size);rep(i_##name,size)inputpt(name[i_##name]);
using affine=pair<pt,pt>;
pt applied(const pt&v,const affine&a){
return v*a.a+a.b;
}
void applya(pt&v,const affine&a){
v=applied(v,a);
}
affine get_affine(pair<pt,pt> from,pair<pt,pt> to){
pt a=from.b-from.a;
pt b=to.b-to.a;
pt r=b*a.conj()/a.norm();
pt off=to.a-from.a*r;
affine res(r,off);
assert(applied(from.a,res)==to.a);
assert(applied(from.b,res)==to.b);
return res;
}
ld clamp(ld v){
return max<ld>(0,min<ld>(v,1));
}
void slv(){
INT(n);
vvc<pt> ps(n);
unionfind uf(n);
vc<bool> corner(n);
rep(i,n){
INT(m);
VPT(ls,m);
ps[i]=ls;
}
/*{
bool found=false;
rep(i,n){
rep(j,si(ps[i])){
pt &a=ps[i][j],&b=ps[i][(j+1)%si(ps[i])],&c=ps[i][(j+2)%si(ps[i])];
if(ccw(a,b,c)>0&&sgn(dot(b-a,c-b))==0){
dmp2(a,b,c);
ld d=abs(c-b);
affine z=get_affine(mp(b,c),mp(pt(),pt(d,0)));
for(auto&v:ps[i])
applya(v,z);
dmp2(a,b,c);
found=true;
corner[i]=true;
goto done;
}
}
}
done:;
assert(found);
}
dmp(ps);*/
//map<ld,vc<pi>> qs;
vc<tuple<ld,int,int>> qs;
rep(i,n)rep(j,si(ps[i])){
pt a=ps[i][j],b=ps[i][(j+1)%si(ps[i])];
//qs[abs(b-a)].eb(i,j);
qs.eb(abs(b-a),i,j);
}
soin(qs);
//for(auto [key,val]:qs){
// assert(si(val)<=2);
// if(si(val)==2){
rep(step,si(qs)-1){
auto [d0,i,j]=qs[step];
auto [d1,u,v]=qs[step+1];
if(sgn(d0,1)!=0&&sgn(d0,d1)==0){
if(!uf.same(i,u)){
if(corner[uf.find(u)]){
swap(i,u);
swap(j,v);
}
{
pt a=ps[i][j],b=ps[i][(j+1)%si(ps[i])];
pt d=ps[u][v],c=ps[u][(v+1)%si(ps[u])];
affine z=get_affine(mp(c,d),mp(a,b));
rep(k,n)if(uf.same(k,u)){
for(auto&p:ps[k])applya(p,z);
}
}
uf.unite(i,u);
}
}
}
assert(uf.c==1);
{
pt X=pt::polar(1,rand_int(0,10000));
pt Y=rot90(X);
ld xval=-inf,yval=-inf;
pt xbest,ybest;
rep(i,n)for(auto v:ps[i]){
if(chmax(xval,dot(X,v)))xbest=v;
if(chmax(yval,dot(Y,v)))ybest=v;
}
affine z=get_affine(mp(xbest,ybest),mp(pt(),pt(1,0)));
rep(i,n)for(auto&v:ps[i])applya(v,z);
}
rep(i,n){
for(auto v:ps[i])print(clamp(v.x),clamp(v.y));
}
}
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: 3968kb
input:
4 4 0.440405375916 0.778474079786 0.000000000000 0.090337001520 0.469097990019 0.000000000000 0.702887505082 0.689470121906 4 0.222810526978 0.000000000000 0.270828246634 0.522212063829 0.000000000000 0.547114887265 0.021480010612 0.069880870008 4 0.000000000000 0.312825941471 0.358219176380 0.00000...
output:
0.99999999999892015383 0.27716163632397083805 0.20688335548383064289 0.47326243135793782970 0.27197075171790789836 0.00000000000000000000 1.00000000000000000000 0.00000000000000000005 0.00000000000044521082 0.52441504651351835992 0.00000000000000000000 0.00000000000000000000 0.27197075171790789836 0...
result:
ok OK
Test #2:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
2 4 1.187724454426 0.260257896229 0.903481480651 1.219010174901 0.000000000000 0.951153431795 0.309873903757 0.000000000000 4 0.516015116935 0.888042716318 0.000000000000 0.031046166652 0.048574738349 0.000000000000 0.587115596943 0.842599396881
output:
0.00000000000000000000 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 1.00000000000000000000 0.94235132551898103824 0.00000000000024320975 0.91561769416065552109 0.00000000000024320975 0.91561769416065552109 1.00000000000000000000 0.94235132551898103818 1.00000000000000000000 1...
result:
ok OK
Test #3:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
2 4 0.010984487654 0.637154242202 0.000000000000 0.364429379044 0.986132728982 0.000000000000 1.010174362438 0.596910060881 4 1.051085498217 0.708750184397 0.000000000000 0.686709156365 0.238826458657 0.000000000000 1.183335588457 0.328485165151
output:
1.00000000000000000000 0.00000000000000000011 0.99999999999989118947 0.27294598358190124131 0.00000000000007935235 0.59739402484441738665 0.00000000000000000005 0.00000000000000000000 0.00000000000007935235 0.59739402484441738665 0.99999999999989118947 0.27294598358190124131 0.99999999999928266073 1...
result:
ok OK
Test #4:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
2 4 0.826904615568 0.393527743434 0.397181437913 1.296488423966 0.078224855062 1.144695506210 0.000000000000 0.000000000000 4 1.022875732881 0.126407334306 0.000000000000 0.646188215994 0.027327732878 0.000000000000 1.026434680216 0.042252902634
output:
0.00000000000000000004 0.00000000000000000000 1.00000000000000000000 0.00000000000000000005 0.99999999999981633306 0.35323418807467711432 0.00000000000008020812 0.91577034681153082795 0.00000000000008020812 0.91577034681153082795 0.99999999999981633306 0.35323418807467711432 1.00000000000000000000 0...
result:
ok OK
Test #5:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
2 4 0.341358383182 1.391325004482 0.000000000000 0.397880525310 0.531982366752 0.000000000000 1.130916074772 0.800798609763 4 1.051975365355 0.325235570274 0.003475133323 0.261167306728 0.000000000000 0.247567137365 0.968870740861 0.000000000000
output:
0.98596286502469695373 0.00000000000035708418 0.66431479808564949458 0.99999999999993104799 0.00000000000002170491 0.99999999999993467779 0.00000000000000000000 0.00000000000000000000 0.66431479808564949453 0.99999999999993104799 0.98596286502469695373 0.00000000000035708413 0.99999999999999999995 0...
result:
ok OK
Test #6:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
2 4 0.082220615826 0.000000000000 0.226158368535 0.989676141653 0.157074587283 1.000663841224 0.000000000000 0.013077098690 4 0.796463091415 0.000000000000 1.301438005407 0.863236513506 0.516366280506 1.336613199533 0.000000000000 0.480245367141
output:
0.00000000000029131336 0.91674592996831064974 1.00000000000000000000 0.93004788513671396292 0.99999999999972602520 1.00000000000000000000 0.00000000000032371431 1.00000000000000000000 1.00000000000000000000 0.93004788513671396292 0.00000000000029131336 0.91674592996831064974 0.00000000000000000000 0...
result:
ok OK
Test #7:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
2 4 0.919168715346 1.052156329422 0.000000000000 0.740689700679 0.930075742206 0.000000000000 1.240100800584 0.105054119170 4 1.147942957461 0.000000000000 1.169807209495 0.019794683310 0.498656378683 0.761115506098 0.000000000000 0.309659628218
output:
0.00000000000000000000 0.00000000000000000000 0.97050635654333464240 0.00000000000000000000 0.32734065555263249008 0.99999999999984434521 0.00000000000121828083 0.99999999999954335633 0.97050635654333464240 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 1.00000000000000000000 0...
result:
ok OK
Test #8:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
3 4 0.000000000000 0.136914050437 1.205473860654 0.000000000000 1.271801552152 0.076389603324 0.516716328492 0.732016253949 4 0.193356841190 1.008675084911 0.000000000000 0.998661755544 0.051717482677 0.000000000000 0.069051074671 0.000897651020 4 0.189612940043 1.009339071474 0.000000000000 0.01178...
output:
0.78812587621130477566 0.00000000000000000000 0.10116686293167246241 0.99999999999897047170 0.00000000000002235564 0.99999999999870505717 0.00000000000000000000 0.00000000000000000000 0.80638405334295401274 0.00000000000023888977 1.00000000000000000000 0.00000000000000000002 1.00000000000000000000 0...
result:
ok OK
Test #9:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
4 5 0.933026549197 0.034096050827 1.030580221284 0.341877704707 0.077317792660 0.644021283449 0.000000000000 0.400083791499 0.816713028753 0.000000000000 5 0.000000000000 0.567232254210 0.177744443744 0.000000000000 0.278219549927 0.015709015317 0.955605106642 0.861917658609 0.954247706440 0.8662495...
output:
0.32287190247090828853 0.99999999999991118823 0.00000000000346528345 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 0.25589752058350257745 0.00000000000000000000 0.39051777001144357643 0.89942459383723196901 1.00000000000000000000 0.99999999999778145402 0.40557126794392739917 0...
result:
ok OK
Test #10:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
4 4 0.578470606282 0.000000000000 1.060885700639 0.240610189702 0.817167310798 0.691089665380 0.000000000000 0.248985836080 4 0.000000000000 0.520597380570 0.022799149709 0.000000000000 0.882566155159 0.037652814638 0.461438543132 0.525442723877 4 0.057126159280 0.427841981239 0.000000000000 0.38584...
output:
0.50574809620449222845 0.53879133060612785885 0.48781798981826872202 0.00000000000000000000 0.99999999999999999995 0.00000000000000000000 0.99999999999925638454 0.92909537170222994374 0.52109637677042455934 0.99999999999952702005 0.00000000000000000000 0.99999999999905130662 0.00000000000000000000 0...
result:
ok OK
Test #11:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 3 0.823899373670 0.782629779690 0.288601744213 0.945945553033 0.000000000000 0.000000000000 5 0.919151534064 0.575061183684 0.169973459288 1.263242535288 0.000000000000 1.135836341471 0.145355826013 0.008808731413 0.151958544733 0.000000000000 4 1.000848179486 0.040130744019 0.991701546880 0.26786...
output:
0.00000000000000000000 0.55965667504731933854 0.00000000000000000000 0.00000000000000000000 0.98899138321122551462 0.00000000000063805130 1.00000000000000000000 0.95879113881010238419 0.00000000000000000000 0.77207916699524641838 0.00000000000000000000 0.55965667504731933854 0.98899138321122551451 0...
result:
ok OK
Test #12:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
3 4 0.784316497399 0.634251077946 0.006801703755 1.263115726074 0.000000000000 1.254706245103 0.271325510967 0.000000000000 4 0.176866080715 0.000000000000 1.325780121566 0.313426050448 1.266765536888 0.366283123599 0.000000000000 0.158412084360 4 0.637108390812 0.412967145896 0.087765752860 1.24856...
output:
1.00000000000000000000 0.00000000000000000000 1.00000000000000000000 1.00000000000000000000 0.98918415310208071458 0.99999999999991315064 0.18425850783715456602 0.00000000000159676721 0.75174784800368916050 1.00000000000000000000 0.10503356614068934068 0.00000000000086801839 0.18425850783715456602 0...
result:
ok OK
Test #13:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
6 4 0.921652078321 0.149600568920 0.078937119587 0.337059477836 0.000000000000 0.296726127108 0.743849912614 0.000000000000 4 1.023501554022 0.000000000000 0.951768850516 0.475614028074 0.000000000000 0.332067057777 0.284068099668 0.057351469275 4 0.049230909949 0.111307311191 0.213550746194 0.00000...
output:
0.00000000000279942182 0.19846996274190237318 0.68599219867212534319 0.72261121045904048120 0.70595071947802242809 0.80897963916276502660 0.00000000000397257198 0.43083592485854069128 0.51900698086877414185 0.00000000000015273145 1.00000000000000000000 0.00000000000000000000 0.99999999999934026070 0...
result:
ok OK
Test #14:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
5 4 0.000000000000 0.055459913902 0.998460914583 0.000000000000 1.018410323962 0.359155002823 0.013840567536 0.304635665324 4 0.500064513905 0.019086089913 0.674971706538 0.000000000000 0.813263023860 0.224894936058 0.000000000000 0.724982740923 4 0.731666528739 0.764701825648 0.735437510038 0.80982...
output:
0.99999999999855788746 0.99999999999728136425 0.00000000000145746436 0.99999999999768051815 0.00000000000140301417 0.64029137487643362787 0.99999999999844620997 0.75044015465737176911 0.15898980795296501140 0.33937122558706418209 0.00000000000059958740 0.26401178138692177826 0.00000000000000000001 0...
result:
ok OK
Test #15:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
5 3 0.000000000000 0.061747330599 0.247806449221 0.000000000000 0.229822253050 0.275345649819 5 0.538394745273 0.029328826979 0.968971368133 0.672420034382 0.916291764826 0.738725056183 0.000000000000 0.284470622299 0.226013039857 0.000000000000 4 0.014373491307 0.145007400418 1.026752147154 0.00000...
output:
1.00000000000000000000 0.57219607709359558999 1.00000000000000000000 0.82757964961068113694 0.73717200749504761202 0.74355522136714480579 0.73717200749504761207 0.74355522136714480579 0.00000000000007780145 0.50788604527872467323 0.00000000000043729072 0.42320135645830432510 0.99999999999980365185 0...
result:
ok OK
Test #16:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
7 5 0.810317691232 0.643017535788 0.309793761559 0.764262848182 0.000000000000 0.561376089933 0.651400345497 0.000000000000 0.931962307009 0.325553870105 4 0.171076044751 0.000000000000 0.265564197304 0.103411254234 0.071756689228 0.418964516278 0.000000000000 0.156314315443 4 0.386419063825 0.00000...
output:
0.70060550599941170431 0.59083771974031397065 0.24230142049085170330 0.35592923722283513176 0.14007818700698960475 0.00000000000060058593 1.00000000000000000000 0.00000000000000000000 1.00000000000000000000 0.42976777053146062905 0.00000000000000000000 0.00000000000000000000 0.14007818700698960470 0...
result:
ok OK
Test #17:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
7 4 0.000000000000 0.177488867232 0.176950314412 0.039266481958 0.556242974263 0.000000000000 0.075309305264 0.536013509980 4 0.203281319601 0.323314306022 0.000000000000 0.110510724304 0.349283252863 0.000000000000 0.408321765666 0.043218341300 5 0.860850463389 0.099669917919 0.433724726467 0.81261...
output:
0.28972790430798735651 0.70451282498744198128 0.51078144968204476704 0.74391043453664840109 0.79331093997458040055 0.99999999999218131810 0.07316673438056124466 0.99999999999628778695 0.00000000000490424240 0.65287562174919445870 0.28972790430798735654 0.70451282498744198133 0.07316673438104291294 0...
result:
ok OK
Test #18:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
6 4 0.880095449711 0.315891170135 0.784668799664 0.890843756640 0.000000000000 0.600905379684 0.728266831893 0.000000000000 4 0.083309474403 0.000000000000 0.291032832219 0.544543596864 0.066903447530 0.393219949838 0.000000000000 0.014725970157 4 0.007778511174 0.196667909856 0.000000000000 0.13427...
output:
0.42761207634876141295 0.19436792908937113542 0.99999999999787291341 0.08460096171294155895 0.99999999999509283684 0.92112315962204597343 0.18392577277198589889 0.44627296279510029483 0.99999999999999517655 0.08460096171082636675 0.42761207634876141289 0.19436792908937113550 0.61563849835508586972 0...
result:
ok OK
Test #19:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
9 4 0.062298941747 0.379982766518 0.000000000000 0.335827002916 0.238024873877 0.000000000000 0.368555159260 0.154177511533 4 0.271980593498 0.402027829795 0.000000000000 0.242759569523 0.006597351582 0.000000000000 0.412952594723 0.011043306806 4 0.713919783914 0.000000000000 0.775523766209 0.02973...
output:
0.00000000000030448568 0.07636026193034799165 0.00000000000000000000 0.00000000000000000000 0.41162557800954451719 0.00000000000000000000 0.36131889638942994047 0.19564789354546545464 0.60533007072544226348 0.27620696578086707671 0.75715080061307188407 0.00000000000000000000 1.00000000000000000000 0...
result:
ok OK
Test #20:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
12 4 0.011736358846 0.082356480218 0.408765987214 0.000000000000 0.506829492828 0.122146405389 0.000000000000 0.183574392246 3 0.518781549596 0.245694689851 0.000000000000 0.398529593227 0.074761480444 0.000000000000 4 0.075538054618 0.530132543078 0.000000000000 0.488866489116 0.155089097424 0.0109...
output:
0.63884202608553002653 0.65698148644887489282 0.99999999999445055487 0.84131822590750876296 0.99999999999404788604 0.99795856388661868190 0.56632343045355425611 0.72856263705154952564 0.99999999999311677798 0.30049218743974183537 0.99999999999445055487 0.84131822590750876296 0.63884202608553002653 0...
result:
ok OK
Test #21:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
14 4 0.238874723659 0.350932855333 0.056257209931 0.347991971885 0.000000000000 0.014112992049 0.083758710992 0.000000000000 3 0.000000000000 0.000000000000 0.074629721440 0.057264984008 0.050867075265 0.098486920063 5 0.000000000000 0.100859535910 0.152266736787 0.000000000000 0.585330206242 0.2675...
output:
0.17959046741309193490 0.37182794128898767735 0.00000000000000000000 0.33858536124232403437 0.00000000000000000005 0.00000000000000000000 0.08493937962891713752 0.00000000000191672793 0.49058872651733418123 0.90674452937305463006 0.47824810616669486906 1.00000000000000000000 0.43066752855951943618 1...
result:
ok OK
Test #22:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
25 4 0.000000000000 0.627504305794 0.147063422648 0.000000000000 0.282537740951 0.083274926848 0.087264778840 0.609639797093 3 0.040754587534 0.053855777929 0.019823186956 0.059913069526 0.000000000000 0.000000000000 4 0.000000000000 0.138379187270 0.054487787984 0.000000000000 0.282847594751 0.1139...
output:
0.62039659290968112928 0.00000000002527657548 0.35047097643406101525 0.58526016919669353978 0.23445056077887233538 0.47650692781502080285 0.53132200452057046984 0.00000000002365152713 0.13061739867292580799 0.64316903735766971960 0.14213980197301716706 0.62467448319103496243 0.19692636510059483198 0...
result:
ok OK
Test #23:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
31 4 0.335089288956 0.202130218860 0.111257412594 0.213056135994 0.000000000000 0.115005293141 0.101353839372 0.000000000000 5 0.368599476325 0.185829203903 0.028334455772 0.164205533565 0.000000000000 0.125424247883 0.009151606319 0.000000000000 0.420642774919 0.030024538656 4 0.014611117134 0.4683...
output:
0.69100081093510528447 0.15618926151171227903 0.85170239502523719896 0.00000000000000000000 1.00000000000000000000 0.00000000000000000001 0.99999999999957478610 0.15329324253157741507 0.37201795386580207694 0.15917884996742208406 0.03108151240789729629 0.16237419300185392646 0.00000000000104815687 0...
result:
ok OK
Test #24:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
38 6 0.055783185423 0.185264589599 0.000000000000 0.109085977012 0.008304609077 0.000000000000 0.192122870699 0.013993905045 0.330134360764 0.183894016971 0.331013036656 0.209310854427 6 0.313528615558 0.117272301270 0.460548489005 0.402591166057 0.450995573032 0.409647373622 0.000000000000 0.427107...
output:
0.18112598068294606791 0.93859509397568467292 0.10940163117799271421 0.99999999996418048403 0.00000000000000000000 0.99999999995846878252 0.00000000000000000000 0.81564983672778264441 0.15893353723721834760 0.66513953756460255355 0.18421034029683152951 0.66233402073964321374 0.70952101572350815650 0...
result:
ok OK
Test #25:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
42 3 0.023946458177 0.001644458456 0.052848741781 0.000000000000 0.000000000000 0.033937501244 4 0.000000000000 0.437888290711 0.220437603206 0.000000000000 0.252072649283 0.037291610744 0.214541156503 0.387891843578 5 0.056385180666 0.000000000000 0.307613101005 0.119085407065 0.324470389249 0.5126...
output:
0.04582414870014682529 0.32687873288258782620 0.07100159204111065459 0.34116658044266800820 0.00819454535119017288 0.34103099148078566271 0.32408969886104643690 0.00000000001444818915 0.81433340565637668979 0.00000000000923207924 0.79524900779009445085 0.04502472799609933104 0.46521501296121781788 0...
result:
ok OK
Test #26:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
47 4 0.000000000000 0.000000000000 0.240721682184 0.063972715782 0.212144051267 0.142587916515 0.194188982632 0.164356993645 3 0.000000000000 0.007329294278 0.004097455454 0.000000000000 0.012808348423 0.004742705864 4 0.000000000000 0.191434375054 0.194726601227 0.006150268983 0.209266332239 0.0000...
output:
0.00000000003700986731 0.99891787082401662604 0.00000000000747446183 0.74984070075834225507 0.08331784091644956019 0.75726822810612528299 0.10896821814147949289 0.76902983331631042605 0.83621478684231578121 0.99999999999765440477 0.82781790076467547362 0.99999999999875924874 0.82770692998860510977 0...
result:
ok OK
Test #27:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
66 5 0.000000000000 0.005053823688 0.010340563564 0.000000000000 0.068710101615 0.119429160119 0.065718142206 0.133817342462 0.045777209397 0.180721261022 5 0.319222361577 0.160705577488 0.145577264946 0.213639327175 0.045295283323 0.175775668292 0.000000000000 0.039061839645 0.232351393621 0.000000...
output:
0.00000000000049098073 0.01150949124414877089 0.00000000000000000000 0.00000000000000000000 0.13292978319461411051 0.00000000000000000000 0.14454290109281387541 0.00900594830550215575 0.17792708676815178497 0.04751717426027822535 0.00000000000219590811 0.01150949124798754318 0.17792708676815178497 0...
result:
ok OK
Test #28:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
65 3 0.000000000000 0.037227150695 0.041112144465 0.000000000000 0.053670737603 0.076203761999 4 0.225553825935 0.000000000000 0.223161633995 0.030611367046 0.001148070858 0.117279311869 0.000000000000 0.054401518608 3 0.131607859592 0.000000000000 0.015270081138 0.023579309412 0.000000000000 0.0133...
output:
0.82495260802378465566 0.99999999996688929046 0.76949028594782526780 0.99999999996393460275 0.81133019002022581151 0.93508348412200671879 0.91238352788523229540 0.31372309677426203465 0.91577250224335619345 0.34424019407236948356 0.71394297455921593729 0.47099269555219248397 0.70102747695143500714 0...
result:
ok OK
Test #29:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
87 3 0.000000000000 0.015182039322 0.008005468111 0.000000000000 0.008505409967 0.010237923361 3 0.006579715319 0.000000000000 0.016526460362 0.024920112337 0.000000000000 0.034862041390 4 0.000000000000 0.113613541825 0.016977010685 0.055116049444 0.095225367059 0.000000000000 0.088645927138 0.0572...
output:
0.57149388324230025678 0.57070854429313225791 0.55505007295122471843 0.56579092894140659833 0.56499793990448942874 0.56332010728049434307 0.59243961882171954775 0.48500193976656885876 0.57039381187307185145 0.50029677980040176803 0.55699079545196364936 0.48642865101084714532 0.43006216229957227765 0...
result:
ok OK
Test #30:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
81 3 0.000000000000 0.018267088323 0.021828432930 0.000000000000 0.065397626776 0.045720726608 6 0.015975080205 0.143941945631 0.000000000000 0.039492133537 0.018991882284 0.000000000000 0.265356466097 0.239413579318 0.222071970974 0.269301144149 0.186580330217 0.282053589632 6 0.013895601825 0.0000...
output:
0.11369231282255104059 0.00000000000898852279 0.14215574550510406221 0.00000000001115606628 0.14622632531571924072 0.06302451805313833883 0.50237879182387637717 0.75295901521036584568 0.55084717419672365757 0.84685141289624561159 0.54544942537770603529 0.89033916417762456205 0.23556997547280001851 0...
result:
ok OK
Test #31:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
95 5 0.047827693957 0.000000000000 0.098857399884 0.086786768459 0.102220020859 0.096330476080 0.001430528120 0.223787762853 0.000000000000 0.223443956666 3 0.041762757505 0.000000000000 0.019205931557 0.054198718204 0.000000000000 0.047533425298 4 0.013367507814 0.039249301738 0.185174533248 0.0000...
output:
0.40996549084078395074 0.22843395802564696556 0.34006820467820791983 0.15597470430595659229 0.33456849983882233862 0.14748101125667440159 0.40278311043307743120 0.00000000000000000000 0.40425437295059986294 0.00000000000000000000 0.79519356077573688074 0.74471693612309860616 0.77780179514953465438 0...
result:
ok OK
Test #32:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
116 5 0.021396819174 0.015342509410 0.001564438290 0.039397972939 0.000000000000 0.014915990992 0.013335003291 0.000226832016 0.023349444489 0.000000000000 4 0.012103646607 0.000000000000 0.016163789301 0.004840038879 0.003320086741 0.012493169256 0.000000000000 0.005575920918 4 0.000000000000 0.054...
output:
0.01529435860117988736 0.07053366356541144387 0.03889455573948977710 0.09090568733057855910 0.01438342534119218650 0.09191533771371055388 0.00000000000000000000 0.07825112246814009618 0.00000000000000000000 0.06823411267053266469 0.64019761633902857046 0.68643712774530449739 0.63720512878353407588 0...
result:
ok OK
Test #33:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
133 6 0.072574557839 0.312677865325 0.001137204536 0.330688379241 0.000000000000 0.013845009228 0.004399538886 0.000000000000 0.108499348680 0.123193399648 0.163704701535 0.244778990085 4 0.003230768068 0.050209672075 0.122105847351 0.000000000000 0.133421862210 0.070986500693 0.000000000000 0.06213...
output:
0.00000000009463887619 0.42588491331940424658 0.00000000007972726545 0.35221216355709613157 0.30750763993107537478 0.42856703092948549987 0.31985702097453397753 0.43621771787515676574 0.17495267683394363199 0.50704225571884555803 0.04356041055263873274 0.53084895948503525942 0.73078829387531079253 0...
result:
ok OK
Test #34:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
138 3 0.118685904723 0.066395606854 0.000000000000 0.031651747666 0.055681967637 0.000000000000 4 0.075000665916 0.000000000000 0.082124079088 0.034173858786 0.019340637052 0.077974103991 0.000000000000 0.064478480978 5 0.030628968215 0.043757686336 0.000000000000 0.024195722398 0.004477590785 0.000...
output:
0.03393863041808163047 0.79956425549034458952 0.12025451782184084853 0.71100327489555705234 0.12211867328900994901 0.77502545516817560484 0.47439311687124140326 0.73025956640716104185 0.45058022950837955874 0.75578488785179519975 0.37859261417408817172 0.72974635272147762133 0.37846643542955798288 0...
result:
ok OK
Test #35:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
148 3 0.026621319141 0.000000000000 0.007296844689 0.016827125239 0.000000000000 0.012235984397 5 0.021570834617 0.000000000000 0.154819739283 0.077564199064 0.050155665830 0.113755864820 0.000000000000 0.119522929551 0.001664388533 0.009536516799 3 0.005288235752 0.016716105247 0.000000000000 0.001...
output:
0.86486479809529587573 0.70230541847964741867 0.88856328143212953035 0.69256019686541923637 0.89400353338991551754 0.69924795996648968970 0.24721453438565082774 0.51717739452248376802 0.17759703935019610684 0.65474512313540612072 0.13533051174740239937 0.55238328656451532710 0.12663241796458771560 0...
result:
ok OK
Test #36:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
154 3 0.056906082314 0.036639142594 0.017316385181 0.066883717906 0.000000000000 0.000000000000 5 0.000062233246 0.085710539368 0.000000000000 0.085546504140 0.016747101114 0.000000000000 0.087129946292 0.060459853042 0.082449394349 0.077583985414 3 0.003341899019 0.029877838968 0.000000000000 0.007...
output:
0.40836755754791449568 0.44887213328376257684 0.45252453775176664931 0.42580181567408289779 0.45821275433567071567 0.49465624987859998319 0.13272582724739684669 0.50563687459537571970 0.13280370173717164715 0.50547966105658210514 0.20689223856505794160 0.45954973096484383934 0.21046957921635773382 0...
result:
ok OK
Test #37:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
157 3 0.022975295316 0.133753786252 0.000000000000 0.000000000000 0.078583822597 0.009635574028 3 0.037772151360 0.047904437968 0.000000000000 0.024531195919 0.050382878792 0.000000000000 3 0.000000000000 0.000000000000 0.020626099645 0.002132947552 0.005061027297 0.032396497109 3 0.011486204366 0.0...
output:
1.00000000000000000000 0.16231579012716779110 1.00000000000000000000 0.29802849993207664297 0.92418172466050887168 0.27522826970916053563 0.75951675215002082396 0.45309721019455069215 0.80391859117363697289 0.45433031873976295519 0.77267971642570931014 0.50085285906199695035 0.93976372634066038166 1...
result:
ok OK
Test #38:
score: 0
Accepted
time: 2ms
memory: 4224kb
input:
165 4 0.090134183082 0.025631923190 0.043091940369 0.042946264434 0.000000000000 0.000000000000 0.087801581797 0.022553046918 3 0.047090776615 0.014149434646 0.000000000000 0.013150413325 0.057969691667 0.000000000000 6 0.000000000000 0.198704670057 0.018044187015 0.071766500734 0.178666873308 0.000...
output:
0.16836651516574281425 0.19603720859335173229 0.21546430465073552435 0.21319987867917408102 0.22062749488418242842 0.27381867469189015294 0.16815893652581755696 0.19989433433681552086 0.63979693358726969025 0.16472438685532277732 0.61184877466263839390 0.20263796885546323076 0.63449998393957895629 0...
result:
ok OK
Test #39:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
141 4 0.070754311340 0.076269199248 0.062424474687 0.079390660730 0.000000000000 0.006608944100 0.027761363879 0.000000000000 3 0.032333140816 0.000000000000 0.018854367463 0.075770826201 0.000000000000 0.004917529209 4 0.043452229407 0.020635378104 0.071652138659 0.000000000000 0.010439540528 0.213...
output:
0.52088366186060084859 0.69343649619309541995 0.51822332435023412084 0.68494813328694873048 0.59431625134986063274 0.62660552637262288537 0.59939407920349007568 0.65468731996391533356 0.59239637571390371245 0.79869497645463293542 0.61197564074811731537 0.72426683786381418237 0.62502181803869926645 0...
result:
ok OK
Test #40:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
150 4 0.104430286936 0.036068594926 0.000000000000 0.072773969166 0.025770678197 0.013811311664 0.091197517141 0.000000000000 3 0.022670063559 0.000000000000 0.104750912415 0.033498179724 0.000000000000 0.018301996997 4 0.000000000000 0.033588192686 0.055509876760 0.000000000000 0.093612013862 0.164...
output:
0.79531020367629605460 1.00000000000000000000 0.79681961512693274174 0.88931716032623305820 0.84329829767403680638 0.93381946256186167864 0.83372959639396905637 1.00000000000000000000 0.93232970706460929848 0.31804660486575741032 0.84937625861071337216 0.34932150179574992862 0.93649894849714822667 0...
result:
ok OK
Test #41:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
151 4 0.082120886773 0.006976355697 0.071345566846 0.031392713209 0.000000000000 0.019517191355 0.053143917683 0.000000000000 3 0.000000000000 0.000000000000 0.091126171335 0.009853756763 0.057587797068 0.021670311143 3 0.007139134362 0.125189875294 0.000000000000 0.053938889174 0.089421404760 0.000...
output:
0.00000000028600729373 0.60116449765256941087 0.00000000027303208872 0.57447618499302734348 0.07006667833916616860 0.55653521108402542359 0.02932686370429996580 0.59584760408914570090 0.84960262093630795353 0.92221174393631375399 0.92134808634309965999 0.97925263984398618159 0.88668721141452580645 0...
result:
ok OK
Test #42:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
160 4 0.040696066791 0.047219823786 0.009305331291 0.057176448200 0.000000000000 0.056984712422 0.032268750605 0.000000000000 4 0.000000000000 0.038789020633 0.016915008366 0.016976583470 0.032763462120 0.000000000000 0.051547223008 0.019191763974 4 0.000000000000 0.000000000000 0.130172492374 0.038...
output:
0.44341810807562287495 0.43197896941548992797 0.43925824022512101853 0.46464712125022336337 0.43517301741678090333 0.47300995017591203050 0.39702984959544815986 0.41977811324068511391 0.12019401435339297326 0.46650489645528612790 0.14726968249819492158 0.47187221588628731466 0.16954337126135112781 0...
result:
ok OK
Test #43:
score: 0
Accepted
time: 2ms
memory: 4224kb
input:
158 3 0.001915550667 0.000000000000 0.034028370155 0.018544352097 0.000000000000 0.005907043128 5 0.136245359655 0.128970898398 0.014463156719 0.152180580927 0.000000000000 0.017124902848 0.038946667270 0.000000000000 0.100028820871 0.046477522374 3 0.000000000000 0.000000000000 0.002176023513 0.001...
output:
0.42386854694660972592 0.73338268184210016703 0.45921099317072812014 0.74460933176382849540 0.42326426986039927233 0.73956308168130290617 0.15722565004156289314 0.51903730689172994161 0.12945365753014600156 0.63986077623034844536 0.00000000000000000000 0.59873937522478138361 0.00000000000000000000 0...
result:
ok OK
Test #44:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
136 3 0.000000000000 0.023909081840 0.004747357667 0.000000000000 0.037644065273 0.052155951394 3 0.019338142325 0.000000000000 0.003097556485 0.018698869165 0.000000000000 0.010189096166 3 0.089777029945 0.000000000000 0.129191001371 0.059173456144 0.000000000000 0.047646040548 3 0.003324443491 0.0...
output:
0.61088875735861354675 0.64501994612798987147 0.60758780559798177174 0.62086864558217411234 0.65568156989638623304 0.65946173409876420477 0.52568872975262502197 0.02165686340242533854 0.51367271508666761585 0.00000000008023528657 0.52272871270133854885 0.00000000007819860395 0.16900779337174600764 0...
result:
ok OK
Test #45:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
147 4 0.000000000000 0.004988602097 0.018122462737 0.000000000000 0.054083088523 0.101958262931 0.041936821245 0.106597694731 3 0.000000000000 0.061781491377 0.042986062660 0.000000000000 0.045863729411 0.002715666325 5 0.039071319391 0.085484407189 0.000000000000 0.067403622352 0.001901523050 0.008...
output:
0.98125010072481548974 0.28765545636399867199 0.99999999991165854920 0.28897874283305249237 0.99999999987204182068 0.39709282142047077106 0.98700216275229128509 0.39742803247714964516 0.99999999978620384078 0.64547926134575430053 0.99606155438304616720 0.57031781571613302580 0.99999999980976072341 0...
result:
ok OK
Test #46:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
152 3 0.000000000000 0.000000000000 0.010639615111 0.022310601976 0.005074044661 0.020707084072 4 0.067107543470 0.119800061582 0.012479352939 0.177432457247 0.000000000000 0.166544695638 0.050115844889 0.000000000000 4 0.000000000000 0.062067256374 0.234459572373 0.000000000000 0.207296942934 0.082...
output:
0.15866514959670102958 0.01849293726246718428 0.14226467127914561113 0.00000000136111950701 0.14805663501699965219 0.00000000141638108733 0.85924108709897495980 0.00000000000000000000 0.93864972828751277084 0.00000000000000000000 0.93933273555790814410 0.01654723833571942527 0.78398304451496959552 0...
result:
ok OK
Test #47:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
141 6 0.328655198005 0.062850413203 0.046943207866 0.145096334586 0.000000000000 0.115104420358 0.129362518690 0.000000000000 0.235511611236 0.013330329888 0.333701001790 0.049138167929 3 0.026067824377 0.000000000000 0.059607653338 0.042772395466 0.000000000000 0.029248826459 3 0.000000000000 0.018...
output:
0.77901972759449710160 0.54108446164263201029 1.00000000000000000000 0.73420037500813734114 1.00000000000000000000 0.78990656576263384037 0.83335424403118001644 0.74286530031713496152 0.78743751554495586189 0.64623724225310409880 0.76474788303033848014 0.54421499823268878310 0.23413518037938588266 0...
result:
ok OK
Test #48:
score: 0
Accepted
time: 2ms
memory: 3968kb
input:
158 4 0.024406826487 0.032172963861 0.015608274423 0.025319045425 0.000000000000 0.000000000000 0.050016028285 0.020714849837 4 0.140172916532 0.134925795210 0.025568500801 0.144618612986 0.000000000000 0.062404706178 0.168463466075 0.000000000000 4 0.046351016861 0.019411868345 0.026866241127 0.033...
output:
0.22042427502983471965 0.22466070893425209603 0.22886051488466702868 0.23195595214163894728 0.24315251336611738080 0.25804064249925671943 0.19426221244989964475 0.23479313585165288784 0.65717230558870579516 0.58412614987507016835 0.57026947836535742440 0.50878677477163961529 0.61132807470456290434 0...
result:
ok OK
Test #49:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
136 4 0.058333638597 0.055267647262 0.018532765770 0.061375091556 0.000000000000 0.000000000000 0.047535755657 0.026462387095 4 0.158436082817 0.000000000000 0.005640697347 0.049039899629 0.000000000000 0.042779928077 0.042276568079 0.026216620864 4 0.050874635669 0.000000000000 0.072532929267 0.025...
output:
0.96013281689955552636 0.52475702574297643634 1.00000000000000000000 0.53041547599295477892 1.00000000000000000000 0.59452760644189322413 0.96214304357185934438 0.55545387049981535837 0.48684888265742714617 0.85366114667916836957 0.42099843393529414725 0.99999999996607664662 0.41257200465611848294 0...
result:
ok OK
Test #50:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
150 4 0.050930453374 0.040675733274 0.000000000000 0.000000000000 0.090489613664 0.027030713833 0.090644214061 0.031734310584 3 0.000000000000 0.038180721417 0.102378163864 0.000000000000 0.075858452362 0.071485422261 4 0.147519116039 0.040480032340 0.000000000000 0.055626082924 0.007378810610 0.023...
output:
0.68793214447765344759 0.03998605846342013814 0.64560525880446584962 0.08955279221417227853 0.67559404008481269632 0.00000000000000000000 0.68030017688821141592 0.00000000000000000000 0.91558113525732232865 0.91729401940348371001 0.98698685514826540576 0.99999999904928643104 0.91074080158887156826 0...
result:
ok OK
Test #51:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
149 3 0.000000000000 0.009457169089 0.013227115495 0.000000000000 0.007993787855 0.013491863341 4 0.106274800461 0.000000000000 0.223840008192 0.168639770258 0.000000000000 0.284066455116 0.056537356181 0.066149676903 4 0.005819735526 0.000000000000 0.028771871972 0.025762444182 0.019086516540 0.033...
output:
0.64747279552515503822 0.56501473127163022924 0.66365498376432050691 0.56342368911643245639 0.65238495924867274381 0.57250138937028537562 0.45886763440023462212 0.79623269935943386259 0.48606758758276222510 0.99999999981754448067 0.23421908380295151540 1.00000000000000000000 0.38434399199374777580 0...
result:
ok OK
Test #52:
score: 0
Accepted
time: 2ms
memory: 4224kb
input:
173 5 0.162419071840 0.123170796359 0.108172711702 0.239725731867 0.046979840194 0.211245680539 0.000000000000 0.112041537218 0.034523915162 0.000000000000 4 0.043748171602 0.119042457148 0.000000000000 0.172557399870 0.031143373054 0.000000000000 0.037209742994 0.001341519136 5 0.014751437295 0.014...
output:
0.99999999969944097891 0.87143981735658582069 0.99999999966348751350 1.00000000000000000000 0.93250421573956896251 1.00000000000000000000 0.84805197167319727400 0.92988305552860198568 0.83207569639325480471 0.81373674517022046015 0.71180967164517357655 0.77241027275015688666 0.64644009997404940760 0...
result:
ok OK
Test #53:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
153 3 0.037995211990 0.073840717347 0.000000000000 0.031362395847 0.034114436013 0.000000000000 4 0.000000000000 0.008168093912 0.009033033279 0.000000000000 0.010332569236 0.000941880086 0.002932149345 0.009706794502 4 0.044746639703 0.000000000000 0.167078713538 0.004539375752 0.104202365982 0.087...
output:
0.92774973150148586364 0.50498986863756909095 0.96094338921135731590 0.45866249886081771921 0.99897703538765022011 0.48513581541389562386 0.54850802860493343637 0.76653757364362492611 0.54273806437897136984 0.77726235658122036346 0.54119788544288097425 0.77681093573417320908 0.54522963008438054584 0...
result:
ok OK
Test #54:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
151 3 0.000000000000 0.007505744932 0.005909417185 0.000000000000 0.021242430501 0.019227332910 5 0.003677449651 0.020790713761 0.031858768117 0.000000000000 0.031996593613 0.000431028732 0.010661229233 0.040388485236 0.000000000000 0.027804418085 4 0.000000000000 0.000092700685 0.000393953272 0.000...
output:
0.35286123401857459543 0.71350630809489360942 0.34473543647912657453 0.71852913921450550382 0.33692943699870831181 0.69520837597606753241 0.39983908614377844029 0.77863826622071391796 0.37194134428659918228 0.79980797301253083186 0.37179770569629271815 0.79937884646934612907 0.39259106557799093953 0...
result:
ok OK
Test #55:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
145 4 0.101131401683 0.004239534871 0.002126395285 0.110398984452 0.000000000000 0.093429526203 0.100428648617 0.000000000000 3 0.000000000000 0.089510657057 0.025031463510 0.000000000000 0.062445965055 0.062590645816 3 0.040123598749 0.062067037262 0.000000000000 0.071414645490 0.036307712564 0.000...
output:
0.07096311286204988622 0.18938256147561129708 0.14411060839027983983 0.31476702593144781025 0.12724775048807352916 0.31191604477288099471 0.06670081500079239410 0.18883453343105060970 0.54099633592374615445 0.00000000006153172194 0.63394111463852120179 0.00000000005976258122 0.58373936941033464503 0...
result:
ok OK
Test #56:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
148 3 0.022473707689 0.010628823145 0.000000000000 0.000000000000 0.017614905907 0.003846837707 4 0.000000000000 0.087683018843 0.103166140069 0.000000000000 0.112110946314 0.008167588666 0.040918392450 0.140222920679 6 0.001360882089 0.113699841394 0.000000000000 0.111893896240 0.000530315798 0.104...
output:
0.10954321048877213623 0.22911935178716600573 0.13239678363902377545 0.23890472930628783182 0.11465095836253125098 0.23571588064082964371 0.68400628856563032995 0.54139362557902558483 0.58741649096094780030 0.44651488587794864631 0.59474817135716853212 0.43687302267975981497 0.73266102251247665594 0...
result:
ok OK
Test #57:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
150 4 0.037812750287 0.118691582975 0.001602217304 0.100272318707 0.000000000000 0.092146832178 0.077894051429 0.000000000000 4 0.000000000000 0.166863616956 0.016468251275 0.000000000000 0.082759596790 0.041741422179 0.156888493136 0.122134882854 5 0.160621142263 0.000000000000 0.088097129596 0.111...
output:
0.04601411542648099873 0.18298217606274322600 0.00646920888340835566 0.19229197521301779133 0.00000000017242140934 0.18712090470305434175 0.00000000017885805383 0.06646220457582581925 0.36865710805489900788 0.99999999973515025473 0.20098281085478636123 0.99999999972875467963 0.23601156743987539953 0...
result:
ok OK
Test #58:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
156 5 0.000000000000 0.016621088768 0.056901538926 0.000000000000 0.074741463499 0.160031560021 0.055981532148 0.169355988143 0.029253608240 0.115581750078 3 0.000000000000 0.000000000000 0.034035228583 0.005898946498 0.016475149241 0.023913417617 4 0.029184342947 0.061591924268 0.000000000000 0.000...
output:
0.16168872971448966864 0.01785038110800644696 0.15124627447146576646 0.07620276624894135493 0.00000000000000000000 0.02094946261820057655 0.00000000000000000003 0.00000000000000000000 0.06005040045693958573 0.00000000001534224343 0.37222941621558315801 0.25237950755807425711 0.39433940923334521834 0...
result:
ok OK
Test #59:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
160 4 0.301116540960 0.000000000000 0.282162133515 0.024002994058 0.045466397780 0.130185785396 0.000000000000 0.112053345874 4 0.075018503604 0.082492555514 0.051596048309 0.096497968422 0.000000000000 0.022819865699 0.062013219697 0.000000000000 3 0.000000000000 0.005320856028 0.024433520492 0.000...
output:
0.97846658864929866742 0.98463463664211479660 0.95072809872752650680 0.97175094685484275441 0.79264118940792971141 0.76606140988863035210 0.79975711388538798521 0.71763267554838008834 0.10740972882267744873 0.30460407607487347144 0.09627375281390587400 0.27968916003716000888 0.17553865658894909457 0...
result:
ok OK
Test #60:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
151 5 0.000000000000 0.080017205009 0.038123286005 0.003287620398 0.053870922825 0.000000000000 0.030379830730 0.085418334516 0.020762689044 0.109049498312 4 0.032386625780 0.033994295628 0.005874752088 0.022289474166 0.000000000000 0.000000000000 0.032924358501 0.026248804149 6 0.263635510998 0.323...
output:
0.48598232051532226278 0.93268077360600932173 0.43298292558649986817 0.99999999990264244770 0.41689577191182899707 0.99999999989061851425 0.45734744285282283619 0.92118511805286956771 0.47159095389151831320 0.90001807503796840487 0.80734123165659969952 0.22526962548088137858 0.81357766462565795371 0...
result:
ok OK
Test #61:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
168 3 0.000000000000 0.001146888301 0.000291100186 0.000000000000 0.000500169700 0.000557039726 3 0.209796982239 0.000000000000 0.246804544500 0.173582948482 0.000000000000 0.093418372480 3 0.005153064521 0.077315638343 0.000000000000 0.000000000000 0.018439012022 0.074752853640 4 0.000000000000 0.0...
output:
0.20245596655796293804 0.29897064656279198852 0.20187811052663244264 0.29793808929959521509 0.20241309079994825485 0.29819847252785664055 0.47804026600019185731 1.00000000000000000000 0.30055618310235382939 1.00000000000000000000 0.43042043703588618044 0.77533554370358124315 0.47501618048360076766 0...
result:
ok OK
Test #62:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
162 4 0.000000000000 0.000000000000 0.250910891552 0.053737344615 0.265536347277 0.114938183410 0.034457838249 0.125482144000 5 0.020476398942 0.000000000000 0.040931873605 0.069430814812 0.021599535739 0.061698637553 0.008901949037 0.053065308412 0.000000000000 0.028630811545 4 0.000000000000 0.038...
output:
0.23154905715996655827 0.31168250817832302485 0.00000000000094373539 0.20109764555961594592 0.00000000000000000000 0.13817351167814957062 0.22720072455888713605 0.18162789240191563205 0.30796766102574731042 0.34817905416665510208 0.37328249985895122669 0.37937258424013749230 0.35460944382537499368 0...
result:
ok OK
Test #63:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
147 3 0.001083556391 0.000000000000 0.152321287992 0.109791901403 0.000000000000 0.017044690253 3 0.003386432280 0.000421260288 0.000000000000 0.002328169275 0.002829614976 0.000000000000 4 0.000000000000 0.000000000000 0.000770412465 0.000236023713 0.061801957545 0.036052266859 0.051636396354 0.050...
output:
0.74814704658249500907 0.67890949827377385122 0.85678570994704448649 0.83097771167994020279 0.74171672738773967808 0.69473183855707028843 0.43031295116004449685 0.71991539095195690586 0.42886090960756263112 0.71631042278931818219 0.43080280878802141775 0.71941785193642014397 0.58937744531936398472 0...
result:
ok OK
Test #64:
score: 0
Accepted
time: 1ms
memory: 4224kb
input:
158 4 0.008787147495 0.022483653147 0.057727560167 0.000000000000 0.069478843787 0.058464505159 0.000000000000 0.042953147789 3 0.053494024620 0.034724045645 0.000000000000 0.000000000000 0.084513534638 0.009737313038 4 0.039433456562 0.053136488521 0.000000000000 0.000000000000 0.148948017168 0.059...
output:
0.48685126308213269580 0.73984490711149561583 0.43567585814950339723 0.72305930069192307196 0.46680700341232702597 0.67219631978506868002 0.50721184627603551980 0.73080826922634941397 1.00000000000000000000 0.90815843095425552580 1.00000000000000000000 0.97193436698491549492 0.96215243719226307018 0...
result:
ok OK
Test #65:
score: 0
Accepted
time: 0ms
memory: 4224kb
input:
157 3 0.012527864086 0.070302721785 0.000000000000 0.000000000000 0.032659044428 0.018927675092 4 0.000000000000 0.000000000000 0.131851381518 0.148916617985 0.113565101275 0.160310174130 0.021268067916 0.059481444005 5 0.000000000000 0.098715729102 0.012723032513 0.050579865256 0.090130202082 0.000...
output:
0.95371508105079148582 0.53222166309715425789 0.89412361477813811963 0.57156981697729736036 0.89856811316435059337 0.53408493334806958491 0.54470330680742542426 0.34981301541478783783 0.58446400499556620361 0.54469768076526360422 0.56293096420728885285 0.54542522528946819731 0.53339159152803173540 0...
result:
ok OK
Extra Test:
score: 0
Extra Test Passed