QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#735628#9290. Spectacular EndingN_z_AC ✓238ms15300kbC++237.0kb2024-11-11 21:01:332024-11-11 21:01:33

Judging History

This is the latest submission verdict.

  • [2024-11-11 21:01:33]
  • Judged
  • Verdict: AC
  • Time: 238ms
  • Memory: 15300kb
  • [2024-11-11 21:01:33]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
struct time_helper{
#ifdef LOCAL
clock_t time_last;time_helper(){time_last=clock();}void test(){auto time_now=clock();std::cerr<<"time:"<<1.*(time_now-time_last)/CLOCKS_PER_SEC<<";all_time:"<<1.*time_now/CLOCKS_PER_SEC<<std::endl;time_last=time_now;}~time_helper(){test();}
#else
void test(){}
#endif
}time_helper;
#ifdef LOCAL
#include"dbg.h"
#else
#define dbg(...) (__VA_ARGS__)
#endif
namespace Fread{const int SIZE=1<<16;char buf[SIZE],*S,*T;inline char getchar(){if(S==T){T=(S=buf)+fread(buf,1,SIZE,stdin);if(S==T)return'\n';}return *S++;}}namespace Fwrite{const int SIZE=1<<16;char buf[SIZE],*S=buf,*T=buf+SIZE;inline void flush(){fwrite(buf,1,S-buf,stdout);S=buf;}inline void putchar(char c){*S++=c;if(S==T)flush();}struct NTR{~NTR(){flush();}}ztr;}
#define getchar Fread::getchar
#define putchar Fwrite::putchar
int print_precision=10;bool print_T_endl=1;char print_between=' ';
template<typename T>struct is_char{static constexpr bool value=(std::is_same<T,char>::value||std::is_same<T,signed char>::value||std::is_same<T,unsigned char>::value);};template<typename T>struct is_integral_ex{static constexpr bool value=(std::is_integral<T>::value||std::is_same<T,__int128>::value)&&!is_char<T>::value;};template<typename T>struct is_floating_point_ex{static constexpr bool value=std::is_floating_point<T>::value||std::is_same<T,__float128>::value;};namespace Fastio{struct Reader;struct Writer;template<size_t id>struct read_tuple{template<typename...T>static void read(Reader&stream,std::tuple<T...>&x){read_tuple<id-1>::read(stream,x);stream>>get<id-1>(x);}};template<>struct read_tuple<0>{template<typename...T>static void read([[maybe_unused]]Reader&stream,[[maybe_unused]]std::tuple<T...>&x){}};template<size_t id>struct print_tuple{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){print_tuple<id-1>::print(stream,x);putchar(print_between);stream<<get<id-1>(x);}};template<>struct print_tuple<1>{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){stream<<get<0>(x);}};template<>struct print_tuple<0>{template<typename...T>static void print([[maybe_unused]]Writer&stream,[[maybe_unused]]const std::tuple<T...>&x){}};
struct Reader{template<typename T>typename std::enable_if_t<std::is_class<T>::value,Reader&>operator>>(T&x){for(auto &y:x)*this>>y;return *this;}template<typename...T>Reader&operator>>(std::tuple<T...>&x){read_tuple<sizeof...(T)>::read(*this,x);return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1;while(c<'0'||c>'9'){if(c=='-')f*=-1;c=getchar();}x=0;while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=getchar();}x*=f;return *this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1,s=0;x=0;T t=0;while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else return x*=f,*this;while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Reader&>operator>>(T&c){c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();return *this;}Reader&operator>>(char*str){int len=0;char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str[len++]=c,c=getchar();str[len]='\0';return*this;}template<typename T1,typename T2>Reader&operator>>(std::pair<T1,T2>&x){*this>>x.first>>x.second;return *this;}Reader&operator>>(std::string&str){str.clear();char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str.push_back(c),c=getchar();return*this;}Reader(){}}cin;const char endl='\n';
struct Writer{typedef __int128 mxdouble;template<typename T>typename std::enable_if_t<std::is_class<T>::value,Writer&>operator<<(const T&x){for(auto q:x){*this<<q;if(!is_class<decltype(q)>::value)*this<<print_between;}if(!is_class<typename T::value_type>::value&&print_T_endl)*this<<'\n';return *this;}template<typename...T>Writer&operator<<(const std::tuple<T...>&x){print_tuple<sizeof...(T)>::print(*this,x);if(print_T_endl)*this<<'\n';return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Writer&>operator<<(T x){if(x==0)return putchar('0'),*this;if(x<0)putchar('-'),x=-x;static int sta[45];int top=0;while(x)sta[++top]=x%10,x/=10;while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Writer&>operator<<(T x){if(x<0)putchar('-'),x=-x;x+=pow(10,-print_precision)/2;mxdouble _=x;x-=(T)_;static int sta[45];int top=0;while(_)sta[++top]=_%10,_/=10;if(!top)putchar('0');while(top)putchar(sta[top]+'0'),--top;putchar('.');for(int i=0;i<print_precision;i++)x*=10;_=x;while(_)sta[++top]=_%10,_/=10;for(int i=0;i<print_precision-top;i++)putchar('0');while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Writer&>operator<<(const T&c){putchar(c);return*this;}Writer&operator<<(char*str){int cur=0;while(str[cur])putchar(str[cur++]);return *this;}Writer&operator<<(const char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}template<typename T1,typename T2>Writer&operator<<(const std::pair<T1,T2>&x){*this<<x.first<<print_between<<x.second;if(print_T_endl)*this<<'\n';return *this;}Writer&operator<<(const std::string&str){int st=0,ed=str.size();while(st<ed)putchar(str[st++]);return*this;}Writer(){}}cout;}
#define cin Fastio::cin
#define cout Fastio::cout
#define endl Fastio::endl
template<class Fun>class y_combinator_result{Fun fun_;public:template<class T>explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}template<class ...Args>decltype(auto) operator()(Args &&...args){return fun_(std::ref(*this), std::forward<Args>(args)...);}};template<class Fun>decltype(auto) y_combinator(Fun &&fun){return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));}

void init();void solve(int tc);
main()
{
	init();int t=1;
	// cin>>t;
	for(int tc=1;tc<=t;tc++)solve(tc);
}
void init()
{
}
void solve([[maybe_unused]]int tc)
{
	int n,k,s;
	cin>>n>>k>>s;
	vector<vector<int>>sp(n,vector<int>(n));
	vector<vector<double>>np(n);
	s--;
	for(int x=0;x<n;x++)
	{
		int sum=0;
		for(int y=0;y<n;y++)
		cin>>sp[x][y],sum+=sp[x][y];
		int q;
		cin>>q;
		while(sum--)
		{
			int p;
			cin>>p;
			np[x].emplace_back(1.*p/q);
		}
		sort(np[x].begin(),np[x].end());
		np[x].emplace_back(0);
		reverse(np[x].begin(),np[x].end());
		for(int y=1;y<np[x].size();y++)
		np[x][y]+=np[x][y-1];
	}
	vector<double>pr(n);
	pr[s]=1;
	vector<int>rnk(n);
	for(int x=0;x<n;x++)
	rnk[x]=x;
	while(k--)
	{
		sort(rnk.begin(),rnk.end(),[&](auto u,auto v){return pr[u]>pr[v];});
		vector<double>npr(n);
		for(int x=0;x<n;x++)
		{
			int now=0;
			for(int y=0;y<n;y++)
			npr[x]+=pr[rnk[y]]*(np[x][now+sp[x][rnk[y]]]-np[x][now]),now+=sp[x][rnk[y]];
		}
		pr=move(npr);
	}
	cout<<pr[0]<<endl;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3840kb

input:

2 1 2
1 1 3 1 2
1 1 3 2 1

output:

0.6666666667

result:

ok ok, delta = 0.0000000000

Test #2:

score: 0
Accepted
time: 0ms
memory: 3996kb

input:

3 3 3
1 1 0 3 2 1
0 1 1 3 2 1
1 0 1 3 2 1

output:

0.5925925926

result:

ok ok, delta = 0.0000000000

Test #3:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

2 2 2
2 1 4 1 2 1
2 1 4 1 1 2

output:

0.5000000000

result:

ok ok, delta = 0.0000000000

Test #4:

score: 0
Accepted
time: 0ms
memory: 3872kb

input:

4 3 4
0 2 0 0 2 1 1
2 0 0 0 2 1 1
0 0 0 2 2 1 1
0 0 2 0 2 1 1

output:

0.0000000000

result:

ok ok, delta = 0.0000000000

Test #5:

score: 0
Accepted
time: 0ms
memory: 3876kb

input:

6 8 5
5 1 0 0 0 0 7 2 1 1 1 1 1
4 1 1 0 0 0 7 1 2 1 1 1 1
0 4 1 1 0 0 7 1 1 2 1 1 1
0 0 4 1 1 0 7 1 1 1 2 1 1
0 0 0 4 1 1 7 1 1 1 1 2 1
0 0 0 0 5 1 7 1 1 1 1 1 2

output:

0.0214071570

result:

ok ok, delta = 0.0000000000

Test #6:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

4 4 1
1 2 0 0 4 2 1 1
0 0 2 1 4 2 1 1
1 0 0 2 4 1 2 1
2 1 0 0 4 1 2 1

output:

0.5898437500

result:

ok ok, delta = 0.0000000000

Test #7:

score: 0
Accepted
time: 1ms
memory: 3904kb

input:

10 7 10
0 2 1 2 0 0 0 0 0 0 33 8 2 7 8 8
3 0 0 4 0 0 0 0 0 0 42 2 5 5 7 6 8 9
1 1 0 1 2 1 0 0 0 0 34 1 10 10 3 7 3
0 1 1 2 1 0 2 0 0 0 44 8 9 4 10 2 2 9
0 2 0 0 0 5 2 0 0 0 56 5 9 2 6 9 5 9 3 8
0 3 0 2 0 0 0 1 2 0 33 4 4 1 1 5 5 8 5
0 0 2 0 0 0 0 1 0 0 24 5 9 10
0 0 0 0 1 1 0 1 1 0 26 10 4 9 3
0 0 0...

output:

0.0633046445

result:

ok ok, delta = 0.0000000000

Test #8:

score: 0
Accepted
time: 1ms
memory: 3784kb

input:

30 25 30
1 0 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26 7 5 4 10
1 1 1 0 2 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 2 7 6 10 2 10 7 8 7
0 0 2 4 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 1 9 3 1 6 10 6 1 6 1 7 8
2 5 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0935733951

result:

ok ok, delta = 0.0000000000

Test #9:

score: 0
Accepted
time: 1ms
memory: 4076kb

input:

30 25 30
1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 2 0 0 0 0 0 0 0 0 0 1 31 6 5 8 3 5 2 2
0 1 1 0 0 0 0 2 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 1 0 2 0 0 0 0 69 5 8 10 5 8 3 8 7 3 1 10 1
2 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 28 5 3 1 8 4 7
0 2 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 ...

output:

0.1118940708

result:

ok ok, delta = 0.0000000000

Test #10:

score: 0
Accepted
time: 2ms
memory: 4304kb

input:

100 100 100
113 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 1 1080 6 9 10 8 7 6 10 10 1 4 3 3 3 10 1 3 7 4 9 3 2 3 5 1 6 3 3 7 1 5 7 3 8 2 7 3 2 8 2...

output:

0.0707306157

result:

ok ok, delta = 0.0000000000

Test #11:

score: 0
Accepted
time: 0ms
memory: 4172kb

input:

100 100 100
0 120 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1036 4 6 3 3 1 3 5 3 4 7 8 6 2 2 8 4 8 5 3 3 9 5 5 6 7 4 7 6 9 7 2 2 7 3 5 10 6 9 4 8 ...

output:

0.0672379445

result:

ok ok, delta = 0.0000000000

Test #12:

score: 0
Accepted
time: 3ms
memory: 4248kb

input:

100 100 100
1 182 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1154 1 10 1 2 2 8 7 10 3 4 10 10 6 3 1 5 9 3 1 6 5 10 7 8 8 7 1 6 6 6 7 7 1 4 9 3 1 6 ...

output:

0.1033449559

result:

ok ok, delta = 0.0000000000

Test #13:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

100 100 100
2 1 0 1 1 0 3 2 1 0 4 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 92 8 7 3 9 10 4 10 1 1 4 2 1 10 9 4 5 4
1 2 0 2 0 1 1 0 0 0 0 3 4 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0414884465

result:

ok ok, delta = 0.0000000000

Test #14:

score: 0
Accepted
time: 2ms
memory: 4152kb

input:

100 100 100
0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 61 6 4 4 4 7 5 4 10 7 3 5 2
2 0 0 0 2 0 0 1 0 0 4 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0441792999

result:

ok ok, delta = 0.0000000000

Test #15:

score: 0
Accepted
time: 208ms
memory: 15244kb

input:

1000 100 1000
467 0 0 1 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 ...

output:

0.0030750159

result:

ok ok, delta = 0.0000000000

Test #16:

score: 0
Accepted
time: 238ms
memory: 15168kb

input:

1000 100 1000
0 187 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 ...

output:

0.0015916681

result:

ok ok, delta = 0.0000000000

Test #17:

score: 0
Accepted
time: 209ms
memory: 15192kb

input:

1000 100 1000
0 889 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0125979979

result:

ok ok, delta = 0.0000000000

Test #18:

score: 0
Accepted
time: 185ms
memory: 15188kb

input:

1000 100 1000
0 986 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0047325202

result:

ok ok, delta = 0.0000000000

Test #19:

score: 0
Accepted
time: 226ms
memory: 15280kb

input:

1000 100 1000
5 1 1 0 0 0 0 1 0 1 3 3 1 0 0 0 1 0 0 1 0 5 0 0 3 0 0 0 1 0 0 0 0 0 0 2 0 3 2 0 0 1 0 4 0 4 1 2 0 0 0 1 3 3 1 0 1 1 2 2 2 0 3 0 0 0 5 3 0 1 1 0 0 0 0 2 0 0 1 0 0 0 3 5 4 1 2 0 0 1 0 0 0 0 0 0 1 0 2 3 0 0 4 0 3 1 0 3 0 2 0 0 0 2 7 1 1 1 1 1 1 0 0 0 4 1 0 1 0 3 1 0 1 0 1 0 6 1 0 1 0 6 0 ...

output:

0.0029730695

result:

ok ok, delta = 0.0000000000

Test #20:

score: 0
Accepted
time: 227ms
memory: 15272kb

input:

1000 100 1000
2 1 0 0 1 1 2 0 2 2 1 1 0 2 2 0 1 3 1 1 1 6 0 1 1 1 2 1 1 1 1 1 0 1 2 0 1 1 0 1 1 3 2 1 2 1 0 3 0 2 1 1 3 0 2 1 0 1 2 1 2 1 0 1 1 1 0 5 1 1 1 1 1 1 0 2 1 0 1 0 1 1 1 1 4 1 1 1 1 1 1 1 0 0 1 2 1 2 3 0 0 0 1 1 1 2 1 1 1 1 0 1 1 1 1 1 1 1 1 0 2 1 1 1 2 1 2 0 1 0 0 1 1 2 1 1 1 0 1 1 0 1 0 ...

output:

0.0014904623

result:

ok ok, delta = 0.0000000000

Test #21:

score: 0
Accepted
time: 220ms
memory: 15260kb

input:

1000 100 1000
2 2 3 1 2 1 4 2 1 1 1 1 2 1 1 3 1 1 1 1 2 2 4 4 1 2 1 10 3 1 1 5 6 1 2 1 1 1 1 3 1 1 1 1 2 2 2 2 1 2 1 1 1 1 1 1 2 2 5 2 1 1 1 2 1 2 2 2 2 3 4 1 9 1 6 3 1 1 2 2 3 2 2 1 1 2 1 3 5 2 1 1 5 3 2 3 1 3 4 2 4 2 1 2 2 4 2 1 4 1 2 1 2 1 3 1 1 5 10 1 3 1 1 1 1 1 3 3 1 1 2 2 4 3 1 1 3 1 2 1 1 1 ...

output:

0.0013838742

result:

ok ok, delta = 0.0000000000

Test #22:

score: 0
Accepted
time: 225ms
memory: 15128kb

input:

1000 100 1000
1 1 1 0 0 0 5 3 1 1 1 1 1 1 1 0 4 1 2 2 1 0 2 1 2 1 3 0 1 1 3 0 1 1 1 1 1 3 0 0 2 2 0 2 5 1 2 0 1 1 0 2 1 2 1 0 1 1 2 1 6 2 0 1 0 1 2 1 1 2 0 1 1 1 2 0 1 1 2 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 2 1 2 5 2 1 1 1 0 3 2 4 1 0 1 1 4 10 1 2 1 0 1 2 1 1 1 3 0 0 1 2 3 1 1 2 0 3 5 1 1 1 1 1 1 2 1 1...

output:

0.0019399345

result:

ok ok, delta = 0.0000000000

Test #23:

score: 0
Accepted
time: 190ms
memory: 15248kb

input:

1000 100 1000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 21 0 0 0 0 3 0 0 0 0 0 5 10 22 0 0 0 0 0 0 0 5 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 4 4 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 2 3 0 0 0 0 0 0 0 ...

output:

0.0018281578

result:

ok ok, delta = 0.0000000000

Test #24:

score: 0
Accepted
time: 213ms
memory: 15192kb

input:

1000 100 1000
1 1 1 0 1 1 1 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 ...

output:

0.0021905577

result:

ok ok, delta = 0.0000000000

Test #25:

score: 0
Accepted
time: 206ms
memory: 15168kb

input:

1000 100 1000
9 26 4 2 9 24 26 4 13 1 3 9 16 10 4 5 4 15 34 10 4 3 3 4 5 3 3 1 5 9 9 8 4 16 2 17 6 2 6 13 3 8 24 4 3 2 3 5 11 2 4 18 14 7 8 2 19 17 1 5 2 8 15 2 9 13 2 7 2 1 19 17 5 19 15 3 2 24 11 3 1 24 3 8 1 4 6 20 4 4 8 11 58 34 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.7137041553

result:

ok ok, delta = 0.0000000000

Test #26:

score: 0
Accepted
time: 183ms
memory: 15168kb

input:

1000 100 1000
1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 2 1 2 1 1 0 1 0 1 1 1 1 0 1 2 0 1 2 3 2 0 0 1 1 2 1 1 1 4 1 1 0 1 2 1 1 1 0 2 1 1 2 6 1 1 1 1 1 0 1 0 1 2 1 1 1 3 1 1 0 0 1 4 0 1 0 1 1 0 1 3 1 0 2 1 1 2 0 2 0 0 1 1 0 0 1 2 1 1 0 0 0 2 0 1 2 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 1 0 3 1 1 0 2 2 1 1 1 0 1 1 ...

output:

0.9849087055

result:

ok ok, delta = 0.0000000000

Test #27:

score: 0
Accepted
time: 221ms
memory: 15120kb

input:

1000 100 1000
1 2 0 3 1 2 1 1 2 3 1 0 2 1 1 1 1 0 1 4 1 1 1 5 1 1 3 1 0 4 1 2 0 1 5 1 2 1 2 2 1 1 2 1 0 1 2 1 1 2 0 2 2 1 1 1 0 2 2 1 1 2 1 1 1 1 1 1 7 2 3 0 2 4 1 3 1 1 0 3 3 2 1 1 1 1 1 1 1 1 1 1 2 1 0 2 1 0 2 3 0 1 0 1 0 4 1 1 1 1 2 2 1 3 2 1 1 3 1 3 2 0 1 2 2 1 5 2 2 7 1 1 2 1 1 1 1 0 1 2 1 1 0 ...

output:

0.0016510991

result:

ok ok, delta = 0.0000000000

Test #28:

score: 0
Accepted
time: 198ms
memory: 15176kb

input:

1000 100 1000
0 1 0 4 6 4 0 0 0 0 3 0 1 0 2 0 0 2 0 2 3 0 2 3 0 0 2 0 0 4 0 0 0 5 0 3 0 2 0 1 0 2 0 1 1 1 1 5 3 0 0 1 4 1 0 4 4 0 0 0 0 2 0 3 2 1 5 1 1 0 0 0 0 0 0 2 0 0 2 0 0 2 0 0 6 3 1 0 0 1 0 0 2 1 0 1 0 0 0 0 2 4 0 0 4 2 0 0 3 1 1 0 3 4 2 0 0 0 0 2 1 2 2 0 7 0 0 3 0 7 1 0 0 2 7 0 0 0 4 1 1 1 3 ...

output:

0.0029321508

result:

ok ok, delta = 0.0000000000

Test #29:

score: 0
Accepted
time: 160ms
memory: 11400kb

input:

1000 100 1000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.0609311909

result:

ok ok, delta = 0.0000000000

Test #30:

score: 0
Accepted
time: 203ms
memory: 15188kb

input:

1000 100 1000
1 2 1 1 0 2 1 0 2 2 1 7 1 1 0 2 4 1 3 1 2 1 0 1 0 0 1 1 0 0 0 0 1 1 2 2 1 0 1 5 1 1 4 1 0 0 1 4 0 2 1 2 0 0 4 3 1 2 2 1 3 0 0 2 1 1 1 1 1 1 2 3 1 2 4 2 2 0 0 0 0 0 1 0 0 2 0 0 6 1 1 1 0 1 1 1 0 5 0 1 1 1 0 5 1 0 1 0 1 1 5 0 0 1 0 0 1 0 3 2 1 1 2 3 1 5 1 1 0 0 1 3 1 5 1 1 5 0 1 1 6 3 3 ...

output:

0.0007406409

result:

ok ok, delta = 0.0000000000

Test #31:

score: 0
Accepted
time: 159ms
memory: 9648kb

input:

1000 100 1000
217 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0.2520257260

result:

ok ok, delta = 0.0000000000

Test #32:

score: 0
Accepted
time: 195ms
memory: 15300kb

input:

1000 100 1000
0 0 1 0 0 1 1 0 0 0 0 0 0 458 1 1 0 1 1 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 ...

output:

0.0030200452

result:

ok ok, delta = 0.0000000000

Extra Test:

score: 0
Extra Test Passed