QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#725872#8579. 경찰과 도둑TheZone100 ✓1872ms70592kbC++2014.0kb2024-11-08 20:25:422024-11-08 20:25:43

Judging History

你现在查看的是最新测评结果

  • [2024-11-08 20:25:43]
  • 评测
  • 测评结果:100
  • 用时:1872ms
  • 内存:70592kb
  • [2024-11-08 20:25:42]
  • 提交

answer

#include<bits/stdc++.h>
#define reg register
#define int long long
const int N=2e5+10;
int n,q,Fa[20][N],dep[N],dis[N];
std::vector<std::pair<int,int>> G[N];
#define ll __int128
struct Node{
	int x,y;
	inline bool operator<(const Node &A)const{return x!=A.x?x<A.x:y<A.y;}
	inline bool operator>(const Node &A)const{return x!=A.x?x>A.x:y>A.y;}
	inline Node operator+(const int &A)const{return {x+A,y};}
}f1[N],f2[N],g[N];
struct Fac{
	int x,y;
	inline bool operator<(const Fac &A)const{return (ll)x*A.y<y*A.x;}
	inline bool operator>(const Fac &A)const{return (ll)x*A.y>y*A.x;}
	inline void prt(){std::cerr<<"Fac "<<x<<" "<<y<<"\n";}
};
#define mp std::make_pair
inline void add(reg int u,reg int v,reg int w){G[u].push_back({v,w}),G[v].push_back({u,w});}
void dfs1(reg int u,reg int fa=0){
	f1[u]=f2[u]={0,-1},dep[u]=dep[Fa[0][u]=fa]+1;
	for (reg int j=1;j<19;j++) Fa[j][u]=Fa[j-1][Fa[j-1][u]];
	for (auto [v,w]:G[u]) if (v^fa){
		dis[v]=dis[u]+w,dfs1(v,u); reg Node F=f1[v]+w; F.y=v;
		if (F>f1[u]) f2[u]=f1[u],f1[u]=F; else f2[u]=std::max(f2[u],F);
	}  
}
void dfs2(reg int u,reg int fa=0){
	for (auto [v,w]:G[u]) if (v^fa){
		g[v]=std::max(g[u],f1[u].y==v?f2[u]:f1[u])+w;
		g[v].y=u,dfs2(v,u);
	}
}
inline int LCA(reg int x,reg int y){
	if (dep[x]<dep[y]) std::swap(x,y);
	for (reg int i=18;i>=0;i--) if (dep[Fa[i][x]]>=dep[y]) x=Fa[i][x];
	if (x==y) return x;
	for (reg int i=18;i>=0;i--) if (Fa[i][x]^Fa[i][y]) x=Fa[i][x],y=Fa[i][y];
	return Fa[0][x]; 
}
inline int jump(reg int x,reg int d){
	// std::cerr<<"jump "<<x<<" "<<d<<"\n";
	for (reg int i=18;i>=0;i--) if (d>>i&1) x=Fa[i][x]; return x;}
inline int get(reg int u,reg int ban){
	// std::cerr<<"get "<<u<<" "<<ban<<"\n";
	Node res=f1[u].y==ban?f2[u]:f1[u];
	if (g[u].y!=ban) res=std::max(res,g[u]); return res.x;
}
inline Fac query(reg int x,reg int y,reg int v1,reg int v2){
	reg int p=LCA(x,y),D=dep[x]+dep[y]-dep[p]-dep[p];
	reg Fac val,ans={0,1};
	// std::cerr<<x<<" "<<y<<" "<<v1<<" "<<v2<<"\n";
	auto check=[&](reg int d)->bool {
		reg int u,d1,d2;
		if (d<=dep[x]-dep[p]){
			u=jump(x,d),d2=dis[x]-dis[u],d1=dis[y]+dis[u]-dis[p]-dis[p];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(x,d),d==dep[x]-dep[p]?jump(y,dep[y]-dep[p]-1):jump(x,d+1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			// std::cerr<<"<< "<<d<<" "<<mxd<<"\n"; 
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}else{
			u=jump(y,D-d),d2=dis[x]+dis[u]-dis[p]-dis[p],d1=dis[y]-dis[u];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(y,D-d),jump(y,D-d-1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}
	};
	reg int L=0,R=D-1,nw=-1;
	while (L<=R){
		reg int mid=L+R>>1;
		if (check(mid)) L=mid+1,nw=mid;
		else R=mid-1;
	}
	// std::cerr<<nw<<"\n";
	if (nw>-1) check(nw),val.prt(),ans=std::max(ans,val);
	if (nw+1<D) check(nw+1),val.prt(),ans=std::max(ans,val);
	return ans;
}
#undef int
std::vector<std::array<long long, 2>> police_thief(std::vector<int> A, std::vector<int> B, std::vector<int> D, std::vector<int> P, std::vector<int> V1, std::vector<int> T, std::vector<int> V2){
	n=A.size()+1,q=P.size(); std::vector<std::array<long long, 2>> C(q);
	for (reg int i=1;i<n;i++) add(A[i-1]+1,B[i-1]+1,D[i-1]);
	dfs1(1),dfs2(1); 
	for (reg int i=0;i<q;i++){
		auto [x,y]=query(T[i]+1,P[i]+1,V1[i],V2[i]);
		reg long long g=std::__gcd(x,y); C[i][0]=x/g,C[i][1]=y/g;
	}	
	return C;
}
/*#include<bits/stdc++.h>
#define reg register
#define int long long
const int N=2e5+10;
int n,q,Fa[20][N],dep[N],dis[N];
std::vector<std::pair<int,int>> G[N];
#define ll __int128
struct Node{
	int x,y;
	inline bool operator<(const Node &A)const{return x!=A.x?x<A.x:y<A.y;}
	inline bool operator>(const Node &A)const{return x!=A.x?x>A.x:y>A.y;}
	inline Node operator+(const int &A)const{return {x+A,y};}
}f1[N],f2[N],g[N];
struct Fac{
	int x,y;
	inline bool operator<(const Fac &A)const{return (ll)x*A.y<y*A.x;}
	inline bool operator>(const Fac &A)const{return (ll)x*A.y>y*A.x;}
	inline void prt(){std::cerr<<"Fac "<<x<<" "<<y<<"\n";}
};
#define mp std::make_pair
inline void add(reg int u,reg int v,reg int w){G[u].push_back({v,w}),G[v].push_back({u,w});}
void dfs1(reg int u,reg int fa=0){
	f1[u]=f2[u]={0,-1},dep[u]=dep[Fa[0][u]=fa]+1;
	for (reg int j=1;j<19;j++) Fa[j][u]=Fa[j-1][Fa[j-1][u]];
	for (auto [v,w]:G[u]) if (v^fa){
		dis[v]=dis[u]+w,dfs1(v,u); reg Node F=f1[v]+w; F.y=v;
		if (F>f1[u]) f2[u]=f1[u],f1[u]=F; else f2[u]=std::max(f2[u],F);
	}  
}
void dfs2(reg int u,reg int fa=0){
	for (auto [v,w]:G[u]) if (v^fa){
		g[v]=std::max(g[u],f1[u].y==v?f2[u]:f1[u])+w;
		g[v].y=u,dfs2(v,u);
	}
}
inline int LCA(reg int x,reg int y){
	if (dep[x]<dep[y]) std::swap(x,y);
	for (reg int i=18;i>=0;i--) if (dep[Fa[i][x]]>=dep[y]) x=Fa[i][x];
	if (x==y) return x;
	for (reg int i=18;i>=0;i--) if (Fa[i][x]^Fa[i][y]) x=Fa[i][x],y=Fa[i][y];
	return Fa[0][x]; 
}
inline int jump(reg int x,reg int d){
	// std::cerr<<"jump "<<x<<" "<<d<<"\n";
	for (reg int i=18;i>=0;i--) if (d>>i&1) x=Fa[i][x]; return x;}
inline int get(reg int u,reg int ban){
	// std::cerr<<"get "<<u<<" "<<ban<<"\n";
	Node res=f1[u].y==ban?f2[u]:f1[u];
	if (g[u].y!=ban) res=std::max(res,g[u]); return res.x;
}
inline Fac query(reg int x,reg int y,reg int v1,reg int v2){
	reg int p=LCA(x,y),D=dep[x]+dep[y]-dep[p]-dep[p];
	reg Fac val,ans={0,1};
	// std::cerr<<x<<" "<<y<<" "<<v1<<" "<<v2<<"\n";
	auto check=[&](reg int d)->bool {
		reg int u,d1,d2;
		if (d<=dep[x]-dep[p]){
			u=jump(x,d),d2=dis[x]-dis[u],d1=dis[y]+dis[u]-dis[p]-dis[p];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(x,d),d==dep[x]-dep[p]?jump(y,dep[y]-dep[p]-1):jump(x,d+1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			// std::cerr<<"<< "<<d<<" "<<mxd<<"\n"; 
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}else{
			u=jump(y,D-d),d2=dis[x]+dis[u]-dis[p]-dis[p],d1=dis[y]-dis[u];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(y,D-d),jump(y,D-d-1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}
	};
	reg int L=0,R=D-1,nw=-1;
	while (L<=R){
		reg int mid=L+R>>1;
		if (check(mid)) L=mid+1,nw=mid;
		else R=mid-1;
	}
	// std::cerr<<nw<<"\n";
	if (nw>-1) check(nw),val.prt(),ans=std::max(ans,val);
	if (nw+1<D) check(nw+1),val.prt(),ans=std::max(ans,val);
	return ans;
}
#undef int
std::vector<std::array<long long, 2>> police_thief(std::vector<int> A, std::vector<int> B, std::vector<int> D, std::vector<int> P, std::vector<int> V1, std::vector<int> T, std::vector<int> V2){
	n=A.size()+1,q=P.size(); std::vector<std::array<long long, 2>> C(q);
	for (reg int i=1;i<n;i++) add(A[i-1]+1,B[i-1]+1,D[i-1]);
	dfs1(1),dfs2(1); 
	for (reg int i=0;i<q;i++){
		auto [x,y]=query(T[i]+1,P[i]+1,V1[i],V2[i]);
		reg long long g=std::__gcd(x,y); C[i][0]=x/g,C[i][1]=y/g;
	}	
	return C;
}#include<bits/stdc++.h>
#define reg register
#define int long long
const int N=2e5+10;
int n,q,Fa[20][N],dep[N],dis[N];
std::vector<std::pair<int,int>> G[N];
#define ll __int128
struct Node{
	int x,y;
	inline bool operator<(const Node &A)const{return x!=A.x?x<A.x:y<A.y;}
	inline bool operator>(const Node &A)const{return x!=A.x?x>A.x:y>A.y;}
	inline Node operator+(const int &A)const{return {x+A,y};}
}f1[N],f2[N],g[N];
struct Fac{
	int x,y;
	inline bool operator<(const Fac &A)const{return (ll)x*A.y<y*A.x;}
	inline bool operator>(const Fac &A)const{return (ll)x*A.y>y*A.x;}
	inline void prt(){std::cerr<<"Fac "<<x<<" "<<y<<"\n";}
};
#define mp std::make_pair
inline void add(reg int u,reg int v,reg int w){G[u].push_back({v,w}),G[v].push_back({u,w});}
void dfs1(reg int u,reg int fa=0){
	f1[u]=f2[u]={0,-1},dep[u]=dep[Fa[0][u]=fa]+1;
	for (reg int j=1;j<19;j++) Fa[j][u]=Fa[j-1][Fa[j-1][u]];
	for (auto [v,w]:G[u]) if (v^fa){
		dis[v]=dis[u]+w,dfs1(v,u); reg Node F=f1[v]+w; F.y=v;
		if (F>f1[u]) f2[u]=f1[u],f1[u]=F; else f2[u]=std::max(f2[u],F);
	}  
}
void dfs2(reg int u,reg int fa=0){
	for (auto [v,w]:G[u]) if (v^fa){
		g[v]=std::max(g[u],f1[u].y==v?f2[u]:f1[u])+w;
		g[v].y=u,dfs2(v,u);
	}
}
inline int LCA(reg int x,reg int y){
	if (dep[x]<dep[y]) std::swap(x,y);
	for (reg int i=18;i>=0;i--) if (dep[Fa[i][x]]>=dep[y]) x=Fa[i][x];
	if (x==y) return x;
	for (reg int i=18;i>=0;i--) if (Fa[i][x]^Fa[i][y]) x=Fa[i][x],y=Fa[i][y];
	return Fa[0][x]; 
}
inline int jump(reg int x,reg int d){
	// std::cerr<<"jump "<<x<<" "<<d<<"\n";
	for (reg int i=18;i>=0;i--) if (d>>i&1) x=Fa[i][x]; return x;}
inline int get(reg int u,reg int ban){
	// std::cerr<<"get "<<u<<" "<<ban<<"\n";
	Node res=f1[u].y==ban?f2[u]:f1[u];
	if (g[u].y!=ban) res=std::max(res,g[u]); return res.x;
}
inline Fac query(reg int x,reg int y,reg int v1,reg int v2){
	reg int p=LCA(x,y),D=dep[x]+dep[y]-dep[p]-dep[p];
	reg Fac val,ans={0,1};
	// std::cerr<<x<<" "<<y<<" "<<v1<<" "<<v2<<"\n";
	auto check=[&](reg int d)->bool {
		reg int u,d1,d2;
		if (d<=dep[x]-dep[p]){
			u=jump(x,d),d2=dis[x]-dis[u],d1=dis[y]+dis[u]-dis[p]-dis[p];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(x,d),d==dep[x]-dep[p]?jump(y,dep[y]-dep[p]-1):jump(x,d+1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			// std::cerr<<"<< "<<d<<" "<<mxd<<"\n"; 
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}else{
			u=jump(y,D-d),d2=dis[x]+dis[u]-dis[p]-dis[p],d1=dis[y]-dis[u];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(y,D-d),jump(y,D-d-1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}
	};
	reg int L=0,R=D-1,nw=-1;
	while (L<=R){
		reg int mid=L+R>>1;
		if (check(mid)) L=mid+1,nw=mid;
		else R=mid-1;
	}
	// std::cerr<<nw<<"\n";
	if (nw>-1) check(nw),val.prt(),ans=std::max(ans,val);
	if (nw+1<D) check(nw+1),val.prt(),ans=std::max(ans,val);
	return ans;
}
#undef int
std::vector<std::array<long long, 2>> police_thief(std::vector<int> A, std::vector<int> B, std::vector<int> D, std::vector<int> P, std::vector<int> V1, std::vector<int> T, std::vector<int> V2){
	n=A.size()+1,q=P.size(); std::vector<std::array<long long, 2>> C(q);
	for (reg int i=1;i<n;i++) add(A[i-1]+1,B[i-1]+1,D[i-1]);
	dfs1(1),dfs2(1); 
	for (reg int i=0;i<q;i++){
		auto [x,y]=query(T[i]+1,P[i]+1,V1[i],V2[i]);
		reg long long g=std::__gcd(x,y); C[i][0]=x/g,C[i][1]=y/g;
	}	
	return C;
}#include<bits/stdc++.h>
#define reg register
#define int long long
const int N=2e5+10;
int n,q,Fa[20][N],dep[N],dis[N];
std::vector<std::pair<int,int>> G[N];
#define ll __int128
struct Node{
	int x,y;
	inline bool operator<(const Node &A)const{return x!=A.x?x<A.x:y<A.y;}
	inline bool operator>(const Node &A)const{return x!=A.x?x>A.x:y>A.y;}
	inline Node operator+(const int &A)const{return {x+A,y};}
}f1[N],f2[N],g[N];
struct Fac{
	int x,y;
	inline bool operator<(const Fac &A)const{return (ll)x*A.y<y*A.x;}
	inline bool operator>(const Fac &A)const{return (ll)x*A.y>y*A.x;}
	inline void prt(){std::cerr<<"Fac "<<x<<" "<<y<<"\n";}
};
#define mp std::make_pair
inline void add(reg int u,reg int v,reg int w){G[u].push_back({v,w}),G[v].push_back({u,w});}
void dfs1(reg int u,reg int fa=0){
	f1[u]=f2[u]={0,-1},dep[u]=dep[Fa[0][u]=fa]+1;
	for (reg int j=1;j<19;j++) Fa[j][u]=Fa[j-1][Fa[j-1][u]];
	for (auto [v,w]:G[u]) if (v^fa){
		dis[v]=dis[u]+w,dfs1(v,u); reg Node F=f1[v]+w; F.y=v;
		if (F>f1[u]) f2[u]=f1[u],f1[u]=F; else f2[u]=std::max(f2[u],F);
	}  
}
void dfs2(reg int u,reg int fa=0){
	for (auto [v,w]:G[u]) if (v^fa){
		g[v]=std::max(g[u],f1[u].y==v?f2[u]:f1[u])+w;
		g[v].y=u,dfs2(v,u);
	}
}
inline int LCA(reg int x,reg int y){
	if (dep[x]<dep[y]) std::swap(x,y);
	for (reg int i=18;i>=0;i--) if (dep[Fa[i][x]]>=dep[y]) x=Fa[i][x];
	if (x==y) return x;
	for (reg int i=18;i>=0;i--) if (Fa[i][x]^Fa[i][y]) x=Fa[i][x],y=Fa[i][y];
	return Fa[0][x]; 
}
inline int jump(reg int x,reg int d){
	// std::cerr<<"jump "<<x<<" "<<d<<"\n";
	for (reg int i=18;i>=0;i--) if (d>>i&1) x=Fa[i][x]; return x;}
inline int get(reg int u,reg int ban){
	// std::cerr<<"get "<<u<<" "<<ban<<"\n";
	Node res=f1[u].y==ban?f2[u]:f1[u];
	if (g[u].y!=ban) res=std::max(res,g[u]); return res.x;
}
inline Fac query(reg int x,reg int y,reg int v1,reg int v2){
	reg int p=LCA(x,y),D=dep[x]+dep[y]-dep[p]-dep[p];
	reg Fac val,ans={0,1};
	// std::cerr<<x<<" "<<y<<" "<<v1<<" "<<v2<<"\n";
	auto check=[&](reg int d)->bool {
		reg int u,d1,d2;
		if (d<=dep[x]-dep[p]){
			u=jump(x,d),d2=dis[x]-dis[u],d1=dis[y]+dis[u]-dis[p]-dis[p];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(x,d),d==dep[x]-dep[p]?jump(y,dep[y]-dep[p]-1):jump(x,d+1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			// std::cerr<<"<< "<<d<<" "<<mxd<<"\n"; 
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}else{
			u=jump(y,D-d),d2=dis[x]+dis[u]-dis[p]-dis[p],d1=dis[y]-dis[u];
			if (d2*v1>=d1*v2) return val={0,1},0; 
			reg int mxd=get(jump(y,D-d),jump(y,D-d-1));
			if (v1<=v2) return val={d1+mxd,v1},1;
			return val=std::min(Fac{d1+mxd,v1},Fac{d1-d2,v1-v2}),Fac{d1+mxd,v1}<Fac{d1-d2,v1-v2};
		}
	};
	reg int L=0,R=D-1,nw=-1;
	while (L<=R){
		reg int mid=L+R>>1;
		if (check(mid)) L=mid+1,nw=mid;
		else R=mid-1;
	}
	// std::cerr<<nw<<"\n";
	if (nw>-1) check(nw),val.prt(),ans=std::max(ans,val);
	if (nw+1<D) check(nw+1),val.prt(),ans=std::max(ans,val);
	return ans;
}
#undef int
std::vector<std::array<long long, 2>> police_thief(std::vector<int> A, std::vector<int> B, std::vector<int> D, std::vector<int> P, std::vector<int> V1, std::vector<int> T, std::vector<int> V2){
	n=A.size()+1,q=P.size(); std::vector<std::array<long long, 2>> C(q);
	for (reg int i=1;i<n;i++) add(A[i-1]+1,B[i-1]+1,D[i-1]);
	dfs1(1),dfs2(1); 
	for (reg int i=0;i<q;i++){
		auto [x,y]=query(T[i]+1,P[i]+1,V1[i],V2[i]);
		reg long long g=std::__gcd(x,y); C[i][0]=x/g,C[i][1]=y/g;
	}	
	return C;
}*/

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 0ms
memory: 36544kb

input:

2 1
0 1 1
1 1000000 0 1000000

output:

moonrabbit2
1 1000000

result:

ok 2 lines

Test #2:

score: 15
Accepted
time: 19ms
memory: 37968kb

input:

5000 5000
0 1 33612
1 2 364922
2 3 690361
3 4 936229
4 5 481430
5 6 990836
6 7 530318
7 8 809490
8 9 220360
9 10 2821
10 11 245681
11 12 545618
12 13 439038
13 14 750751
14 15 712817
15 16 178970
16 17 906394
17 18 294106
18 19 413472
19 20 395779
20 21 208193
21 22 374509
22 23 467478
23 24 211975
...

output:

moonrabbit2
74345126 12231
2141302600 31817
977131971 525511
384608145 68719
1093602993 252970
1152577327 29996
1212704157 148741
727256921 386859
1986719014 394159
838512644 275337
2405376736 566803
486832064 265539
685039389 616324
2418996397 253035
1655204376 673807
1031986401 22420
1230097402 97...

result:

ok 5001 lines

Test #3:

score: 15
Accepted
time: 24ms
memory: 42084kb

input:

5000 5000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 1000000
2...

output:

moonrabbit2
4999000000 1
4999000000 1
1034500000 369387
552000000 36229
184250000 30687
150880000 5119
1245500000 320063
26200000 9517
2202000000 815539
882400000 197589
724500000 150551
2379500000 100057
446800000 847
26400000 109501
2046500000 317127
628750000 144123
3872000000 413757
196040000 20...

result:

ok 5001 lines

Test #4:

score: 15
Accepted
time: 0ms
memory: 36640kb

input:

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

output:

moonrabbit2
1 999999

result:

ok 2 lines

Test #5:

score: 15
Accepted
time: 19ms
memory: 40288kb

input:

5000 5000
0 1 127539
1 2 935941
2 3 754442
3 4 171651
4 5 811624
5 6 993414
6 7 42099
7 8 381976
8 9 937326
9 10 239509
10 11 541362
11 12 991613
12 13 328414
13 14 221707
14 15 689483
15 16 455750
16 17 436548
17 18 798934
18 19 302324
19 20 247321
20 21 841889
21 22 561847
22 23 251609
23 24 90302...

output:

moonrabbit2
1099857266 291073
794469088 594623
687786479 543673
716868513 391901
851906372 71541
2030956645 151097
1589231025 249671
814915456 294419
361523440 21183
274751254 947585
1903923851 138117
1787630368 300711
2144152756 384415
197862606 285557
1521372117 49927
768799760 278919
2115537049 3...

result:

ok 5001 lines

Test #6:

score: 15
Accepted
time: 20ms
memory: 37956kb

input:

5000 5000
0 1 912839
1 2 227600
2 3 452949
3 4 129205
4 5 579783
5 6 361390
6 7 910410
7 8 957637
8 9 490909
9 10 102101
10 11 174247
11 12 420288
12 13 493252
13 14 117541
14 15 409120
15 16 175058
16 17 297992
17 18 360119
18 19 429821
19 20 318685
20 21 832716
21 22 277909
22 23 944731
23 24 5561...

output:

moonrabbit2
12136708 27595
34409533 282721
436971717 82387
987088597 719131
1758105040 516803
141544409 355090
2389549541 985100
445176821 163421
243056533 161802
652352879 472572
726956371 462554
1258860407 585443
1147030252 429969
212169745 140088
1237786254 684643
798438654 796457
94202027 88889
...

result:

ok 5001 lines

Test #7:

score: 15
Accepted
time: 7ms
memory: 38032kb

input:

5000 5000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 1000000
2...

output:

moonrabbit2
4999 1
4999 1
952200000 77081
108600000 153377
1515000000 359417
199400000 32473
281375000 6763
3424000000 405279
744500000 109271
2348000000 739517
151562500 28323
158600000 92007
1850000000 313139
1445000000 562529
111000000 557267
34000000 88373
1514000000 22113
4870000000 171527
1175...

result:

ok 5001 lines

Test #8:

score: 15
Accepted
time: 0ms
memory: 38624kb

input:

5 4
0 1 1
0 2 1
0 3 2
0 4 3
1 9 2 9
1 9 2 10
1 49 3 98
1 49 3 100

output:

moonrabbit2
2 9
4 9
3 49
4 49

result:

ok 5 lines

Test #9:

score: 15
Accepted
time: 16ms
memory: 37400kb

input:

5000 5000
0 1 846515
0 2 293747
0 3 324812
0 4 14262
0 5 987791
0 6 677823
0 7 584891
0 8 154648
0 9 873351
0 10 337968
0 11 212170
0 12 374750
0 13 349149
0 14 130790
0 15 269694
0 16 157243
0 17 770806
0 18 602565
0 19 364926
0 20 458596
0 21 458398
0 22 321267
0 23 416727
0 24 445648
0 25 727043
...

output:

moonrabbit2
1678111 340741
1480387 520774
1198531 727144
965123 541110
356707 187724
537574 23517
829684 94919
677670 157499
863481 96634
51795 32452
1466406 257789
835187 41462
1155947 375085
1258946 78259
1698707 445042
1561678 74379
961534 17597
1775479 362379
436107 40211
200174 53685
1829159 34...

result:

ok 5001 lines

Test #10:

score: 15
Accepted
time: 0ms
memory: 38912kb

input:

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

output:

moonrabbit2
1 999999

result:

ok 2 lines

Test #11:

score: 15
Accepted
time: 3ms
memory: 38620kb

input:

4 3
0 1 557912
0 2 517656
0 3 275807
3 265381 0 1000000
0 190435 2 12345
0 195025 3 67890

output:

moonrabbit2
833719 265381
517656 190435
275807 195025

result:

ok 4 lines

Test #12:

score: 15
Accepted
time: 23ms
memory: 41492kb

input:

5000 5000
0 1 394161
0 2 458197
0 3 541560
0 4 943659
0 5 626829
0 6 85269
0 7 741427
0 8 396070
0 9 822381
0 10 326711
0 11 308433
0 12 702163
0 13 141281
0 14 255158
0 15 704987
0 16 837751
0 17 289103
0 18 41089
0 19 44530
0 20 709641
0 21 961458
0 22 595259
0 23 607946
0 24 984054
0 25 803862
0 ...

output:

moonrabbit2
18512 4025
1416647 41536
1519474 213347
338907 133616
570763 305327
91382 513273
425035 449711
606821 29736
896037 155387
228134 3783
1162183 588924
174833 130873
280250 178013
365243 606188
637961 775454
305621 600818
1603857 510167
3167 1498
1688584 686517
492781 477732
1823152 316621
...

result:

ok 5001 lines

Test #13:

score: 15
Accepted
time: 8ms
memory: 37400kb

input:

5000 5000
0 1 744790
0 2 874022
0 3 705641
0 4 818940
0 5 681859
0 6 572547
0 7 31814
0 8 578499
0 9 260195
0 10 92639
0 11 772935
0 12 689774
0 13 405780
0 14 557577
0 15 722196
0 16 542246
0 17 292906
0 18 888869
0 19 866313
0 20 215978
0 21 446186
0 22 907819
0 23 751993
0 24 604362
0 25 416015
0...

output:

moonrabbit2
510371 390488
268114 824029
1879045 703383
15635 73498
1224529 444033
1618157 657308
344539 884298
933455 947379
226359 185257
1846433 558370
278697 481345
602170 580831
111347 956358
879410 707681
272915 131546
1440740 576339
179150 195941
175616 30281
1394630 523729
397501 97230
885827...

result:

ok 5001 lines

Test #14:

score: 15
Accepted
time: 4ms
memory: 39732kb

input:

5000 5000
0 1 394161
0 2 458197
0 3 541560
0 4 943659
0 5 626829
0 6 85269
0 7 741427
0 8 396070
0 9 822381
0 10 326711
0 11 308433
0 12 702163
0 13 141281
0 14 255158
0 15 704987
0 16 837751
0 17 289103
0 18 41089
0 19 44530
0 20 709641
0 21 961458
0 22 595259
0 23 607946
0 24 984054
0 25 803862
0 ...

output:

moonrabbit2
41273 265753
134785 156368
290413 837823
422503 925438
1763585 96619
813109 212647
399563 23082
147673 246782
511685 123793
39488 195823
560374 244357
520911 50690
125728 202857
44044 59497
41579 216363
1724111 592013
517952 228149
6225 18101
563764 259273
706913 693880
1133260 227581
56...

result:

ok 5001 lines

Test #15:

score: 15
Accepted
time: 8ms
memory: 37720kb

input:

5000 5000
0 1 744790
0 2 874022
0 3 705641
0 4 818940
0 5 681859
0 6 572547
0 7 31814
0 8 578499
0 9 260195
0 10 92639
0 11 772935
0 12 689774
0 13 405780
0 14 557577
0 15 722196
0 16 542246
0 17 292906
0 18 888869
0 19 866313
0 20 215978
0 21 446186
0 22 907819
0 23 751993
0 24 604362
0 25 416015
0...

output:

moonrabbit2
40486 26667
1502524 824029
18970 20101
189689 293992
478561 430903
236408 130121
448733 298007
330423 661969
1875177 973556
1517671 558370
1954852 580831
114224 980927
146194 126913
108383 112302
325414 967449
493285 433292
411248 838099
422932 231657
265027 906869
201154 979705
33781 18...

result:

ok 5001 lines

Test #16:

score: 15
Accepted
time: 0ms
memory: 36664kb

input:

10 10
4 9 7
2 8 8
9 0 4
9 1 5
3 1 1
7 6 2
1 2 5
6 2 10
5 9 2
3 1 5 9
0 6 5 7
5 6 9 6
2 5 1 7
0 2 6 4
5 6 2 10
5 5 0 10
7 4 1 8
9 1 8 7
8 5 4 5

output:

moonrabbit2
18 1
13 3
4 1
17 5
13 1
4 1
6 5
29 4
22 1
5 1

result:

ok 11 lines

Test #17:

score: 15
Accepted
time: 16ms
memory: 39564kb

input:

5000 5000
2457 1919 647386
4989 1532 615211
1465 1605 982774
1361 1756 557140
4963 997 814363
4621 2474 693613
3618 3294 563425
3781 956 465215
4227 3770 609831
4489 1608 861644
4771 2571 697598
3422 3978 212364
3027 183 799303
993 4894 634930
2026 3189 938522
4294 1365 66291
2661 4840 553449
2785 2...

output:

moonrabbit2
108708392 484395
63730231 515714
30595818 122189
31342637 94084
90955763 22570
29553400 14043
94043598 42701
61949199 394741
103920714 367267
97261550 216043
5774347 15278
31788107 137648
69959828 707939
83059650 761881
110538319 81559
8015371 27345
98598264 646475
99158603 28470
9164813...

result:

ok 5001 lines

Test #18:

score: 15
Accepted
time: 8ms
memory: 37788kb

input:

5000 5000
3642 3827 536738
4386 3170 741610
3408 2488 5471
1321 58 989146
1186 169 392218
2266 1529 230443
2559 2775 124533
4108 1196 801584
2184 1343 913048
3834 403 678482
516 4296 118752
3667 2474 549600
3550 1020 987927
168 3918 864425
498 4808 381670
3797 2692 212173
2786 3530 705479
4560 1753 ...

output:

moonrabbit2
128692559 521307
29741375 220947
46124698 171469
39278056 242235
44488087 83198
140505123 349681
19517228 12043
86999711 659919
19322678 8869
80606549 794606
16736463 21268
1495393 5540
131757513 110567
69919724 166057
28071959 37122
138920125 856819
52052310 515489
18267225 41593
419141...

result:

ok 5001 lines

Test #19:

score: 15
Accepted
time: 11ms
memory: 37492kb

input:

5000 5000
3763 219 234603
2031 3011 933418
4970 699 803977
4164 2442 421152
3320 1342 713176
3062 59 767274
2348 3979 751049
3903 1221 329442
1729 1681 992073
550 1732 271127
875 1174 572611
4451 4769 952244
1022 1228 335336
1765 4942 869729
1444 1173 792114
2210 2361 325352
3244 1700 600613
1404 36...

output:

moonrabbit2
107833703 171829
101839616 328445
104064422 148675
100361923 447734
29641789 192883
21889942 73039
105009118 740529
102560261 115972
105337118 904377
27884798 1147
70270425 922
105735310 362369
98384756 84013
17443897 234047
15419119 143286
40378845 475936
36288027 201640
8263147 7740
13...

result:

ok 5001 lines

Test #20:

score: 15
Accepted
time: 19ms
memory: 39532kb

input:

5000 5000
3985 1794 624585
2953 1988 348493
795 1497 40649
4372 2842 946547
669 4633 353575
4014 3773 492717
634 3538 975618
208 1295 303817
4065 1589 861270
198 3120 809888
4109 3433 710056
1806 1594 36251
3370 4171 678953
2229 3554 258809
1100 4437 897110
604 3388 651982
2940 1791 802077
4707 4112...

output:

moonrabbit2
61156939 5
20668056 1
94388357 4
18299160 1
115878679 1
49888294 3
53689714 3
34513903 4
12734647 1
58246559 3
120253893 5
108502827 1
97094665 8
105169117 3
33212250 1
72757376 7
54522324 7
117923977 5
107678332 1
119267185 6
10094667 2
15976607 1
55419936 5
54650074 1
79992887 7
178328...

result:

ok 5001 lines

Test #21:

score: 15
Accepted
time: 11ms
memory: 39580kb

input:

5000 5000
2200 4032 128793
3297 2278 645207
3782 4641 450524
226 1733 674970
3310 1041 54866
4736 4473 712290
3537 1652 478964
2220 3379 783491
2651 774 640521
2043 4471 286677
788 4467 238363
1855 4806 564290
3878 2269 593326
4281 908 933345
97 4202 232749
2845 3806 520708
1772 1671 782118
4211 297...

output:

moonrabbit2
11871304 140363
1559363 22265
14639509 97833
12852468 245725
5543998 63827
10154384 221003
11646913 323439
11091015 172334
13411243 283567
5891825 149648
11928349 322769
13448111 492103
7036081 224728
11895587 29462
1937693 10283
13413621 745829
3885861 116770
659 16
11931681 198791
4251...

result:

ok 5001 lines

Test #22:

score: 15
Accepted
time: 4ms
memory: 39504kb

input:

5000 5000
3985 1794 624585
2953 1988 348493
795 1497 40649
4372 2842 946547
669 4633 353575
4014 3773 492717
634 3538 975618
208 1295 303817
4065 1589 861270
198 3120 809888
4109 3433 710056
1806 1594 36251
3370 4171 678953
2229 3554 258809
1100 4437 897110
604 3388 651982
2940 1791 802077
4707 4112...

output:

moonrabbit2
96784994 189125
99629989 32962
4487958 40033
17390083 42327
61126545 602186
93030725 315884
57073637 424424
50839561 109936
15265171 142608
5421825 24067
98138564 118493
34413350 22459
109391489 209897
94416083 365586
34600928 224173
102046138 453511
57758377 107241
38177897 76182
682889...

result:

ok 5001 lines

Test #23:

score: 15
Accepted
time: 25ms
memory: 40000kb

input:

5000 5000
1771 2622 847790
1933 1141 11910
2337 2253 88049
4680 2268 211373
652 3375 578480
978 2697 963565
1254 490 365244
3384 2835 887045
2739 4892 34594
946 2015 91160
3222 862 413773
1647 2892 797168
4258 2712 335848
660 2857 636676
4755 2181 884615
2770 4653 580797
3774 4543 283655
84 361 7015...

output:

moonrabbit2
644074150 1
2495750533 7
1231529933 9
384021273 5
766478956 1
612507675 2
2405440679 1
2153792888 1
847483212 7
372097279 1
1171088843 4
1788983380 3
761272657 1
1126869380 3
1253051033 2
829363999 4
194220061 1
636953911 4
1041190557 8
2314384672 7
1815742016 7
129194573 3
1613894375 8
...

result:

ok 5001 lines

Test #24:

score: 15
Accepted
time: 8ms
memory: 37888kb

input:

5000 5000
4483 3841 651460
2310 1943 638427
3546 319 464852
2298 409 285715
3381 1596 185668
2730 2104 819024
4262 4176 588061
4696 1706 207353
1794 3032 903402
619 3676 584689
3183 867 211970
4519 793 783360
4314 388 497156
2286 4538 764722
1574 182 488804
2208 4676 365887
1113 4821 300326
354 1176...

output:

moonrabbit2
2493437093 1
2491060057 4
2491506945 7
2490484709 1
415424494 1
1244823673 3
2492797411 6
2490484709 4
2488537587 4
2491060057 3
2492405155 1
276725373 1
623136741 2
2490484709 8
2490538959 8
2491060057 3
498301389 2
2489647346 7
2490484709 1
829512529 3
2493437093 3
2493437093 8
2488825...

result:

ok 5001 lines

Test #25:

score: 15
Accepted
time: 3ms
memory: 36548kb

input:

6 4
0 1 2
1 2 2
2 3 10
1 4 8
2 5 16
3 4 0 3
3 2 0 1
3 19 0 9
3 20 0 19

output:

moonrabbit2
6 1
10 1
1 1
13 10

result:

ok 5 lines

Test #26:

score: 15
Accepted
time: 0ms
memory: 36576kb

input:

10 10
6 7 1
8 5 1
8 2 4
3 9 4
4 1 4
9 7 7
0 4 3
1 3 4
8 4 7
3 5 0 2
1 7 7 2
6 9 8 5
2 7 0 5
3 5 2 4
3 10 0 5
2 8 0 7
6 8 7 2
1 4 8 2
2 8 5 7

output:

moonrabbit2
11 5
16 7
31 9
4 1
19 5
11 10
31 8
1 6
15 4
3 1

result:

ok 11 lines

Test #27:

score: 15
Accepted
time: 28ms
memory: 40124kb

input:

5000 5000
4363 705 1
4599 2227 1
3566 4460 832
1081 3164 1378
794 3778 907
4791 619 1
1006 1174 166
466 375 1204
189 1310 1
1538 4954 1477
141 167 1
879 4872 1
2047 3336 1
2361 2046 2057
89 4337 2276
703 2796 1
4730 3578 682
2857 1144 1
209 1063 1
344 782 1746
645 971 1
2438 4475 1
1734 4847 1631
32...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #28:

score: 15
Accepted
time: 23ms
memory: 37828kb

input:

5000 5000
4363 705 1
4599 2227 1
3566 4460 1664
1081 3164 2756
794 3778 1814
4791 619 1
1006 1174 332
466 375 2408
189 1310 1
1538 4954 2954
141 167 1
879 4872 1
2047 3336 1
2361 2046 4114
89 4337 4552
703 2796 1
4730 3578 1364
2857 1144 1
209 1063 1
344 782 3492
645 971 1
2438 4475 1
1734 4847 3262...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #29:

score: 15
Accepted
time: 24ms
memory: 39844kb

input:

5000 5000
4363 705 1
4599 2227 1
3566 4460 1664
1081 3164 2756
794 3778 1814
4791 619 1
1006 1174 332
466 375 2408
189 1310 1
1538 4954 2954
141 167 1
879 4872 1
2047 3336 1
2361 2046 4114
89 4337 4552
703 2796 1
4730 3578 1364
2857 1144 1
209 1063 1
344 782 3492
645 971 1
2438 4475 1
1734 4847 3262...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 5001 lines

Test #30:

score: 15
Accepted
time: 15ms
memory: 38092kb

input:

5000 5000
92 2908 729
2176 3783 1
1030 1737 1562
4472 1254 1821
4020 1670 1
1983 4422 1
1398 3400 1841
4585 3682 1607
2455 4970 1571
4205 4122 620
942 1205 1
81 2377 1947
1376 3273 1
3751 2036 1639
2718 3567 1
4277 1766 1
4244 3037 882
2506 664 1
663 4410 1626
3069 175 2307
417 1767 1732
1522 3335 1...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #31:

score: 15
Accepted
time: 23ms
memory: 42180kb

input:

5000 5000
92 2908 1458
2176 3783 1
1030 1737 3124
4472 1254 3642
4020 1670 1
1983 4422 1
1398 3400 3682
4585 3682 3214
2455 4970 3142
4205 4122 1240
942 1205 1
81 2377 3894
1376 3273 1
3751 2036 3278
2718 3567 1
4277 1766 1
4244 3037 1764
2506 664 1
663 4410 3252
3069 175 4614
417 1767 3464
1522 333...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #32:

score: 15
Accepted
time: 28ms
memory: 37860kb

input:

5000 5000
92 2908 1458
2176 3783 1
1030 1737 3124
4472 1254 3642
4020 1670 1
1983 4422 1
1398 3400 3682
4585 3682 3214
2455 4970 3142
4205 4122 1240
942 1205 1
81 2377 3894
1376 3273 1
3751 2036 3278
2718 3567 1
4277 1766 1
4244 3037 1764
2506 664 1
663 4410 3252
3069 175 4614
417 1767 3464
1522 333...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 5001 lines

Test #33:

score: 15
Accepted
time: 20ms
memory: 39500kb

input:

5000 5000
4343 34 734781
3124 1745 59552
13 1463 236499
2101 313 919880
3352 2576 758934
2369 2452 376557
1348 3122 780066
1671 1660 528485
4214 3224 691361
1020 3634 439638
4379 4603 485861
2286 3525 861424
1734 2068 904504
1509 312 294940
479 4624 159984
1122 956 744309
3818 1204 164038
4251 3303 ...

output:

moonrabbit2
30922111 315418
162948899 893442
53918169 47894
18292751 321867
73605319 342984
118979614 326425
4530521 64866
4593462 5527
30142838 240925
34557941 3979
4003796 471275
42873735 74864
5877089 9035
59731682 185457
42727221 668986
23472089 326148
144774935 429468
124162331 97381
219799 166...

result:

ok 5001 lines

Test #34:

score: 15
Accepted
time: 23ms
memory: 39540kb

input:

5000 5000
2264 3553 801088
1780 1317 214493
1632 1067 506188
4166 2067 173778
4337 385 975752
3299 33 558149
1325 3906 240051
4843 1928 276483
4707 3759 987354
3969 827 156146
3959 2283 462718
2934 1774 956884
2784 896 893363
2511 3462 274509
995 3151 242570
1927 3466 903202
2243 1253 246194
2975 20...

output:

moonrabbit2
6368194 87687
48394163 780771
47590012 350277
109276760 710521
12125882 80371
46132233 83684
96717152 263071
30462269 82126
93854088 645551
50963602 498779
48373709 438639
107922989 877511
31314753 41863
1322452 147569
118241216 62753
2879847 93274
1387271 1125
19078095 106586
7568518 14...

result:

ok 5001 lines

Test #35:

score: 15
Accepted
time: 25ms
memory: 39520kb

input:

5000 5000
1634 1930 900099
3763 574 402138
797 1259 551686
1248 3521 460380
4042 796 384058
350 1559 515548
665 4480 924228
2498 4445 865697
2624 887 540243
1794 3846 129550
4616 3154 406870
2233 2510 828153
1160 458 690734
3479 3003 319485
633 3555 259749
3068 4080 62095
3227 556 136861
4821 3544 2...

output:

moonrabbit2
64131103 106670
64558245 859588
25353401 338024
36911884 422737
1960345 198886
9129610 751427
56834125 588423
19537770 110977
22681963 103810
2048879 111983
24088782 338171
26066091 563134
582894 995
14041742 179651
31785213 249860
17592647 178084
51213029 2927
70242195 766327
55656313 8...

result:

ok 5001 lines

Test #36:

score: 15
Accepted
time: 19ms
memory: 39876kb

input:

5000 5000
62 3022 354702
1591 74 377759
3761 3344 90405
3880 3706 783891
4399 1333 466259
2110 958 482923
2379 1830 191883
2760 2329 360007
75 3132 106307
4857 1843 881824
3563 709 136682
2103 1197 858199
637 3273 440537
3458 2022 497035
4573 4756 46280
4794 275 970666
2886 161 243907
4402 4125 4824...

output:

moonrabbit2
16609408 227185
19494588 145825
111576137 783297
25141434 728743
89390144 932511
96601731 376556
125058585 928112
17995073 286233
99869576 611335
92522938 255803
248154 6095
16611538 156957
33231557 330322
7973268 96835
6401106 75889
11585993 98917
70522731 905009
24495467 712442
4517141...

result:

ok 5001 lines

Test #37:

score: 15
Accepted
time: 16ms
memory: 39540kb

input:

5000 5000
4706 730 388305
4428 1527 532700
3736 4258 327391
2652 4130 846302
261 887 874565
1184 4142 440322
3760 4048 651868
2444 1569 140709
1580 1801 626492
4554 3210 789820
4630 2310 305027
879 4894 696764
98 2158 205204
258 2209 509307
2612 453 63458
2346 1200 129559
3119 1378 326062
4815 2441 ...

output:

moonrabbit2
52306786 937091
41529284 482063
101675887 319025
87049316 771509
16489900 438469
7205939 708495
6011320 59421
107429081 497217
31099275 400651
7089182 737075
48579213 192155
17713387 623788
7906433 133748
24388953 972437
62911963 955629
18575233 314829
53799191 397229
95567520 852287
612...

result:

ok 5001 lines

Test #38:

score: 15
Accepted
time: 20ms
memory: 39580kb

input:

5000 5000
2192 3908 454612
1694 4077 720345
4479 4636 340184
3342 2544 132904
4708 4426 58679
3883 668 589210
542 2136 111853
1649 4115 729923
205 4891 922485
1966 4224 763224
426 1933 281883
3857 2667 792225
3713 723 226768
2410 2999 297388
2174 1458 113341
4549 1326 288452
803 2788 440921
2546 333...

output:

moonrabbit2
9301449 923791
44918285 370311
21499353 399775
66827793 584096
1540899 30982
89449343 702238
37508877 401416
51752547 431995
2511163 445663
105105479 243977
45962794 721063
2147735 109273
10380335 116742
78174223 870372
18080801 604484
75688672 354717
13065645 249581
24103850 320147
5543...

result:

ok 5001 lines

Test #39:

score: 15
Accepted
time: 12ms
memory: 39532kb

input:

5000 5000
3407 2510 283697
2782 93 466873
1005 3315 813313
914 3366 679199
4298 4732 31190
2224 952 867475
2241 4685 212448
2651 3802 380301
3481 4246 742096
751 4697 150255
4541 3484 433843
3863 2243 100405
2294 30 665538
3515 2080 310506
4980 384 712631
3319 4489 733533
2022 1197 371171
2007 2270 ...

output:

moonrabbit2
85893971 7
39480911 6
51596275 2
112243447 10
120762624 5
121316730 1
128224416 7
54938845 6
97277903 1
113188744 1
126082589 4
26179926 1
30889325 2
81434293 4
5099197 1
6427736 1
103062361 10
101058245 8
68772951 5
132405824 3
29362143 1
66728927 10
19987239 4
79700588 9
37567374 5
560...

result:

ok 5001 lines

Test #40:

score: 15
Accepted
time: 15ms
memory: 37536kb

input:

5000 5000
3414 3594 416311
1072 844 842163
4734 311 95795
2975 2803 285108
4100 401 656314
3795 1637 6466
3848 3610 132418
1430 886 782921
2949 1856 366786
1050 3831 31655
4023 4641 579044
3927 72 34430
4085 1167 484473
64 702 110859
867 1101 746988
2191 4421 84023
1237 4099 568186
2076 3760 578029
...

output:

moonrabbit2
56386892 7
34042213 8
87373878 7
26236813 1
57099601 3
10842578 3
48723981 2
15607755 1
1407463 1
11596041 1
1110511 1
45047383 8
57759299 9
31257409 3
19570891 3
92976423 5
20904470 3
7777886 7
4268445 1
21128971 6
63993899 10
21532750 7
46871965 8
70466611 6
10896395 2
3292306 1
423872...

result:

ok 5001 lines

Test #41:

score: 15
Accepted
time: 7ms
memory: 41544kb

input:

5000 5000
1726 1245 902786
4790 4048 229135
4624 2305 684375
1192 2673 407985
118 1723 315803
1785 400 469876
1719 356 247136
2092 1741 405257
4373 1024 132387
3226 2520 999127
2656 3618 726456
1145 4795 585346
3631 3016 128102
3545 1180 423087
2302 4286 914063
4114 2986 811400
3750 495 576788
3569 ...

output:

moonrabbit2
4065701 122472
14189596 832245
13965089 791907
12074891 465729
1950251 156597
7603030 903463
8578799 996870
5471922 456449
13410403 911664
10971741 604778
6454741 58630
1672907 144660
13279395 372371
7344446 521703
12234534 55037
841271 38907
11113056 530851
13983157 586498
1267307 47577...

result:

ok 5001 lines

Test #42:

score: 15
Accepted
time: 12ms
memory: 37460kb

input:

5000 5000
4934 1618 649404
1270 773 585182
4882 3400 977427
227 1618 57430
705 792 204075
3536 2410 923573
1977 2295 606784
101 1329 297778
1420 330 793790
3393 3433 7310
3555 146 271812
240 4497 540473
2672 1501 915114
4026 3029 324660
520 3142 483269
2639 1093 923830
1665 4665 882601
3517 714 2827...

output:

moonrabbit2
4935117 396653
9957775 703683
11814804 345667
225565 22538
9613579 608872
11745948 561527
6045317 491507
7983778 999453
1000771 72606
11495697 988421
10890094 840685
802333 78268
11242029 591791
8883329 902542
1502783 124157
12179100 779461
2212652 140297
3282250 233009
13474794 870535
7...

result:

ok 5001 lines

Test #43:

score: 15
Accepted
time: 27ms
memory: 39524kb

input:

5000 5000
3407 2510 283697
2782 93 466873
1005 3315 813313
914 3366 679199
4298 4732 31190
2224 952 867475
2241 4685 212448
2651 3802 380301
3481 4246 742096
751 4697 150255
4541 3484 433843
3863 2243 100405
2294 30 665538
3515 2080 310506
4980 384 712631
3319 4489 733533
2022 1197 371171
2007 2270 ...

output:

moonrabbit2
48075458 745357
118077589 177746
133784091 162322
43732621 412034
115527627 500875
96820726 64041
115106796 122957
16597022 52099
113634439 296751
30902775 330481
35357573 313924
59141461 73222
45467222 240623
103202149 39314
15668877 150443
70471657 429368
93971661 104140
26478801 23527...

result:

ok 5001 lines

Test #44:

score: 15
Accepted
time: 12ms
memory: 39572kb

input:

5000 5000
3414 3594 416311
1072 844 842163
4734 311 95795
2975 2803 285108
4100 401 656314
3795 1637 6466
3848 3610 132418
1430 886 782921
2949 1856 366786
1050 3831 31655
4023 4641 579044
3927 72 34430
4085 1167 484473
64 702 110859
867 1101 746988
2191 4421 84023
1237 4099 568186
2076 3760 578029
...

output:

moonrabbit2
82922849 673347
1802734 25211
83939066 344897
55016300 266161
82839761 294048
35106557 378093
40992031 333906
104357381 308404
22486666 163541
15534069 68818
827329 14386
36379067 379441
12947842 82629
1816949 10264
13300789 55217
96304823 875269
1935809 91243
7784661 109607
14061553 156...

result:

ok 5001 lines

Test #45:

score: 15
Accepted
time: 16ms
memory: 41876kb

input:

5000 5000
4000 249 1
2600 4293 4804
4639 808 1
458 3547 1
4863 272 1946
12 3169 4832
1186 3320 3562
200 1646 1554
4538 769 1644
2634 4291 1
632 4423 1824
2142 1102 1
1936 4536 1
3244 2699 1
2724 320 1
3698 4886 1320
4573 2265 1
315 55 1558
784 1815 1
2420 1331 1
2526 3513 1
4657 4478 1
4784 2860 1
4...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #46:

score: 15
Accepted
time: 30ms
memory: 39768kb

input:

5000 5000
4057 4405 1076
4208 1176 1
970 2201 1
4561 254 2404
4585 2211 2330
2398 3218 1
3149 1266 4682
939 125 2820
1879 1465 1118
4279 4898 1
3359 2323 3076
4186 2193 1
2063 4166 1
1355 2093 1540
1662 2403 1
1115 1642 1
1571 3328 712
1567 3958 2020
1434 616 1
2702 3536 1
4558 1108 1
1671 4046 2126...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #47:

score: 15
Accepted
time: 23ms
memory: 38088kb

input:

5000 5000
3796 1683 588
4992 2998 654
548 3300 4798
4318 100 1
3939 2374 2326
2097 4129 1
4740 3422 2868
1421 3517 1
3551 4273 4852
3506 4707 4578
4771 4910 3046
1990 1971 1
1085 2908 794
859 4724 1
3740 3742 3592
537 4448 3778
2076 4783 3438
2162 4196 1
852 4761 1
3921 1285 1
4173 3313 3996
2448 44...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 5001 lines

Test #48:

score: 15
Accepted
time: 27ms
memory: 40024kb

input:

5000 5000
4042 3650 784648
232 3621 313794
2626 3761 215546
2777 537 885890
2888 3356 626531
283 3316 472143
4322 3774 801623
4649 2274 717686
1688 1911 111781
1638 480 807252
521 3023 162377
1005 114 406884
2567 2488 420708
3807 2649 197785
3724 765 827566
820 3018 570926
31 2090 818731
4011 3020 3...

output:

moonrabbit2
306953349 72614
148027263 6916
262914579 117958
2144189474 503931
666294815 54896
449288657 411699
1096057852 986973
182206575 27386
956313105 70592
991361876 361107
2468271530 564973
1154631250 341637
755720979 490064
72575255 255991
1281111425 271903
499817669 437272
647142711 27047
80...

result:

ok 5001 lines

Test #49:

score: 15
Accepted
time: 24ms
memory: 39828kb

input:

5000 5000
267 1419 870258
1194 3549 362347
4043 1488 261918
2860 4818 601738
3423 1233 308277
4272 306 972870
2764 1059 366149
1562 3651 270989
152 1040 464644
4066 2683 713809
3684 4327 895712
3077 1995 220991
4727 4183 801940
807 1423 198134
433 1173 785276
1443 4072 746742
936 1226 219435
177 424...

output:

moonrabbit2
840311384 62181
503379039 131822
419626163 101856
839648415 143146
629065534 94317
2516495264 81121
1260403492 22133
1260467076 121657
2520806984 499247
2518112057 871517
2518112057 976838
114587916 43799
1259936327 227092
629065534 202029
2516895195 681032
2516495264 362793
2516895195 4...

result:

ok 5001 lines

Test #50:

score: 15
Accepted
time: 29ms
memory: 38052kb

input:

5000 5000
3961 624 602112
2943 352 406468
2599 2747 404620
247 2931 109657
2560 2078 606365
2841 2351 885744
4734 3330 122571
4689 3694 249243
1176 4663 601965
2590 1952 615241
1150 431 377131
3295 2080 751550
355 4886 85840
3212 1830 358342
3676 2318 765668
1680 1800 390502
2720 394 983289
292 2382...

output:

moonrabbit2
627338959 306785
1416137399 886696
2138933272 592461
423224102 159821
1573489497 585820
128009527 124631
616145848 649979
2035226708 924949
11209927 93563
718184709 405916
97938483 11860
691401965 546737
2382882174 860125
1236363925 189979
112067917 482155
1477341747 690206
997665008 182...

result:

ok 5001 lines

Test #51:

score: 15
Accepted
time: 16ms
memory: 42048kb

input:

5000 5000
1943 4419 808900
126 2935 179811
782 1936 387297
625 4122 15005
510 2179 532044
7 4192 920001
2954 4186 812455
4187 635 559233
54 3356 963496
4091 4668 428185
1369 1214 703701
2239 1977 468449
2587 1011 146605
4358 1380 863266
4349 3418 721641
1989 3245 717548
1090 2666 39012
556 2055 6439...

output:

moonrabbit2
845609749 183877
2538338567 784739
140977261 38488
2536829247 848543
1268795349 173105
2539123007 805316
1267131876 457115
2536972017 868675
43746839 16042
115367545 31073
2534525143 605947
634026842 121777
281954522 40827
2536829247 793556
2536829247 879707
2539123007 622465
634026842 2...

result:

ok 5001 lines

Subtask #2:

score: 21
Accepted

Dependency #1:

100%
Accepted

Test #52:

score: 21
Accepted
time: 404ms
memory: 50144kb

input:

50000 50000
0 1 829235
1 2 488166
2 3 721916
3 4 364371
4 5 733550
5 6 959326
6 7 618967
7 8 493668
8 9 300054
9 10 512734
10 11 277050
11 12 185435
12 13 260329
13 14 799248
14 15 907074
15 16 119442
16 17 379590
17 18 527073
18 19 980531
19 20 792744
20 21 455025
21 22 274242
22 23 262258
23 24 10...

output:

moonrabbit2
15019244658 147419
20791983056 291661
6124920321 657884
15207942493 124984
10659196613 317517
22008829539 68803
24798979523 516080
11450852903 332516
13990902785 307626
19798699022 442443
5284678279 312183
815033655 34856
16667625089 620454
23134692697 431052
17538511169 729121
170652030...

result:

ok 50001 lines

Test #53:

score: 21
Accepted
time: 249ms
memory: 56064kb

input:

50000 50000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 1000000...

output:

moonrabbit2
49999000000 1
49999000000 1
535000000 2619
40049000000 899163
34453000000 892891
23554000000 542911
2476500000 364777
30342000000 366451
4993500000 105683
4489000000 23457
14482500000 119789
43279000000 216067
9395400000 125441
13167000000 336439
4306000000 72551
910062500 10821
47259000...

result:

ok 50001 lines

Test #54:

score: 21
Accepted
time: 275ms
memory: 56032kb

input:

50000 50000
0 1 936552
1 2 104297
2 3 102710
3 4 5503
4 5 272355
5 6 769607
6 7 711250
7 8 622470
8 9 367369
9 10 321573
10 11 495041
11 12 580579
12 13 171452
13 14 902028
14 15 890461
15 16 589802
16 17 283827
17 18 650556
18 19 612694
19 20 494053
20 21 574902
21 22 550951
22 23 472624
23 24 4563...

output:

moonrabbit2
11989605483 454151
289739830 2203
17256254502 231439
25138218223 191967
841379539 72199
23418280769 242388
20648448759 410588
1416849527 149481
2200129144 361455
23135469924 506825
25079320732 228573
8970994979 142164
1880672929 22517
13189910802 114587
7482123785 358444
2641863457 67078...

result:

ok 50001 lines

Test #55:

score: 21
Accepted
time: 345ms
memory: 55748kb

input:

50000 50000
0 1 753628
1 2 454925
2 3 551239
3 4 393777
4 5 180340
5 6 791932
6 7 198529
7 8 137049
8 9 517093
9 10 726683
10 11 228265
11 12 820889
12 13 159063
13 14 975039
14 15 192880
15 16 798499
16 17 988322
17 18 621654
18 19 460474
19 20 91644
20 21 81239
21 22 2975
22 23 785184
23 24 376191...

output:

moonrabbit2
37743572 358629
10708034629 255897
1266138617 52626
380105574 41419
8173569869 327511
4905135813 187736
11509911925 942112
7588480085 962533
3538763967 513964
315016947 42641
4148323925 339217
1923797347 173556
8053433597 383994
1240782851 43101
18888007853 628327
15250308832 735165
1198...

result:

ok 50001 lines

Test #56:

score: 21
Accepted
time: 392ms
memory: 56016kb

input:

50000 50000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 1000000...

output:

moonrabbit2
49999 1
49999 1
19309500000 95297
8233400000 21633
32320000 2933
258160000 29037
760500000 9457
387250000 28403
457750000 1897
2270000000 96373
12532500000 27017
10589000000 53039
7643400000 88771
5867400000 76441
807125000 23929
90384000 3007
19734000000 367921
43578000000 783863
386812...

result:

ok 50001 lines

Test #57:

score: 21
Accepted
time: 214ms
memory: 50340kb

input:

50000 50000
0 1 172804
0 2 661826
0 3 245576
0 4 189706
0 5 670550
0 6 768554
0 7 906939
0 8 994857
0 9 259377
0 10 66008
0 11 302697
0 12 241271
0 13 618058
0 14 735255
0 15 872632
0 16 813952
0 17 715289
0 18 773076
0 19 454164
0 20 982068
0 21 799131
0 22 980449
0 23 587051
0 24 857702
0 25 41147...

output:

moonrabbit2
82222 78539
426112 137709
1129256 401287
1563368 687727
1706571 564073
1794975 89527
1147090 545323
509967 775
1622517 43087
990070 112787
739733 682318
402789 768047
1324709 173683
1496973 18088
1408636 219063
1184710 442041
636945 360287
237340 19773
1457101 156687
843131 465785
156272...

result:

ok 50001 lines

Test #58:

score: 21
Accepted
time: 235ms
memory: 46756kb

input:

50000 50000
0 1 907041
0 2 31428
0 3 822254
0 4 122824
0 5 6032
0 6 34017
0 7 959354
0 8 512081
0 9 696830
0 10 949444
0 11 610810
0 12 574760
0 13 996050
0 14 506947
0 15 111071
0 16 770816
0 17 721382
0 18 125194
0 19 570828
0 20 824092
0 21 294089
0 22 372632
0 23 16092
0 24 862488
0 25 229118
0 ...

output:

moonrabbit2
287805 241622
930196 35293
1261671 283807
971325 40793
968575 338642
29929 20957
634106 413119
1889682 728809
1010735 360923
1682991 352691
517691 721190
574346 508859
941193 603917
1671968 601677
107857 22141
462146 909111
1747803 182501
1625235 644806
1359127 291182
323704 23233
563711...

result:

ok 50001 lines

Test #59:

score: 21
Accepted
time: 253ms
memory: 44800kb

input:

50000 50000
0 1 757748
0 2 323087
0 3 263866
0 4 271865
0 5 774191
0 6 401993
0 7 668881
0 8 120446
0 9 993517
0 10 36227
0 11 243695
0 12 970731
0 13 160888
0 14 402781
0 15 896116
0 16 522828
0 17 550122
0 18 462187
0 19 731029
0 20 928160
0 21 541812
0 22 88695
0 23 676510
0 24 291417
0 25 384856...

output:

moonrabbit2
55481 28943
643371 287884
1468050 489203
464014 29625
674559 362621
778883 442611
1750703 311459
448198 160479
492715 391112
1156 1067
328197 245704
274887 108145
231161 978690
303853 100703
585773 602671
853627 440850
1418551 925433
1718709 898111
831989 826112
1044149 314957
1534965 21...

result:

ok 50001 lines

Test #60:

score: 21
Accepted
time: 137ms
memory: 44900kb

input:

50000 50000
0 1 907041
0 2 31428
0 3 822254
0 4 122824
0 5 6032
0 6 34017
0 7 959354
0 8 512081
0 9 696830
0 10 949444
0 11 610810
0 12 574760
0 13 996050
0 14 506947
0 15 111071
0 16 770816
0 17 721382
0 18 125194
0 19 570828
0 20 824092
0 21 294089
0 22 372632
0 23 16092
0 24 862488
0 25 229118
0 ...

output:

moonrabbit2
600146 349177
677105 472052
408466 434149
761659 372841
1812095 271294
14445 17147
497139 504500
950460 698671
84986 294865
1343879 370377
463937 115869
592745 122557
785017 398890
488511 86150
671936 403333
1674427 569011
148207 70211
31840 699909
30992 855161
539621 813052
173873 12638...

result:

ok 50001 lines

Test #61:

score: 21
Accepted
time: 72ms
memory: 50132kb

input:

50000 50000
0 1 757748
0 2 323087
0 3 263866
0 4 271865
0 5 774191
0 6 401993
0 7 668881
0 8 120446
0 9 993517
0 10 36227
0 11 243695
0 12 970731
0 13 160888
0 14 402781
0 15 896116
0 16 522828
0 17 550122
0 18 462187
0 19 731029
0 20 928160
0 21 541812
0 22 88695
0 23 676510
0 24 291417
0 25 384856...

output:

moonrabbit2
141016 71971
835127 59250
994521 496114
770212 682753
547145 610099
1724417 823878
848919 391112
605599 916001
959266 730941
210263 254328
665488 183549
227190 55417
431219 229281
830194 431983
1809273 898111
5968 314957
80443 547406
165319 126785
446147 964453
74215 572359
599296 480589...

result:

ok 50001 lines

Test #62:

score: 21
Accepted
time: 297ms
memory: 46996kb

input:

50000 50000
5841 41663 932752
15826 21773 813708
6317 29203 853431
43792 9757 214429
49907 26051 689667
10045 10141 927227
19669 13037 405601
44222 1454 425607
11415 44136 732256
18323 2479 228767
42003 40962 91250
1883 27763 353851
31482 27920 959026
44355 8968 265561
19661 24117 79977
10843 17787 ...

output:

moonrabbit2
244250082 462173
258638661 250229
121433474 278551
175711719 500122
57460609 95377
260505095 229512
104194665 38681
220993355 77728
215743372 34711
181238031 550624
13959895 9493
22436317 2630
210883612 142407
278012197 545758
275673898 738595
236549933 17767
242637115 437399
127215659 1...

result:

ok 50001 lines

Test #63:

score: 21
Accepted
time: 276ms
memory: 50944kb

input:

50000 50000
13896 2350 195519
19315 43735 194281
31318 33292 885766
43868 38602 652928
23217 19063 777170
25228 49577 569189
35980 39291 538678
18092 31300 818798
25053 47216 655894
11973 11976 743809
47378 43668 344112
24882 21995 51318
39558 24238 185888
38983 48165 390714
49119 6523 494239
36028 ...

output:

moonrabbit2
93759527 144943
296525831 280142
91041249 396161
295449899 117417
133058839 575910
280000063 682774
7474435 5444
43031162 164777
62663723 25827
87660533 81262
279222472 412413
255415064 334445
110895649 290537
297154612 45729
353728139 87787
302594807 400901
222398217 928819
370465932 29...

result:

ok 50001 lines

Test #64:

score: 21
Accepted
time: 374ms
memory: 50904kb

input:

50000 50000
19980 23261 597774
29449 20973 48006
25374 1853 647505
47817 9797 130964
29343 29609 254491
45833 22965 257576
30148 25790 466282
47955 16589 851772
35288 11478 247828
38557 9352 131468
46247 34237 296364
19052 31836 891357
41861 1410 748266
44800 27640 305088
25340 14015 379658
6896 109...

output:

moonrabbit2
244460123 568297
411158442 125027
19935516 24997
202279171 129231
182534990 382247
137340595 18572
313706183 78499
159833081 68387
376116419 96933
192489281 382334
138741713 373299
440691067 641058
997997 489
79130711 263089
381539139 60407
315659426 462721
32436769 441878
27484360 34029...

result:

ok 50001 lines

Test #65:

score: 21
Accepted
time: 314ms
memory: 47092kb

input:

50000 50000
28084 34837 735030
36914 38633 151203
36 6169 279700
8922 8833 732771
801 42522 453519
22945 10669 558367
44911 1074 935293
34547 1384 318839
40411 34166 762371
41568 5737 41783
27842 408 499610
7745 24697 797176
7629 44537 750358
31148 43229 4102
39224 29145 365796
35320 44556 586178
37...

output:

moonrabbit2
349178009 7
163594295 4
126631290 1
318609352 3
246400751 4
299537691 1
71578573 1
139714505 2
273926803 1
184848214 1
235949591 2
48956515 2
213660042 5
87293129 3
45908949 1
291111255 4
205119707 2
78498791 8
386907148 5
140314607 3
363796941 2
315758042 1
99722017 3
126517781 1
121320...

result:

ok 50001 lines

Test #66:

score: 21
Accepted
time: 243ms
memory: 49584kb

input:

50000 50000
13055 10369 561781
31224 33963 38103
42765 2083 340815
27470 13142 498348
43412 23710 73308
26659 49113 164218
2127 1379 764067
43983 3859 563418
6612 14226 283097
3689 48723 362100
48988 45995 266870
21988 10820 646641
14397 32470 408965
15594 28011 323956
7580 21389 236603
234 15522 51...

output:

moonrabbit2
18685048 56699
8315612 254785
16279597 629991
5906669 61118
3832415 53818
16991924 832207
14318455 54612
2853319 82101
8979309 125372
16566185 205263
2767193 61120
9211061 52792
19736433 82672
11301484 576717
7699726 478725
17091773 243933
16575297 574921
18468455 22567
18818552 540317
1...

result:

ok 50001 lines

Test #67:

score: 21
Accepted
time: 361ms
memory: 50956kb

input:

50000 50000
28084 34837 735030
36914 38633 151203
36 6169 279700
8922 8833 732771
801 42522 453519
22945 10669 558367
44911 1074 935293
34547 1384 318839
40411 34166 762371
41568 5737 41783
27842 408 499610
7745 24697 797176
7629 44537 750358
31148 43229 4102
39224 29145 365796
35320 44556 586178
37...

output:

moonrabbit2
123402864 7559
19840945 36863
77126711 147626
219490927 635922
337625933 223170
51289616 372181
268601863 229209
262106657 256720
355109591 459027
167470742 116559
157275083 332159
120906973 22875
280436853 518876
296559616 369867
44158114 113819
77586132 308717
155874736 17871
175964277...

result:

ok 50001 lines

Test #68:

score: 21
Accepted
time: 378ms
memory: 50844kb

input:

50000 50000
9263 45121 264075
1395 49148 452002
15195 15544 737468
31834 31839 625919
12110 27647 71853
31509 31052 552904
25875 7663 777539
42920 39229 346030
31184 2165 102023
5452 8170 202191
44336 37550 495056
48796 3550 75008
35973 41473 130785
48165 19940 38285
23602 12750 941519
42490 45566 5...

output:

moonrabbit2
3189849585 1
9105515827 1
10180646433 7
10559767837 2
21862130600 1
6943475641 2
24216182966 1
19249018091 7
21298480529 10
4543190120 1
22865355805 4
8002838871 1
8098719307 1
6103159131 5
3954482547 2
24456541033 10
24449721200 3
22799524186 9
7573627004 3
6262051191 2
11437181675 2
12...

result:

ok 50001 lines

Test #69:

score: 21
Accepted
time: 242ms
memory: 52180kb

input:

50000 50000
15902 16004 897656
23451 23200 446449
15414 2560 332631
36511 11587 742263
36704 27241 101024
32017 4799 640521
36997 42159 55371
3518 35253 422410
31359 16943 752898
5559 46482 214608
37788 27022 561523
40713 42030 354199
22142 10456 69286
36565 10530 298743
39951 14441 647121
29291 365...

output:

moonrabbit2
6218574558 1
12434750611 5
24885741373 2
8293755741 1
24862783541 9
24897033797 2
8290308740 3
12439577887 4
24871470583 2
24860790067 5
24862485679 2
24876415258 9
3554501022 1
24857413009 4
12442902965 1
24894947925 2
24886915715 6
24891859825 3
24897073765 8
12437084834 3
24886787386 ...

result:

ok 50001 lines

Test #70:

score: 21
Accepted
time: 231ms
memory: 48020kb

input:

50000 50000
13979 3158 21218
44726 6354 1
45987 25827 21942
5424 24128 1
346 35047 6861
37387 12315 6970
2953 21981 2951
47343 33917 14369
42917 38530 1
13128 29612 1
41300 17657 2117
3230 37385 24313
9007 44511 1
1289 14597 1
41547 43367 1
49444 12164 15308
16776 44709 16099
12441 20646 17319
27775...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #71:

score: 21
Accepted
time: 272ms
memory: 51980kb

input:

50000 50000
13979 3158 42436
44726 6354 1
45987 25827 43884
5424 24128 1
346 35047 13722
37387 12315 13940
2953 21981 5902
47343 33917 28738
42917 38530 1
13128 29612 1
41300 17657 4234
3230 37385 48626
9007 44511 1
1289 14597 1
41547 43367 1
49444 12164 30616
16776 44709 32198
12441 20646 34638
277...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #72:

score: 21
Accepted
time: 244ms
memory: 50068kb

input:

50000 50000
13979 3158 42436
44726 6354 1
45987 25827 43884
5424 24128 1
346 35047 13722
37387 12315 13940
2953 21981 5902
47343 33917 28738
42917 38530 1
13128 29612 1
41300 17657 4234
3230 37385 48626
9007 44511 1
1289 14597 1
41547 43367 1
49444 12164 30616
16776 44709 32198
12441 20646 34638
277...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 50001 lines

Test #73:

score: 21
Accepted
time: 275ms
memory: 52116kb

input:

50000 50000
29704 46458 1
6373 33726 1
27034 45559 17414
47702 25956 9796
28709 39624 1
13036 34862 4124
32697 39192 14504
29629 37336 22474
8281 1265 1
5646 8250 1
5916 27555 1
9734 1979 13943
26750 37740 1
33955 43037 1
13892 17388 9804
19552 31681 1
16481 1277 10379
11251 19243 22737
8199 45138 4...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #74:

score: 21
Accepted
time: 267ms
memory: 53908kb

input:

50000 50000
29704 46458 1
6373 33726 1
27034 45559 34828
47702 25956 19592
28709 39624 1
13036 34862 8248
32697 39192 29008
29629 37336 44948
8281 1265 1
5646 8250 1
5916 27555 1
9734 1979 27886
26750 37740 1
33955 43037 1
13892 17388 19608
19552 31681 1
16481 1277 20758
11251 19243 45474
8199 45138...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #75:

score: 21
Accepted
time: 228ms
memory: 52188kb

input:

50000 50000
29704 46458 1
6373 33726 1
27034 45559 34828
47702 25956 19592
28709 39624 1
13036 34862 8248
32697 39192 29008
29629 37336 44948
8281 1265 1
5646 8250 1
5916 27555 1
9734 1979 27886
26750 37740 1
33955 43037 1
13892 17388 19608
19552 31681 1
16481 1277 20758
11251 19243 45474
8199 45138...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 50001 lines

Test #76:

score: 21
Accepted
time: 287ms
memory: 50464kb

input:

50000 50000
20333 21199 491616
33040 43817 736938
2188 37996 356581
5631 38919 823781
46252 13448 382300
6316 32869 912250
24591 7616 720378
7753 21121 252075
49039 32288 686129
40655 2556 285471
3867 48852 272974
34552 49645 314020
14220 44781 151010
9808 48183 712822
8119 21586 887908
34396 47200 ...

output:

moonrabbit2
316425978 106787
369388499 634770
240555950 555091
139851971 984022
33218204 81435
271910557 291057
83946834 121919
25640701 10667
60823755 959303
34821204 128699
28393782 232349
305651393 958440
93822018 584329
245299249 202745
16870406 39673
337553701 653199
339515041 972931
364596353 ...

result:

ok 50001 lines

Test #77:

score: 21
Accepted
time: 211ms
memory: 47428kb

input:

50000 50000
38550 3368 239977
42638 20956 216020
45164 47249 728075
4558 34393 270457
12908 28930 494736
18986 20263 143628
43695 13305 197512
33679 41454 9736
42607 48895 74026
18839 26454 773784
25195 26533 855543
48178 48218 703645
48040 44214 473310
47793 30088 915822
24871 14199 396706
12576 17...

output:

moonrabbit2
253416724 3519
250590419 756434
47443107 110498
121003361 558172
51894955 92763
130547842 489635
300266654 27761
190147832 711265
71114041 611935
273182462 121613
237014357 355593
228994271 515341
212998492 918467
60838479 27910
37786761 161215
237413933 963624
270733569 779921
134080467...

result:

ok 50001 lines

Test #78:

score: 21
Accepted
time: 296ms
memory: 50476kb

input:

50000 50000
27689 47379 2153
13306 458 50317
12613 33248 177823
18783 37029 13173
29292 7942 927342
8308 36902 53139
17125 5994 929604
47290 4589 869499
19335 36051 988844
24141 15467 549830
7450 34110 30822
48224 22918 841788
36773 28187 993203
39942 29224 234704
33357 10008 377967
17068 12926 8447...

output:

moonrabbit2
199153759 665976
245101909 656220
232944667 198698
239220901 945050
43296970 39343
49851488 87119
202885427 74624
187371721 883906
112937764 46439
115044455 706057
121069253 191357
179388925 667736
125633706 328637
215600603 429985
281556505 360386
202154291 519749
231690490 648711
13041...

result:

ok 50001 lines

Test #79:

score: 21
Accepted
time: 267ms
memory: 45052kb

input:

50000 50000
15866 27232 972016
27007 9767 888127
9104 13964 48289
15712 10111 359512
36555 15959 986908
24087 6408 266683
22280 47473 418334
41392 20148 17097
21651 670 770392
4363 21145 276731
19525 7716 946054
24866 37265 215315
47367 20002 427520
38391 25782 975635
22999 24426 977551
19658 8494 3...

output:

moonrabbit2
120145469 698947
69799841 183283
13270073 138465
44988448 439337
299663416 884795
128103089 802141
115667536 330951
30584029 202430
17055667 57634
339064358 822875
223045844 890843
83982993 449665
184755078 709999
247479641 594182
32038901 339943
63774081 398978
37836788 187409
238179566...

result:

ok 50001 lines

Test #80:

score: 21
Accepted
time: 380ms
memory: 49336kb

input:

50000 50000
17029 9952 723852
32509 18956 474275
14488 5476 42797
49631 35169 644610
30292 31961 867985
10933 48243 825086
40016 37334 204309
17984 41937 689085
25187 35079 749500
47353 13204 752535
38198 38747 203091
32344 14412 425753
18696 1558 492885
34623 23478 512837
5854 46658 215504
29733 35...

output:

moonrabbit2
61187701 156459
297873366 367699
201791936 129365
172833019 311981
97984169 804088
266758031 812368
267786559 99312
104966529 419087
189046849 180378
319623512 954071
102985932 557267
3935648 13225
202655204 946045
46010139 287779
3601988 23197
136136242 170903
91937629 740564
109823709 ...

result:

ok 50001 lines

Test #81:

score: 21
Accepted
time: 340ms
memory: 50652kb

input:

50000 50000
15145 27192 699879
35453 39821 284615
1798 6188 971896
21744 27523 897005
33622 25095 524870
14844 16036 383488
32326 1589 181773
10640 44456 328368
31084 22483 471713
32265 10011 228339
8909 37339 203232
12052 10887 444702
32726 21810 782442
10539 34015 274231
14983 37081 644945
22679 6...

output:

moonrabbit2
171371555 615014
98990673 760808
103122039 276364
108011463 912481
310462747 665416
74994774 279989
40100885 437593
122507998 554139
125962703 315109
56029264 300993
224433882 712309
24641072 39893
27816814 302103
276791140 850783
140048791 458916
203188056 326581
116910341 992321
135419...

result:

ok 50001 lines

Test #82:

score: 21
Accepted
time: 282ms
memory: 47236kb

input:

50000 50000
40125 49137 304427
11929 21975 951791
41413 36113 9759
45951 1157 589797
19152 25875 326398
18133 32755 647839
21880 20457 875365
29765 2240 250180
45267 46688 530006
18850 41618 387821
11959 9172 209823
31424 45723 873893
47345 43822 309116
41846 30571 120496
26326 26783 51321
3128 7910...

output:

moonrabbit2
36177067 1
140540577 4
310104964 1
391710316 7
54658945 2
317936993 3
279344963 2
285433775 9
135071639 1
156614233 7
119527809 2
33353821 3
376529528 5
197116414 7
239862830 1
85745553 2
164262056 1
316091006 1
276651895 7
214292420 7
73023729 2
161718443 8
286914043 4
108081071 5
16954...

result:

ok 50001 lines

Test #83:

score: 21
Accepted
time: 267ms
memory: 47156kb

input:

50000 50000
4 31638 755214
38307 5693 768538
25126 8596 168311
24631 13932 400742
30282 29899 851851
23951 44621 505286
9129 42373 514498
48630 27955 317713
20272 4069 945870
16420 45142 660249
4734 47106 574638
35837 8750 314080
30174 46427 832579
5973 35392 636810
17052 1975 714915
23112 23035 375...

output:

moonrabbit2
84816787 2
27618360 1
359701443 8
326610879 5
145326493 7
149923316 3
124234386 7
232934202 7
257850071 4
419112850 9
61628807 2
84238299 1
329334311 6
67002695 3
142459309 4
81454894 1
186548602 3
351286232 9
183965741 8
236008389 2
45662654 1
504155023 9
295309699 7
102175159 1
3448287...

result:

ok 50001 lines

Test #84:

score: 21
Accepted
time: 215ms
memory: 48952kb

input:

50000 50000
28174 1671 35968
44321 36519 420089
8463 22640 292013
25873 29400 906053
29064 46773 322613
38638 8579 830501
42831 29178 59669
34712 49578 666278
32289 38916 906982
46594 21745 914961
31403 18634 470568
44558 13839 175564
9695 29192 382976
38586 3680 75455
27335 45884 397763
10197 43523...

output:

moonrabbit2
8943566 434249
20163621 660998
12450633 693811
20335225 228782
1801340 46419
18415007 293508
17798956 587897
3136190 52551
17971043 38239
16910538 982913
9488785 28239
215273 3094
17541779 130231
19213370 576899
7386652 162229
14381801 344496
18933701 70010
8764175 485097
18970173 263078...

result:

ok 50001 lines

Test #85:

score: 21
Accepted
time: 317ms
memory: 47696kb

input:

50000 50000
49930 18081 644117
49671 29739 963863
21740 26587 349270
30237 29257 821691
38482 2365 64283
22048 29230 297074
24865 21096 869627
28473 30349 238233
15589 21795 227631
38989 3364 231071
12393 29938 626947
24174 21998 573723
49966 35998 583818
46369 35531 532569
32444 46848 559825
25817 ...

output:

moonrabbit2
12808060 776593
10916793 892889
19252786 743007
4615115 123723
12436441 703419
9587285 846379
1621568 81467
6611588 402825
14712582 745457
14620515 659303
16858986 757715
960823 47466
17894798 901285
12287687 451655
15335827 703000
5111877 282922
17643497 172818
19130288 800179
5241301 4...

result:

ok 50001 lines

Test #86:

score: 21
Accepted
time: 242ms
memory: 51008kb

input:

50000 50000
40125 49137 304427
11929 21975 951791
41413 36113 9759
45951 1157 589797
19152 25875 326398
18133 32755 647839
21880 20457 875365
29765 2240 250180
45267 46688 530006
18850 41618 387821
11959 9172 209823
31424 45723 873893
47345 43822 309116
41846 30571 120496
26326 26783 51321
3128 7910...

output:

moonrabbit2
242438267 152772
9561364 72561
161979897 771595
291526410 288667
135764997 618806
62245969 165823
158139918 58951
138867903 430100
40877099 970952
279962527 73547
93586301 89758
249857323 329889
197909516 534595
359351634 259567
230549549 436471
5644057 34999
168400679 959792
43958107 13...

result:

ok 50001 lines

Test #87:

score: 21
Accepted
time: 352ms
memory: 49152kb

input:

50000 50000
4 31638 755214
38307 5693 768538
25126 8596 168311
24631 13932 400742
30282 29899 851851
23951 44621 505286
9129 42373 514498
48630 27955 317713
20272 4069 945870
16420 45142 660249
4734 47106 574638
35837 8750 314080
30174 46427 832579
5973 35392 636810
17052 1975 714915
23112 23035 375...

output:

moonrabbit2
245427661 332598
172664625 267341
52430872 983233
14545891 81730
44481933 498143
303378013 554389
440746407 487027
473244638 678125
232648035 177388
488242999 916539
23901461 577073
358201483 453215
129245562 233093
91544361 969526
79199139 47863
3417327 33371
239004069 296032
514185419 ...

result:

ok 50001 lines

Test #88:

score: 21
Accepted
time: 388ms
memory: 47944kb

input:

50000 50000
30232 38841 1
37061 11286 3004
27540 5603 1
39685 17255 1
23303 33314 45572
22263 15161 1
30060 11067 49206
31564 14388 1
25594 18216 31566
28618 34291 1
18633 6792 1
33974 26192 1
9879 32405 1
6551 37828 14072
37928 13267 1
20673 45364 14806
25795 3840 22166
22587 7407 31578
2849 8303 1...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #89:

score: 21
Accepted
time: 360ms
memory: 48076kb

input:

50000 50000
26585 34204 1
1824 23698 1
24553 38248 1
38445 18541 35080
19642 25522 18970
40841 13547 8938
2750 18630 1
6287 47633 24420
3564 7814 176
45943 4641 1
663 5786 10418
38446 41821 34808
4021 24811 1
5381 5920 1
47020 7095 1
8359 38993 1
46874 17298 1
22122 37250 1
11564 41995 1
2902 40649 ...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #90:

score: 21
Accepted
time: 291ms
memory: 50408kb

input:

50000 50000
314 21696 1
13913 24173 27132
27183 25846 1
20919 46409 1
237 15136 1
554 15774 36440
37871 30969 35880
32718 33354 1
33935 44934 1
41996 44060 1
30223 18764 1
33234 27702 1
29931 34063 47604
9964 6568 1
407 25741 1
5860 24221 29680
48710 23797 1
9878 2997 1
8962 38143 1
42771 31178 2866...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 50001 lines

Test #91:

score: 21
Accepted
time: 344ms
memory: 55188kb

input:

50000 50000
17695 9087 263859
37220 4749 498702
49899 8768 861144
49081 31647 566180
35422 7720 511233
10126 16033 326576
10136 44437 148361
43252 9415 650797
36320 39547 272630
12365 46318 81919
16817 1564 619264
34699 3241 363411
23322 24905 411156
8297 5791 577732
31620 41499 315605
19092 42474 8...

output:

moonrabbit2
1649363821 461080
4397184409 142783
20618582955 382658
22897248310 693849
5608836840 32257
726036173 348039
19387214329 713850
3888534377 288746
2208916651 149670
1597162748 139869
1318299161 90323
9850946356 209649
1792187513 7445
23815869627 488962
734424879 31832
16152838555 940263
95...

result:

ok 50001 lines

Test #92:

score: 21
Accepted
time: 396ms
memory: 53128kb

input:

50000 50000
37158 27995 38352
4103 6189 216216
23090 41196 682307
18468 960 278001
15770 5702 610291
48104 6503 267505
22379 39681 372509
25553 4048 277151
9684 22962 263204
9694 15654 38642
27420 33487 185012
48985 49520 454358
34910 44076 869930
49523 48348 725935
48874 49508 818290
33955 17026 21...

output:

moonrabbit2
4159533527 110192
4160716520 113057
24959316363 851927
24920175405 899288
4991593122 18625
24959909608 333897
2494287807 23596
24965844607 405358
12461217533 68195
24924412511 710916
24930907281 213860
24949651626 456169
24930279773 393075
24942978495 598924
24957658210 684187
2492270604...

result:

ok 50001 lines

Test #93:

score: 21
Accepted
time: 278ms
memory: 54728kb

input:

50000 50000
1444 35263 295272
44685 6854 124289
39318 10332 350425
37439 10086 789540
25997 139 717850
14414 23579 212774
1628 6266 172373
10868 14096 492495
47258 28343 440097
19095 5266 575903
11384 18421 963751
22119 28784 85714
8450 14748 864392
25425 5214 797540
29652 8377 344446
29929 34702 77...

output:

moonrabbit2
7138394446 428919
14086570461 833188
8839739887 460374
20516823962 527587
9553577651 291983
1475844096 496075
3093152161 71340
6940025935 429153
20927255663 986307
145195341 351128
11082893375 337229
14927389151 357647
16809641963 857309
21255278219 920819
4844090824 312321
16392142620 3...

result:

ok 50001 lines

Test #94:

score: 21
Accepted
time: 408ms
memory: 56396kb

input:

50000 50000
4446 20560 356999
17821 10749 247629
377 8091 275190
21960 45143 767282
42960 5692 800947
205 47863 217226
47632 27972 226003
30873 1494 301163
33777 37138 329094
19592 14087 271517
43419 29330 646292
32981 15025 990333
13781 40447 592232
17846 6180 146467
12712 14237 5394
8150 47217 988...

output:

moonrabbit2
1660721237 42998
24875713237 238778
4979418451 171294
24884923465 423319
24897181299 698294
24901665197 514861
24880864496 958557
24903169399 644307
24900339764 387357
24919505874 930025
12459522801 323740
24885616801 673944
24908679289 544055
24921677231 503189
12437554624 498423
249082...

result:

ok 50001 lines

Subtask #3:

score: 5
Accepted

Test #95:

score: 5
Accepted
time: 847ms
memory: 69908kb

input:

100000 100000
0 1 213617
1 2 967030
2 3 775032
3 4 505755
4 5 584670
5 6 478373
6 7 934089
7 8 274771
8 9 94919
9 10 201468
10 11 555776
11 12 530533
12 13 812779
13 14 78486
14 15 35907
15 16 613290
16 17 115129
17 18 414055
18 19 290156
19 20 373454
20 21 778454
21 22 337075
22 23 555529
23 24 974...

output:

moonrabbit2
48884074951 292792
13147147341 458303
1225398214 11699
27340670843 215559
28148697691 499660
13341326497 259690
24297840047 153547
11139295447 115607
32961396067 566507
49578768583 860478
3752048882 13965
40820157590 454333
8934653406 80105
45525041839 174790
49810508741 249866
435847117...

result:

ok 100001 lines

Test #96:

score: 5
Accepted
time: 774ms
memory: 67868kb

input:

100000 100000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 10000...

output:

moonrabbit2
99999000000 1
99999000000 1
76334000000 976921
6196750000 26099
11199875000 49539
42041000000 336647
5425400000 54443
19278400000 195923
50733000000 627683
82502000000 776569
14609000000 58363
532000000 10009
33990000000 536113
318872000 3433
14972500000 106681
29146000000 102083
4727800...

result:

ok 100001 lines

Test #97:

score: 5
Accepted
time: 912ms
memory: 69104kb

input:

100000 100000
0 1 260798
1 2 22277
2 3 258129
3 4 17490
4 5 34214
5 6 548411
6 7 2695
7 8 836111
8 9 179237
9 10 896112
10 11 542851
11 12 965143
12 13 1428
13 14 88154
14 15 924579
15 16 43889
16 17 706418
17 18 541558
18 19 806758
19 20 569963
20 21 751585
21 22 710593
22 23 43952
23 24 395031
24 ...

output:

moonrabbit2
13245425399 238634
32112424429 572705
26122374775 474389
41406529808 16679
448153117 565204
48063813683 546483
29242650175 898608
1455139552 788779
2742894229 83900
24044188329 149540
341583553 372545
795073049 338164
14381458057 310659
42659566099 772273
17208388225 33632
21202561159 20...

result:

ok 100001 lines

Test #98:

score: 5
Accepted
time: 842ms
memory: 66700kb

input:

100000 100000
0 1 358487
1 2 807577
2 3 773981
3 4 459101
4 5 183256
5 6 349274
6 7 594863
7 8 512934
8 9 820306
9 10 384287
10 11 662338
11 12 373835
12 13 397399
13 14 252992
14 15 44605
15 16 572038
16 17 425727
17 18 337594
18 19 143751
19 20 730164
20 21 47141
21 22 668716
22 23 984207
23 24 55...

output:

moonrabbit2
48917696879 648892
46243427323 500617
17436888965 464199
25873817033 454862
29522753188 978999
28643104885 970743
27067704928 623131
39532691769 642673
49752156158 515023
4840751233 96863
7889598860 453729
4811225999 19715
7930753181 166139
4316377803 238892
3051387299 257687
390858133 5...

result:

ok 100001 lines

Test #99:

score: 5
Accepted
time: 721ms
memory: 69480kb

input:

100000 100000
0 1 1000000
1 2 1000000
2 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 21 1000000
21 22 10000...

output:

moonrabbit2
99999 1
99999 1
51000000 499
60257000000 12779
5300600000 45477
12717500000 139801
20451000000 189713
3451000000 331029
2330120000 27419
135734375 81
11979000000 925307
13440500000 214063
5015000000 504961
2040200000 54541
13181000000 25759
6169000000 129093
24337000000 556399
5936200000...

result:

ok 100001 lines

Subtask #4:

score: 6
Accepted

Test #100:

score: 6
Accepted
time: 471ms
memory: 56960kb

input:

100000 100000
0 1 308120
0 2 334554
0 3 784231
0 4 200542
0 5 322271
0 6 145147
0 7 701703
0 8 697197
0 9 230649
0 10 66406
0 11 192060
0 12 646979
0 13 994898
0 14 790273
0 15 857997
0 16 500846
0 17 614504
0 18 116003
0 19 860435
0 20 408561
0 21 807567
0 22 865625
0 23 912380
0 24 159361
0 25 445...

output:

moonrabbit2
1881133 342039
4877 678
317444 24413
1970494 11123
1619685 16108
278673 257257
1139409 399295
1098511 681253
1255719 107615
436724 34089
1678613 187200
120616 9709
1621523 688489
528290 228877
675740 326129
1418730 49439
651085 61383
525369 50459
1792279 741719
1475969 748173
129925 7299...

result:

ok 100001 lines

Test #101:

score: 6
Accepted
time: 316ms
memory: 59344kb

input:

100000 100000
0 1 418629
0 2 877816
0 3 917273
0 4 926291
0 5 627458
0 6 154431
0 7 850602
0 8 458714
0 9 627425
0 10 470412
0 11 750013
0 12 36304
0 13 730619
0 14 306484
0 15 61993
0 16 119516
0 17 180488
0 18 714124
0 19 450732
0 20 472613
0 21 646631
0 22 707120
0 23 890406
0 24 980442
0 25 6871...

output:

moonrabbit2
43925 17132
543704 892043
475962 162257
646307 992824
238464 783791
98725 75621
31702 147273
480551 25612
656306 828831
447592 262475
35651 50018
886265 786202
264927 205576
594163 90961
148771 113641
850223 409278
44057 309310
46844 45177
285349 301298
159675 867847
194841 141314
181795...

result:

ok 100001 lines

Test #102:

score: 6
Accepted
time: 278ms
memory: 56952kb

input:

100000 100000
0 1 793552
0 2 270002
0 3 480492
0 4 262651
0 5 225850
0 6 641128
0 7 973861
0 8 590257
0 9 756267
0 10 173723
0 11 356824
0 12 643461
0 13 58614
0 14 267585
0 15 322691
0 16 770726
0 17 705444
0 18 178467
0 19 807834
0 20 396503
0 21 478130
0 22 605088
0 23 116418
0 24 508273
0 25 614...

output:

moonrabbit2
668926 38155
1615216 924749
1059201 461777
452309 759393
164044 267785
1527333 30337
396613 7873
144489 29764
1590879 124268
1583959 12893
418610 266827
63418 8633
271002 369079
1355249 721949
475063 435738
530703 245930
1436174 254421
486974 30767
1355721 84146
1860406 523297
1599998 60...

result:

ok 100001 lines

Test #103:

score: 6
Accepted
time: 563ms
memory: 57716kb

input:

100000 100000
0 1 712495
0 2 609255
0 3 888263
0 4 368784
0 5 175143
0 6 805283
0 7 109793
0 8 435820
0 9 857337
0 10 366919
0 11 339366
0 12 577081
0 13 525018
0 14 973405
0 15 836416
0 16 19970
0 17 614788
0 18 695123
0 19 20311
0 20 786489
0 21 892467
0 22 51132
0 23 128093
0 24 113264
0 25 60836...

output:

moonrabbit2
1225946 772839
1796577 973646
757177 183081
55195 16449
1459528 101501
1599876 247013
772279 750315
968019 215972
1395308 85275
996315 164051
285287 724303
1314415 41057
1831299 325000
1344841 585304
1266227 323975
347561 139235
1341807 338765
924910 676357
159331 336667
1672485 114427
5...

result:

ok 100001 lines

Test #104:

score: 6
Accepted
time: 599ms
memory: 56808kb

input:

100000 100000
0 1 753762
0 2 959883
0 3 304088
0 4 532866
0 5 83128
0 6 860312
0 7 372879
0 8 693503
0 9 231253
0 10 804733
0 11 296783
0 12 817391
0 13 736820
0 14 270608
0 15 138835
0 16 228667
0 17 319283
0 18 666222
0 19 868091
0 20 449488
0 21 590292
0 22 535860
0 23 407948
0 24 33119
0 25 2286...

output:

moonrabbit2
847690 553643
723934 472365
799245 714244
271443 184265
190845 193216
12112 8379
697625 767426
168131 168295
8110 41357
482104 314647
1192743 859403
633277 855920
103790 189327
336259 811457
1195013 959501
604340 537329
1528995 502586
623503 882249
1174504 541187
1329397 899679
751727 93...

result:

ok 100001 lines

Test #105:

score: 6
Accepted
time: 363ms
memory: 57300kb

input:

100000 100000
0 1 712495
0 2 609255
0 3 888263
0 4 368784
0 5 175143
0 6 805283
0 7 109793
0 8 435820
0 9 857337
0 10 366919
0 11 339366
0 12 577081
0 13 525018
0 14 973405
0 15 836416
0 16 19970
0 17 614788
0 18 695123
0 19 20311
0 20 786489
0 21 892467
0 22 51132
0 23 128093
0 24 113264
0 25 60836...

output:

moonrabbit2
612990 276979
19229 25836
457747 840285
664209 216245
201 465178
875527 312033
1452294 741599
265691 417845
103331 8554
755399 377942
1616469 45565
297019 258867
9125 15562
1433501 824477
725873 442490
753407 360251
13312 20597
188631 82976
357284 98481
192291 366386
613920 220633
172413...

result:

ok 100001 lines

Test #106:

score: 6
Accepted
time: 240ms
memory: 56792kb

input:

100000 100000
0 1 753762
0 2 959883
0 3 304088
0 4 532866
0 5 83128
0 6 860312
0 7 372879
0 8 693503
0 9 231253
0 10 804733
0 11 296783
0 12 817391
0 13 736820
0 14 270608
0 15 138835
0 16 228667
0 17 319283
0 18 666222
0 19 868091
0 20 449488
0 21 590292
0 22 535860
0 23 407948
0 24 33119
0 25 2286...

output:

moonrabbit2
190875 147601
249541 357122
654454 294337
703456 499835
43501 151974
620441 767426
95751 313634
1395343 795506
916071 903613
332533 629294
348919 233526
330351 63109
21171 535603
997355 505323
797609 708178
416365 502586
76610 33819
736781 899679
913300 578121
2245 19028
331721 299213
45...

result:

ok 100001 lines

Subtask #5:

score: 14
Accepted

Test #107:

score: 14
Accepted
time: 431ms
memory: 58908kb

input:

100000 100000
79032 30329 248444
88464 37167 111467
39863 17716 351134
54587 41263 457638
29720 44292 788955
35224 34773 21953
35197 81607 854881
10506 53579 730874
42849 18020 284719
11562 2134 691047
9748 66972 829044
40305 74689 96507
29530 57073 963318
60683 93450 502599
31421 18784 58037
38493 ...

output:

moonrabbit2
2467705 357807
6853519 638322
404573654 473209
1464100 298263
2635493 429398
2477489 329431
858933 245050
4529473 93542
302027555 226746
181135365 44231
16328789 15163
128285001 267818
179420957 177601
6798501 8398
122542662 30179
1278475 104363
354676453 541540
451874933 381408
15019271...

result:

ok 100001 lines

Test #108:

score: 14
Accepted
time: 412ms
memory: 57624kb

input:

100000 100000
11628 34665 640275
85997 34272 78723
43885 3101 454144
23243 37973 367215
56805 95794 419151
20412 55456 293957
52794 50316 163389
70085 91411 433883
60858 95018 344902
68924 4510 542692
91786 68845 655669
67436 38606 384553
51104 2262 306362
99714 92719 172729
91005 10680 966143
44939...

output:

moonrabbit2
420538217 498276
938536 267721
743037 59185
486081328 677243
366449293 198164
567746539 149346
30363093 726143
8148109 169470
23505951 34144
798283 214379
20906207 390158
23049692 125455
434146715 671364
363350934 441085
236882786 52411
52071087 18860
45939323 21102
476594431 10624
25901...

result:

ok 100001 lines

Test #109:

score: 14
Accepted
time: 447ms
memory: 58904kb

input:

100000 100000
12760 44151 563786
99966 78803 822982
20344 26809 879942
57009 58308 185227
68314 24129 785460
26284 57721 600213
65249 87931 252079
32471 96136 394142
48147 28548 941427
96600 57554 872915
17369 3419 515603
89028 16140 553259
88834 72280 555184
65690 75377 858427
29265 90440 604903
18...

output:

moonrabbit2
79516245 228718
41248928 44661
21204332 2269
318064980 543899
31806498 11021
159032490 41989
63612996 65851
21204332 28619
318064980 72779
144371248 390609
318064980 42709
134854337 333362
79516245 7822
318064980 252017
106021660 8619
79516245 216593
1849215 1369
144371248 287205
2650541...

result:

ok 100001 lines

Test #110:

score: 14
Accepted
time: 460ms
memory: 59432kb

input:

100000 100000
61602 3914 100902
29458 33364 477233
29350 60103 709931
18214 31458 696109
70468 37304 461999
315 90315 250406
69798 84667 422253
82606 69830 980927
35835 88998 177273
81012 24816 322057
64691 75136 89333
12179 35186 798231
43333 61553 18441
84041 30061 786961
53366 16980 77714
71210 3...

output:

moonrabbit2
197666580 49859
395333160 116531
9883329 4121
98833290 22447
131777720 53519
197666580 23431
65888860 5651
131777720 41337
197666580 324967
79066632 133637
197666580 270523
395333160 220729
10684680 16177
65888860 97669
131777720 308639
197666580 218221
79066632 76687
131777720 190839
49...

result:

ok 100001 lines

Test #111:

score: 14
Accepted
time: 776ms
memory: 70008kb

input:

100000 100000
77681 64645 223885
18594 16529 616078
30173 50590 789639
54496 40592 557665
11886 76550 894635
97534 83851 177160
64445 53271 798335
35252 79178 78431
70759 57365 213594
93773 83840 459206
6766 27828 267553
71717 50290 182729
42935 69416 88654
33508 96992 553858
48040 39768 984819
5624...

output:

moonrabbit2
10011652835 52726
50058264175 318356
50058264175 254844
50058264175 187979
10011652835 19171
50058264175 658754
50058264175 452143
50058264175 422423
10011652835 67824
50058264175 344718
10011652835 55219
50058264175 245316
50058264175 150329
2944603775 10171
50058264175 123507
100116528...

result:

ok 100001 lines

Test #112:

score: 14
Accepted
time: 772ms
memory: 68284kb

input:

100000 100000
97097 4071 23670
68618 69097 384856
46381 93099 168113
45809 22438 926799
65039 7470 192065
85273 48487 645229
73107 82298 385370
30381 67387 156449
6011 40389 146783
903 55987 31715
28623 47298 176296
9475 54438 16923
58465 59428 721284
77398 8664 785027
45436 61109 242625
17191 44594...

output:

moonrabbit2
49926879935 185334
49926879935 355598
49926879935 101914
49926879935 326274
49926879935 329636
49926879935 372459
49926879935 521809
49926879935 629212
49926879935 725442
49926879935 33508
49926879935 266552
49926879935 713322
49926879935 197568
49926879935 685952
49926879935 72156
49926...

result:

ok 100001 lines

Test #113:

score: 14
Accepted
time: 640ms
memory: 68932kb

input:

100000 100000
70727 52854 526281
43196 88349 609664
29537 95962 150636
78013 67120 997338
6839 42743 646688
61306 99715 507261
23581 16870 271874
87904 71008 86899
71433 69005 715844
88470 73325 275679
44229 5568 731530
17570 53173 902389
25344 57239 592692
95664 97718 147883
57942 49122 708219
5104...

output:

moonrabbit2
24961420700 24353
49922841400 720337
9984568280 63287
9984568280 80031
49922841400 66059
24961420700 88427
6240355175 9557
49922841400 404417
24961420700 54899
4992284140 27531
24961420700 126331
49922841400 647649
24961420700 153381
9984568280 39043
49922841400 790827
24961420700 55281
...

result:

ok 100001 lines

Test #114:

score: 14
Accepted
time: 795ms
memory: 68704kb

input:

100000 100000
65739 71100 773914
1965 76721 48056
23762 39609 52516
74896 53680 957200
64334 19964 379861
32737 59093 509823
2532 93995 158357
34956 9872 558794
40563 91826 147122
92341 36234 388027
16821 97870 594865
96213 10052 46681
28984 94412 464422
8290 90244 40664
89509 9016 213317
14350 8542...

output:

moonrabbit2
49941473026 245303
24970736513 51398
49941473026 174427
24970736513 255427
49941473026 662783
49941473026 22407
49941473026 628577
24970736513 299051
24970736513 226087
49941473026 52495
24970736513 172715
24970736513 263787
24970736513 247361
24970736513 165405
24970736513 85176
4994147...

result:

ok 100001 lines

Test #115:

score: 14
Accepted
time: 788ms
memory: 69464kb

input:

100000 100000
45816 73216 984664
25864 600 404997
76582 20999 587212
41340 49250 423482
48518 59449 367341
8609 16782 455721
19269 78238 73985
70 24610 892082
63998 86451 267936
49017 63629 237258
69816 72384 490757
60111 60001 903595
31891 78235 215720
56388 87618 697996
21520 33698 783947
32843 83...

output:

moonrabbit2
49866945316 35191
49866945316 188779
49866945316 547431
12466736329 161807
12466736329 38168
12466736329 198602
49866945316 160899
24933472658 91581
24933472658 37219
24933472658 267863
12466736329 118978
12466736329 96016
49866945316 158077
49866945316 660029
49866945316 294387
49866945...

result:

ok 100001 lines

Test #116:

score: 14
Accepted
time: 535ms
memory: 56400kb

input:

100000 100000
54435 27803 717416
75956 30565 71689
7984 67854 561495
42853 28854 529674
83062 93241 963795
35946 82230 929046
4042 22224 164751
88232 33787 539174
30228 52498 502449
53720 13846 14841
20856 6373 267653
71085 5895 202984
72694 71707 249715
37668 88394 282680
70793 43679 866868
47948 1...

output:

moonrabbit2
117017777 210715
41670184 217057
70314513 78055
323584417 654408
191829611 58129
281790167 367412
319512169 273858
151055953 42482
152839570 225263
348425458 405969
396077795 206211
120575979 118529
171345818 115327
127117290 129283
45654563 10732
218222315 355209
203212649 152706
208162...

result:

ok 100001 lines

Test #117:

score: 14
Accepted
time: 524ms
memory: 59696kb

input:

100000 100000
64520 63599 656051
14763 86518 320201
62591 41141 169043
83879 49522 909321
37819 56908 327522
83032 37265 542967
16432 91292 345249
85144 78194 489925
51832 97985 588514
51326 16009 484445
53126 29227 593507
16389 78151 793365
76615 82476 535581
92631 82792 793824
32541 10628 556062
2...

output:

moonrabbit2
259357886 637665
88192541 50344
352885102 68711
71363077 276007
81269480 50209
296596751 389198
114480379 191596
10814665 848
352355131 590063
195077231 351379
382338781 327831
421430535 306358
300827255 89943
13480612 1825
368204684 753069
348273894 137863
366109414 301405
147537342 984...

result:

ok 100001 lines

Test #118:

score: 14
Accepted
time: 832ms
memory: 69368kb

input:

100000 100000
11198 97010 230749
14474 80549 107987
51761 18541 660517
54789 23196 339195
32180 22005 447628
56947 94028 373054
66056 35868 677544
65029 55702 686614
25159 89275 537985
25941 20010 398162
56160 89004 292524
65068 74412 941775
23125 54097 893912
47558 61650 637925
57099 98453 182055
1...

output:

moonrabbit2
29674197541 554866
41412527699 565294
46727172218 380913
43739433836 351445
33044553858 490697
223673420 14927
15648946505 85158
30716182485 154634
3310323577 72047
3930648044 178207
42408890879 292428
27862211603 829817
508838919 201613
41302699028 31605
22549919561 170985
3968076283 70...

result:

ok 100001 lines

Test #119:

score: 14
Accepted
time: 1012ms
memory: 68396kb

input:

100000 100000
97813 35480 900853
40029 54308 995018
12623 79365 353088
5534 98347 894470
36515 18722 861130
59680 6883 579709
93581 40639 255853
23330 4725 573594
54372 85577 330734
39929 31201 201928
634 96579 107891
8981 80345 97347
97967 92484 959154
23245 64566 8812
21701 62295 966763
42048 3751...

output:

moonrabbit2
371174846 2591
10206031067 102930
22857082162 13663
40351520715 310999
49050740429 179021
42080738564 798961
9514912290 53747
46628646657 377503
46603723807 821049
15980261355 175298
21604472867 309610
47678612165 229121
47741738056 443221
43260498027 153031
42970297227 482630
4170879635...

result:

ok 100001 lines

Test #120:

score: 14
Accepted
time: 993ms
memory: 69892kb

input:

100000 100000
16039 66771 320382
75567 97549 965012
55021 38349 946215
51868 11984 442445
10697 8539 767170
63913 53546 377344
43512 93572 334634
19731 35287 44239
67329 63178 677645
99798 58197 222172
78330 66430 992590
90902 51799 844103
89553 4860 657261
37089 41317 709428
9500 86543 146917
54901...

output:

moonrabbit2
47377342438 772861
46129507382 226951
47718091179 228073
49417676338 295207
46427974774 216481
46546490242 271057
112792511 1464
47422740868 403545
24931544671 265314
15099546389 322423
49892574727 669386
48514960670 109019
49914308768 231937
15378590677 55115
9378396153 60698
4566012553...

result:

ok 100001 lines

Test #121:

score: 14
Accepted
time: 867ms
memory: 69976kb

input:

100000 100000
40706 40940 2637
62469 87050 509274
25670 65377 17790
23728 33515 282940
98683 19051 29427
60027 88687 313407
92605 58946 724005
48229 32548 415366
22294 62405 798505
73590 52786 118178
12294 93387 174049
24790 31721 649447
35463 82494 274421
52833 1004 238267
93944 9095 301635
78456 6...

output:

moonrabbit2
48064378331 253001
49137848687 92150
48191366277 182489
48787347337 63728
47649753851 477058
24175292865 168923
12183004361 108083
49373058829 11886
49261666311 435101
16233437023 17565
48348799276 264889
24799627759 165654
48189029197 113083
24115563677 155215
9777473085 28969
379665318...

result:

ok 100001 lines

Test #122:

score: 14
Accepted
time: 831ms
memory: 68672kb

input:

100000 100000
64770 68304 87625
27923 94415 544424
54985 876 828077
57345 32342 161391
30147 32472 62817
86961 23269 545739
19248 99499 405299
2300 64899 755305
1415 11846 712418
34610 70187 725309
35279 3556 71651
14850 14204 158059
47562 40956 845922
44157 38779 105896
15104 27668 129286
56675 560...

output:

moonrabbit2
49486617015 205124
16582233691 19869
49954531931 146112
12394214285 78404
49558816543 198416
24817103829 326299
1075801897 11918
49928115908 736055
49613050025 76311
2069441941 14592
49944719803 474537
49774890656 194061
8296283288 95857
24963622831 247994
49952793361 6802
24868518195 22...

result:

ok 100001 lines

Test #123:

score: 14
Accepted
time: 842ms
memory: 69728kb

input:

100000 100000
27100 52187 371048
60170 34614 925980
64683 6481 400047
71577 75172 385179
10429 1549 956196
68933 96568 253538
38 12789 756619
97747 74479 433508
56818 39262 486858
58279 82471 61284
98883 37364 645966
45181 33385 605875
38547 43370 717807
93240 6494 997943
26778 88482 731281
49447 22...

output:

moonrabbit2
25078547489 210362
50164978447 339500
50172231271 401410
50144396903 327208
1003412537 16719
50160180121 360541
25080547161 76873
16713206363 215633
5571110549 2263
50144396903 205493
1617897372 17683
50131773914 375777
25085467046 9891
50149792646 379229
1114289549 7112
7168248845 18406...

result:

ok 100001 lines

Test #124:

score: 14
Accepted
time: 716ms
memory: 58808kb

input:

100000 100000
70225 16819 939792
16229 78889 107723
22077 12229 985984
6397 93595 958399
20453 99072 531028
34785 46458 682147
13443 95338 822058
35996 49839 459414
81819 5107 936014
4907 63476 886433
7123 4579 374652
89649 68308 681556
84718 15819 996259
62443 976 95598
98034 98508 47467
63119 4110...

output:

moonrabbit2
238719990 125977
501159329 475179
94512531 97396
258655241 67614
374948496 292739
522248254 645017
129583091 136846
530108207 70211
327909857 195999
529530895 120214
168303235 161909
198298637 312934
403898126 970699
460598653 435778
477229064 243443
183786129 18644
6035155 1249
45605801...

result:

ok 100001 lines

Test #125:

score: 14
Accepted
time: 695ms
memory: 57832kb

input:

100000 100000
34611 89569 684011
7657 39984 636531
16321 6822 713573
92419 93667 922201
40411 3596 76584
74742 95344 79344
61570 47331 485326
11923 84019 148826
5433 46975 150586
703 22570 540288
11845 49265 55596
9500 27822 464910
9520 17085 127894
85944 10783 707872
32352 16695 162160
82835 91705 ...

output:

moonrabbit2
461951771 137200
314140667 459361
396774737 772171
550824651 20923
149357266 3869
426759018 742781
352804421 440235
513656451 80194
106523112 21463
35773045 27094
411136849 709467
288302855 244464
520109397 297716
246903673 48907
127443849 161198
429642574 72713
250529623 20735
544490072...

result:

ok 100001 lines

Test #126:

score: 14
Accepted
time: 747ms
memory: 57672kb

input:

100000 100000
24499 15736 200293
46112 11254 64556
28586 99588 568778
37884 20620 29933
61829 95923 707976
47706 1753 149915
20979 15663 489968
94079 34826 911960
74330 67795 324970
78513 91858 563792
90378 81376 916522
85701 95000 561164
68229 48810 765026
73488 93515 854851
67369 60972 94327
65796...

output:

moonrabbit2
349905738 141527
239725636 67121
437702661 55130
173014139 125363
128797361 78784
446153255 320047
222161888 225655
227452503 303470
217054228 17557
430168631 322737
219018931 44686
414065156 390379
58181023 9015
450606885 314656
428417045 332009
91042287 46945
386144485 72262
314798995 ...

result:

ok 100001 lines

Test #127:

score: 14
Accepted
time: 623ms
memory: 57636kb

input:

100000 100000
80598 35557 613851
85884 12559 541892
82476 70277 529400
67123 23575 770160
64723 51546 541930
8620 7884 402170
47969 30956 687526
75492 87784 868203
91019 15754 956062
32956 30514 428925
8913 17373 101816
97570 11918 872111
20537 62463 232831
26698 50548 301271
30896 72611 361118
1878...

output:

moonrabbit2
167823617 3
212472328 1
191089293 1
162040597 8
207541653 1
338476241 1
190505092 3
360955677 8
52343761 1
330755675 2
325354069 2
176507166 1
114609091 3
347178838 1
307651939 1
198576317 5
368906416 3
330266684 1
67032143 1
382074277 1
108877615 4
368707759 2
43030522 1
189856051 4
342...

result:

ok 100001 lines

Test #128:

score: 14
Accepted
time: 622ms
memory: 59624kb

input:

100000 100000
64872 83862 698254
55321 81965 224344
98455 89181 181674
87859 16860 253248
82368 24567 321706
22683 85665 801115
81876 65443 42710
89829 24387 844424
73084 32009 484803
21456 52774 948091
18109 32694 834352
13150 1808 873200
5566 45638 368595
77224 76952 546844
3256 66259 128942
63202...

output:

moonrabbit2
17937655 80551
15351517 524828
3520702 160319
18691961 386484
17353950 60433
20408129 952915
4624383 57269
11740912 688205
19302582 23873
3537085 75946
1581403 52697
10225460 250727
20333369 55357
18721303 147342
1140893 38123
19248673 313870
20371039 572360
18326733 560737
592045 11089
...

result:

ok 100001 lines

Test #129:

score: 14
Accepted
time: 628ms
memory: 57572kb

input:

100000 100000
80598 35557 613851
85884 12559 541892
82476 70277 529400
67123 23575 770160
64723 51546 541930
8620 7884 402170
47969 30956 687526
75492 87784 868203
91019 15754 956062
32956 30514 428925
8913 17373 101816
97570 11918 872111
20537 62463 232831
26698 50548 301271
30896 72611 361118
1878...

output:

moonrabbit2
363642249 109336
187502617 84528
320837041 813334
189992359 65227
114428198 29511
203529604 112751
64574825 163612
196194497 242653
265228557 147647
115174053 178994
343485659 113796
122313951 390871
266008300 203303
368195494 632231
182094785 47808
362276102 435301
16890477 3373
4266156...

result:

ok 100001 lines

Test #130:

score: 14
Accepted
time: 908ms
memory: 63988kb

input:

100000 100000
57915 140 645010
20515 17411 304338
697 63970 598571
82885 24439 125761
30578 54085 86291
30570 36876 611062
74416 98679 211716
10951 56397 431273
51386 31187 345141
33482 10045 137116
66141 49349 993163
22439 58049 881525
30068 33931 355919
11541 84876 121996
27982 48191 121248
54902 ...

output:

moonrabbit2
15905608199 733771
46206862923 288143
48318627753 549493
38637220047 735812
479387869 15817
42385571109 14828
37138160591 48848
30110292302 85605
49448211952 697055
15323947987 79602
31294481170 438931
2153848684 31631
5365162219 26441
23182482183 146704
41656352303 574124
9853383547 390...

result:

ok 100001 lines

Test #131:

score: 14
Accepted
time: 1151ms
memory: 64900kb

input:

100000 100000
98944 30788 17041
93366 16205 615418
25899 42839 96949
48807 47780 998543
98356 33187 222912
76207 60422 20504
24726 51753 939865
91880 20637 177268
36323 65776 421566
6426 41149 896231
11044 6218 838193
47872 11970 991601
57152 81648 274095
92070 58337 759259
30461 42129 755367
83373 ...

output:

moonrabbit2
41142677671 619823
47439809742 161857
24458800162 6035
45472865714 416259
23590572264 82973
49543220115 722948
48097565602 109245
44737354709 687042
42094216009 460293
42737767243 848995
47389159146 82561
47991687996 163367
47902860704 765457
41153902766 276741
42173719117 579830
1191608...

result:

ok 100001 lines

Test #132:

score: 14
Accepted
time: 1311ms
memory: 67092kb

input:

100000 100000
28376 71594 185147
74724 72599 276771
98276 79325 295166
36323 80829 635287
44134 96806 414714
86068 57282 43761
52076 33087 120893
49923 30325 469339
78602 56178 812188
54288 68976 262030
49936 93696 694550
13518 51050 584665
48866 52581 593848
73517 93720 817121
83214 69796 40578
856...

output:

moonrabbit2
593252442 3671
50033166047 37265
22274442223 134913
14544625263 14296
22927295904 174163
14725562989 89828
8628592753 55208
22421548891 342926
46094337305 429072
22213604387 246149
11692345787 35072
44711750141 425628
43042992667 712637
47581104087 488318
16433235030 26677
638321780 387
...

result:

ok 100001 lines

Test #133:

score: 14
Accepted
time: 895ms
memory: 68880kb

input:

100000 100000
87349 60700 436857
50305 38940 197044
55631 66481 408794
17046 81088 457164
45134 60657 876355
932 29651 261798
94816 20595 744984
1307 22363 247365
66760 89592 440882
8212 4963 94935
35133 53600 886486
75013 79609 499014
44304 2079 577897
52219 54200 44686
29989 97458 385443
77341 490...

output:

moonrabbit2
22896343901 9962
47313909451 151457
47519638706 284333
47732519521 13520
1233712311 18505
47361627383 101895
47442983363 725809
50015528162 8283
45222454475 268942
49288145027 197544
49610668543 340343
4528926488 32541
48726650078 162447
816203139 1552
3842024821 14377
24515864879 424529...

result:

ok 100001 lines

Test #134:

score: 14
Accepted
time: 1243ms
memory: 67484kb

input:

100000 100000
49779 43618 6627
65918 20161 509657
31674 7554 938639
59211 59453 195375
44673 71266 265246
98359 61075 699537
50892 30252 466872
6446 72851 829572
60380 32640 599124
70855 60815 93518
13030 49809 520429
572 61679 448331
77702 36527 153460
52627 41714 412544
26456 63488 641672
52200 36...

output:

moonrabbit2
49003959593 379107
49111727380 138403
47746977422 381755
24797227697 370959
24606713509 6543
49074367853 146712
49892102163 103178
48986822044 568195
48308675957 77880
48023933899 177279
47821550308 635951
12301572292 138181
23900321419 23980
48679595147 90023
48390055802 172427
49806317...

result:

ok 100001 lines

Test #135:

score: 14
Accepted
time: 1325ms
memory: 67888kb

input:

100000 100000
45332 72269 559208
18538 57262 383360
67999 48819 179565
27661 72933 517170
82642 17660 581192
35608 47327 376932
66043 58539 916514
19277 15378 670672
86986 24880 44518
32123 43003 302965
96112 5711 219923
15520 78180 607177
20249 79607 660754
8749 93988 743341
52988 72902 200778
5853...

output:

moonrabbit2
1770949898 1441
49080383554 177249
49036948914 283145
4125666917 23150
49556834659 107781
24387830879 31517
49203549081 229282
1858516739 5938
3314098880 30139
24719568635 115067
49093709737 832893
49724044535 369339
50159162203 478303
49181113039 90964
48732179149 335965
5450935560 1697...

result:

ok 100001 lines

Test #136:

score: 14
Accepted
time: 955ms
memory: 66412kb

input:

100000 100000
8736 81597 375579
91002 87334 56684
65648 43907 714674
65292 69337 165312
92917 36848 26314
66884 43168 246198
59640 19132 529724
22157 11955 267769
73663 32222 843554
39996 44978 94712
1552 26029 144109
14804 58030 761177
62527 82116 86581
796 74319 614573
591 10449 726033
57899 83080...

output:

moonrabbit2
24845252232 149117
49783634748 228751
49996783814 268267
25044820235 108546
50045534317 233057
49100997920 62891
48778068127 818369
24532971413 166999
48790135975 303859
49777036845 410056
49182867717 25145
16606933673 32961
48962942611 297283
6128771996 18797
48859282517 360066
49101710...

result:

ok 100001 lines

Test #137:

score: 14
Accepted
time: 1225ms
memory: 67880kb

input:

100000 100000
929 87653 183024
90146 25778 602556
11252 73768 114153
6773 75321 401357
20533 5236 527170
50083 98439 69701
4727 17350 747660
28703 8560 310875
14623 35055 276508
72264 60111 20291
65838 6740 102534
71942 10168 824123
23913 7578 951819
68712 59656 189731
84225 26415 357583
94415 94472...

output:

moonrabbit2
49533893464 788641
49975760009 851162
24684687301 181202
12517196829 117341
4952120157 22426
49746840140 52793
16676109731 314126
10009261256 136775
49293466110 680051
24822099619 361271
49134959558 204685
49230298574 513527
16664156503 186738
24831532807 219043
24805404061 375559
495909...

result:

ok 100001 lines

Test #138:

score: 14
Accepted
time: 931ms
memory: 65480kb

input:

100000 100000
22591 5990 324250
52847 99263 114151
19236 90143 439195
13120 50098 644959
29097 94473 740949
12016 51081 291681
75310 72413 338817
67808 97782 280408
29378 32579 829898
46700 38698 704992
52982 96003 916244
91695 25533 242151
21487 96247 800831
72828 13110 48081
33732 93581 845036
178...

output:

moonrabbit2
16535210653 26631
49681459033 72128
4952951230 12357
24897295141 407699
49997933031 318886
4964323466 32617
16520101602 74549
49969073389 510130
49740798285 623371
49673839657 448770
49807778938 388233
49665859036 199347
49925958033 8284
25000163682 184861
16543726923 68915
49518471091 2...

result:

ok 100001 lines

Test #139:

score: 14
Accepted
time: 709ms
memory: 69072kb

input:

100000 100000
19486 73234 166527
81701 24351 736636
26734 31394 561620
1785 3943 510756
92504 99944 301992
605 59523 953194
72611 91766 572775
9118 26577 509234
2063 5303 880352
66549 57045 570872
29628 35942 248384
76160 31354 83748
50912 6301 516866
98618 9421 850018
51582 13960 137446
81581 22959...

output:

moonrabbit2
8325507826 23143
16649078633 19892
4995678636 19261
49957216492 522989
49917511009 602977
24966629511 90377
49924710297 506551
49950623417 447853
49962907074 364747
49924135259 26881
49924135259 151644
49941815524 97401
49947254657 674223
49947254657 111645
49918331746 87897
49935459967 ...

result:

ok 100001 lines

Test #140:

score: 14
Accepted
time: 600ms
memory: 66052kb

input:

100000 100000
29265 43275 502904
46999 21899 521396
49773 73575 176433
40536 18333 249000
33297 248 958368
17263 97901 893770
13206 7636 401669
13481 91762 471554
1382 45877 994771
68557 65838 107504
30739 722 707263
30048 65983 723415
70899 52977 504538
98947 48042 814681
12838 399 616417
51457 436...

output:

moonrabbit2
6087019455 1
38387694584 5
14236704229 2
47096406615 1
21471732567 5
7300276150 1
33164594839 9
24262542180 1
7945808254 1
3997202378 1
5266224071 4
30335793369 1
18380663105 1
33674862101 4
8138647925 1
45647553997 8
19248049528 5
14621251921 7
21592647719 3
34005984661 8
7946521379 1
4...

result:

ok 100001 lines

Test #141:

score: 14
Accepted
time: 1045ms
memory: 69696kb

input:

100000 100000
93765 17569 373835
26807 66249 570211
80866 27115 581918
36300 32624 259608
58250 65686 846253
87238 81154 584036
61036 49486 596295
56371 15493 430917
52971 40150 580303
18720 42725 201795
85834 93021 305460
895 38745 915650
70689 26268 319844
11663 3741 992855
18511 82172 735618
8349...

output:

moonrabbit2
46225450822 3
44954833469 8
44598080321 10
11747651603 1
4204265128 1
48933439277 7
23552642575 3
44092303751 3
6608609619 1
21280802824 3
13821562208 1
42042263094 1
45285770993 5
22584369376 1
42951241871 6
40288873499 1
44159023559 3
23004408509 1
45187097632 7
7876176920 1
4895432086...

result:

ok 100001 lines

Test #142:

score: 14
Accepted
time: 749ms
memory: 68096kb

input:

100000 100000
75076 87960 855166
53946 64604 26877
46418 46560 826369
23319 21485 209230
24223 56448 425018
99085 71243 391040
11271 70518 141143
23628 82772 857180
59602 3965 633988
62396 12842 80762
57971 51586 283032
64348 39296 594898
45836 18682 673426
9373 65998 351443
32538 91261 449476
98274...

output:

moonrabbit2
48356495860 9
9612707552 1
49572345344 1
45735961689 10
46765133821 2
15938815265 1
21715425259 4
45237627151 9
24867120291 1
44954761937 7
44517611818 3
6310353559 1
49504252462 5
12073654384 1
45821084984 1
44352725446 5
6397095566 1
44698295263 7
49779711470 3
45151414652 7
2161782804...

result:

ok 100001 lines

Test #143:

score: 14
Accepted
time: 958ms
memory: 66108kb

input:

100000 100000
71535 85193 585374
69226 10568 218362
67265 28714 683321
55163 49119 401826
65838 8287 268856
24009 70442 62511
856 98510 27658
58518 30962 332049
95746 75980 289344
45598 2818 771166
29516 42878 215903
82173 66261 342209
96121 44191 89272
11874 91555 753650
98698 5260 613238
35435 439...

output:

moonrabbit2
9614328837 1
23739643051 4
48114286886 1
46366684989 8
47829275343 10
49781106257 8
49317277867 2
22867432337 1
23077532343 2
48158239331 3
48432317668 5
48389146857 8
47459715604 9
49559910097 7
16691633048 1
45337100204 7
48057802102 5
11868339158 1
6695805649 1
16337258866 1
481314266...

result:

ok 100001 lines

Test #144:

score: 14
Accepted
time: 1156ms
memory: 65268kb

input:

100000 100000
30083 71021 820135
1023 45159 542365
48904 47663 54452
74451 36726 249397
19385 27506 796669
33632 68789 868392
60793 47590 859373
69915 76938 630285
15448 52395 914502
46722 5999 921306
92902 97985 303483
31594 89949 189970
40436 61503 707070
63040 76572 31548
93833 2374 185750
26818 ...

output:

moonrabbit2
48101039862 7
9759666735 1
48498446107 1
24927851465 1
47772345100 9
49792724531 5
12245634361 2
49593576659 5
48016737695 4
49724542894 5
12040527250 1
24101185753 2
49335618988 9
24981548736 5
24661070073 4
48936903447 7
24024509260 1
24174724039 5
48167062286 1
48879254093 3
491225524...

result:

ok 100001 lines

Test #145:

score: 14
Accepted
time: 1379ms
memory: 68140kb

input:

100000 100000
75914 94785 898076
14863 10402 522051
33776 86324 762841
15793 69067 51396
27582 54291 245942
55621 22373 184498
94617 91577 985914
45781 76544 272229
63037 28755 497200
28506 24196 721992
68605 74455 196570
49858 54744 291248
1069 76188 248549
95692 14403 865712
88932 75382 552733
641...

output:

moonrabbit2
49040402747 5
49834304727 10
48681132174 1
16589096293 3
6881351832 1
48256140761 8
9654264295 1
9816443948 1
4934698652 1
12024224501 1
24580935936 5
24890084020 3
6175307986 1
6886565161 1
48477556344 1
48710979811 4
48331957123 7
48967987212 1
49541080403 2
49083333523 8
24114773005 1...

result:

ok 100001 lines

Test #146:

score: 14
Accepted
time: 1280ms
memory: 65584kb

input:

100000 100000
90547 60104 491392
61889 26376 110706
46912 40160 213393
49860 90126 109974
57942 53856 161919
95950 31106 14207
33976 87632 845102
44407 6270 352453
15143 60259 659312
92911 65826 770943
13046 46957 473526
90714 58532 347476
84704 64333 597956
29738 25738 547730
41996 94207 953828
908...

output:

moonrabbit2
24870740291 3
8221136427 1
24275293064 5
49842930506 1
49806166288 3
4990686906 1
49571074302 1
49135589337 8
49400632971 7
49138083082 5
49819236749 3
49012862533 4
49483153461 5
49128288532 3
24926996341 3
48890366057 2
24433098109 4
24853350743 1
49614197659 1
24870740291 5
2466622912...

result:

ok 100001 lines

Test #147:

score: 14
Accepted
time: 1051ms
memory: 66128kb

input:

100000 100000
84747 6586 995141
57020 85888 934054
80112 16636 749200
37008 22750 793307
88831 67037 487661
18614 92832 521032
85000 13829 755223
56573 12124 681954
25366 65121 551674
46924 22220 932971
26981 13208 965685
78672 77334 613651
27770 94288 150240
48963 13511 804058
80516 60505 390800
38...

output:

moonrabbit2
49059567037 9
48945126155 2
49321802926 5
49172365946 9
49680895763 7
12340931240 1
49110099299 10
4951762467 1
49266633995 7
49581583763 2
49133262122 9
49007964385 2
49668397994 1
49512062177 8
49205899123 1
49346323516 3
24471032975 2
24551232931 4
49319089611 5
49512483591 4
49756572...

result:

ok 100001 lines

Test #148:

score: 14
Accepted
time: 990ms
memory: 65376kb

input:

100000 100000
4511 13332 238749
11520 96168 697427
79841 71600 973420
12836 52698 85517
72329 37745 324324
78412 58127 328377
83484 9081 940374
29134 88033 924578
92898 32925 248925
40051 77677 714344
85796 12422 567611
37692 62561 573050
6136 65225 114690
55953 60504 400036
75620 19154 372916
20269...

output:

moonrabbit2
16539281628 1
49559005637 3
16628491489 1
24944797549 3
49724057593 4
49969795627 3
49577123015 6
49846958073 2
25017681499 4
16613113339 1
50037960280 9
49678256758 3
16576083467 3
49924643724 1
12506299525 1
24888519214 3
25003281558 1
24958483365 4
50015074253 9
49599052855 3
49710067...

result:

ok 100001 lines

Test #149:

score: 14
Accepted
time: 564ms
memory: 67800kb

input:

100000 100000
4374 20899 97976
82938 37132 21018
55578 31978 282340
24544 22785 982146
95423 91391 836147
44996 66891 679610
65139 40040 437597
79655 57088 721203
89154 28573 920857
26410 97908 593918
87368 30355 887598
37586 27442 22911
32617 21110 801993
65565 9948 926943
26438 11300 28241
33 5490...

output:

moonrabbit2
49896770897 1
24950425501 2
16636853387 3
49943509613 4
49923145169 3
4992762613 1
49907805487 7
16632780167 3
49896643279 5
49934508355 8
49920472847 9
49908429178 5
24968858157 5
49910408927 7
49901586775 1
16647120319 1
9987895789 1
24964718970 1
49932879317 8
24951212047 1
4992832409...

result:

ok 100001 lines

Subtask #6:

score: 9
Accepted

Test #150:

score: 9
Accepted
time: 391ms
memory: 58100kb

input:

100000 100000
93969 0 382662
93969 1 79501
93969 2 520957
93969 3 376570
93969 4 150693
93969 5 541083
93969 6 597220
93969 7 265149
93969 8 197919
93969 9 640117
93969 10 696733
93969 11 275493
93969 12 168554
93969 13 676861
93969 14 883069
93969 15 323396
93969 16 378012
93969 17 862488
93969 18 ...

output:

moonrabbit2
1382657 544032
463806 547769
1039621 502219
67881 56282
1382657 259660
991144 285699
1054453 867241
1382657 516889
1382657 143336
513325 408248
15273 24232
1382657 318712
1382657 458677
1382657 282536
1271828 863911
1382657 66063
1242824 671259
338007 91784
658992 562229
99377 17891
1382...

result:

ok 100001 lines

Test #151:

score: 9
Accepted
time: 362ms
memory: 56836kb

input:

100000 100000
20136 0 31744
20136 1 642719
20136 2 857317
20136 3 942258
20136 4 637389
20136 5 664341
20136 6 728763
20136 7 426694
20136 8 868525
20136 9 246928
20136 10 79697
20136 11 379296
20136 12 129655
20136 13 904855
20136 14 566983
20136 15 815649
20136 16 842356
20136 17 252293
20136 18 8...

output:

moonrabbit2
1234156 136379
559307 254966
84663 495451
1361492 81779
814805 1016
344131 185913
88125 19067
1616652 376423
1403893 249824
568847 80581
788483 21179
119870 164721
272479 12581
1452671 284569
1891617 564728
1940879 978322
667227 494690
1189517 516189
1057421 15089
1878142 464593
1712223 ...

result:

ok 100001 lines

Test #152:

score: 9
Accepted
time: 527ms
memory: 58716kb

input:

100000 100000
44288 37752 299410
35 97388 734883
41982 7782 29036
77278 68741 791963
36493 79483 119
48365 4377 328082
60555 62359 564556
47213 27200 984957
63517 44846 261190
46299 12130 579217
92098 92001 744460
87878 80125 86309
93559 35998 419021
64919 6830 591316
52780 19027 836621
80232 60596 ...

output:

moonrabbit2
122046 17099
188385894 53515
2203593 291803
228095 2378
374045251 678151
165239024 92621
161213918 47917
341699553 548888
399476341 285014
331114 53091
2517630 503723
413937187 66020
212715 4928
54689050 20001
803885 703154
1662599 311725
619076 123821
2420290 915027
287713575 246791
418...

result:

ok 100001 lines

Test #153:

score: 9
Accepted
time: 500ms
memory: 58852kb

input:

100000 100000
95293 60988 10925
94503 3903 263691
79723 45263 756625
96814 39279 788469
17924 75557 512971
85640 70301 757984
5070 4649 227823
1252 11873 417473
65287 79060 475761
31878 41451 233072
95903 41829 201212
27197 517 645471
73428 65284 550657
88971 99028 170887
15475 62222 918610
50047 49...

output:

moonrabbit2
1210269 366577
1600716 313355
458408776 641799
446300125 377414
22943 29278
442339322 803709
86498373 203249
4399914 237065
420240297 759814
614590 432739
139354508 26131
323349448 254517
1134125 178336
372589 114256
750734 801001
85720973 425559
20865920 6149
30344544 191
104370529 2027...

result:

ok 100001 lines

Test #154:

score: 9
Accepted
time: 532ms
memory: 58760kb

input:

100000 100000
91121 55788 151653
66015 13510 556997
12031 2081 797751
2636 58331 828141
71723 10601 130817
52385 71010 877309
88992 88234 596083
82289 56384 222295
78519 38017 848176
80764 42996 747930
16643 57969 397749
13021 71265 411180
16423 15649 865664
84904 89124 270714
31072 9888 970414
3379...

output:

moonrabbit2
638543 822980
1726155 326413
928744 154073
732653 786790
380300 43641
587183 281486
464707 258115
1066007 498226
1325357 275468
293951 5083
1033309 955119
994737 590915
374603 673788
885361 13693
212990 302919
1559697 389479
232027 272301
11591 182777
693848 245627
759533 901987
34310 79...

result:

ok 100001 lines

Test #155:

score: 9
Accepted
time: 468ms
memory: 59092kb

input:

100000 100000
72262 6910 460518
99544 42124 509861
32433 13050 257574
98694 13091 844045
62266 86711 155768
99528 7696 292172
85665 46056 491980
72095 92817 981837
26288 82355 542982
12161 75136 87573
50817 37240 974625
62502 34409 33931
28781 39183 566928
13523 33746 252475
80248 38498 510053
78917...

output:

moonrabbit2
327590 427169
589654 348251
215122 84225
246575 385362
1834663 485204
698791 257167
708381 384619
755535 106772
1715107 920696
970456 447577
104483 2949
205829 60604
901949 763823
124508 51819
1718539 57139
9041 16673
52654 51207
2725336 336601
1524261 370565
212105 81932
1553082 982649
...

result:

ok 100001 lines

Subtask #7:

score: 9
Accepted

Test #156:

score: 9
Accepted
time: 535ms
memory: 65424kb

input:

100000 100000
14404 85036 1
16085 23033 46643
26279 34617 1
80367 35294 1
67695 57594 1
78450 39315 1
62640 36792 1
16192 15790 1
31390 63335 1
26051 33567 1
35882 27009 1
10252 23161 43001
29996 64903 7575
1460 99182 31033
85422 67493 796
27279 68234 36580
44622 79868 5109
87113 52694 40225
49912 7...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #157:

score: 9
Accepted
time: 540ms
memory: 65168kb

input:

100000 100000
79408 90733 1
99538 435 1
38502 88974 1
97033 5127 14419
57505 97416 26397
51136 7159 1
98487 66160 1
45315 56374 8064
55042 59407 45625
76192 58925 38293
5991 33608 24466
19249 14940 40475
14225 39750 33094
61666 73957 38463
53580 41049 1
24725 81153 49823
35279 62934 14067
5965 22687...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #158:

score: 9
Accepted
time: 512ms
memory: 65244kb

input:

100000 100000
14404 85036 1
16085 23033 93286
26279 34617 1
80367 35294 1
67695 57594 1
78450 39315 1
62640 36792 1
16192 15790 1
31390 63335 1
26051 33567 1
35882 27009 1
10252 23161 86002
29996 64903 15150
1460 99182 62066
85422 67493 1592
27279 68234 73160
44622 79868 10218
87113 52694 80450
4991...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #159:

score: 9
Accepted
time: 584ms
memory: 64928kb

input:

100000 100000
79408 90733 1
99538 435 1
38502 88974 1
97033 5127 28838
57505 97416 52794
51136 7159 1
98487 66160 1
45315 56374 16128
55042 59407 91250
76192 58925 76586
5991 33608 48932
19249 14940 80950
14225 39750 66188
61666 73957 76926
53580 41049 1
24725 81153 99646
35279 62934 28134
5965 2268...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #160:

score: 9
Accepted
time: 572ms
memory: 65108kb

input:

100000 100000
14404 85036 1
16085 23033 93286
26279 34617 1
80367 35294 1
67695 57594 1
78450 39315 1
62640 36792 1
16192 15790 1
31390 63335 1
26051 33567 1
35882 27009 1
10252 23161 86002
29996 64903 15150
1460 99182 62066
85422 67493 1592
27279 68234 73160
44622 79868 10218
87113 52694 80450
4991...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 100001 lines

Test #161:

score: 9
Accepted
time: 512ms
memory: 64716kb

input:

100000 100000
79408 90733 1
99538 435 1
38502 88974 1
97033 5127 28838
57505 97416 52794
51136 7159 1
98487 66160 1
45315 56374 16128
55042 59407 91250
76192 58925 76586
5991 33608 48932
19249 14940 80950
14225 39750 66188
61666 73957 76926
53580 41049 1
24725 81153 99646
35279 62934 28134
5965 2268...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 100001 lines

Test #162:

score: 9
Accepted
time: 535ms
memory: 58820kb

input:

100000 100000
78262 53984 99600
69650 58912 363432
17529 37775 268178
19412 63190 528402
81007 44662 310742
40430 61539 713131
57568 23157 328765
6433 31101 741749
12163 22607 60397
22688 51866 719391
40651 65781 407280
17200 87693 453704
38917 90835 426843
61646 56084 124613
5620 9244 650866
85478 ...

output:

moonrabbit2
127243351 830902
359062691 834919
199017954 398123
425816539 93777
44608979 322229
425816539 699098
425816539 177193
425816539 109425
425816539 30131
204921136 207381
115844719 929175
264447509 692328
32768611 52384
79486024 331163
15180643 79875
425816539 66054
122282270 725317
36234017...

result:

ok 100001 lines

Test #163:

score: 9
Accepted
time: 535ms
memory: 57916kb

input:

100000 100000
66039 16381 537208
16960 89800 173460
72962 95996 71938
31302 77496 284922
25929 33352 951668
36288 12108 951781
5417 60962 518789
56145 89877 998645
76255 45293 433278
32369 25975 898117
89151 46360 397664
78067 64872 472115
62158 4370 196740
24185 91578 361504
75545 90070 646212
5324...

output:

moonrabbit2
56031911 205994
458701099 344418
477160369 611504
31552015 63703
477160369 57065
68165767 19484
160246252 483753
477160369 502108
477160369 527468
477160369 957036
20746103 29985
58670446 135617
28068257 25143
260528201 644035
151102629 185140
168095733 543811
477160369 398943
477160369 ...

result:

ok 100001 lines

Test #164:

score: 9
Accepted
time: 456ms
memory: 58108kb

input:

100000 100000
57839 99173 779526
6587 32527 486455
6649 81543 499164
30457 52496 745606
22302 76069 210366
67094 84399 764423
11461 30 688005
64436 77247 639484
71326 15134 456836
1853 12937 835613
45915 65820 512272
8983 82615 604732
7509 34098 947010
65765 28671 507946
78993 61838 71738
86050 7152...

output:

moonrabbit2
96384001 893206
77697080 138029
305799601 951595
61892831 334605
52599006 95659
32679551 510258
31078832 78037
305799601 781689
219224185 554348
5186287 23844
310788320 967539
19424270 61141
260023350 764227
155546278 717243
305799601 505514
305799601 861456
310788320 515431
315594036 92...

result:

ok 100001 lines

Test #165:

score: 9
Accepted
time: 515ms
memory: 57868kb

input:

100000 100000
38834 31906 28279
67765 64854 807949
38873 19027 321100
90366 49646 49662
8997 96874 468304
34861 30783 550316
27643 83706 170574
98790 6269 20264
73726 5311 66830
91525 81874 83657
80174 24968 796987
7798 34299 643383
55996 11426 73605
48065 92219 36901
12063 15932 918216
25317 64854 ...

output:

moonrabbit2
50824481 700598
102354197 231547
33997372 326855
5339200 67089
50226739 109363
57629994 206131
73065178 188435
16104908 10655
54701120 214933
21054868 990375
102354197 298679
307062591 525256
280659034 467643
247620101 572676
39216941 178052
307062591 729463
2259847 4624
307062591 959887...

result:

ok 100001 lines

Test #166:

score: 9
Accepted
time: 1136ms
memory: 69644kb

input:

100000 100000
5399 48685 171137
57247 6077 103982
17633 49872 883930
84319 93895 372267
20891 19457 659221
59 96411 245473
69943 89566 949920
4905 79713 455343
7395 84465 248500
7296 12422 889914
8998 10492 756954
84190 93054 918800
11967 55582 548912
72828 42631 50641
91459 61299 434604
2760 83377 ...

output:

moonrabbit2
50170242953 690604
4049958428 68997
1581028981 78627
50170242953 80916
50170242953 750314
50170242953 457299
50170242953 706959
50170242953 85998
50170242953 484385
50170242953 937631
50170242953 513178
50170242953 573695
50170242953 422522
50170242953 816171
50170242953 394005
501702429...

result:

ok 100001 lines

Test #167:

score: 9
Accepted
time: 1076ms
memory: 68380kb

input:

100000 100000
73871 76945 619343
33702 32766 250409
21983 58187 434121
8933 54072 795438
3474 28679 776997
7990 55730 828622
92753 31244 543911
25729 65099 53310
88198 3118 985973
47565 88585 734015
72838 66871 153277
7095 12308 812963
52857 16661 50005
3639 52800 121616
97940 12726 658595
34426 134...

output:

moonrabbit2
50074806838 151829
25037403419 405673
25037403419 359607
25037403419 367935
25037403419 466976
25037403419 434163
50074806838 330275
50074806838 183165
50074806838 601815
7153543834 128829
50074806838 765741
25037403419 289386
25037403419 276666
25037403419 360791
50074806838 916775
5007...

result:

ok 100001 lines

Test #168:

score: 9
Accepted
time: 764ms
memory: 68176kb

input:

100000 100000
95297 72221 702196
73130 50994 331896
69323 88168 703399
57945 49169 765320
76548 11139 466851
9399 13121 158058
50431 56630 78090
87583 70733 591889
39661 78077 914697
4422 63994 22454
7648 59317 681950
35689 60415 340221
33622 25917 441434
75509 9654 297878
44990 67714 378984
7877 41...

output:

moonrabbit2
50024156086 120609
25012078043 193527
25012078043 150472
50024156086 15757
50024156086 243503
50024156086 671799
25012078043 418434
25012078043 276844
25012078043 76325
25012078043 443332
25012078043 43801
50024156086 438073
50024156086 67963
25012078043 189042
25012078043 497498
5002415...

result:

ok 100001 lines

Test #169:

score: 9
Accepted
time: 862ms
memory: 69384kb

input:

100000 100000
4446 12779 546971
3871 61269 70248
75202 20037 308086
42731 79219 812588
8311 42854 532371
83957 67818 406746
44585 48560 845269
1547 32927 466025
87286 4907 417141
16191 52272 356230
63588 32588 810194
57504 18147 276042
15469 12971 683851
94524 57693 936239
70617 77991 118353
8699 98...

output:

moonrabbit2
49938648357 698410
49938648357 90673
16646216119 111664
3841434489 59854
49938648357 911284
16646216119 83012
16646216119 117019
49938648357 4984
49938648357 426347
3841434489 45932
16646216119 145134
49938648357 975671
16646216119 244073
49938648357 34495
16646216119 120044
16646216119 ...

result:

ok 100001 lines

Test #170:

score: 9
Accepted
time: 920ms
memory: 68224kb

input:

100000 100000
5907 79377 333167
97324 35365 106703
12934 54961 322224
43388 90968 413664
28994 99703 621459
94525 53082 125198
56122 71495 643827
24311 37473 255272
44370 84004 502448
85789 17859 364799
20914 69793 44030
66291 73474 770527
41380 42691 419962
27286 85804 412669
67393 74555 989822
510...

output:

moonrabbit2
49790887303 387739
49790887303 923960
49790887303 159366
49790887303 30308
49790887303 693715
49790887303 43402
49790887303 615321
49790887303 969627
49790887303 129320
49790887303 55314
49790887303 853888
49790887303 623249
49790887303 960204
49790887303 341055
49790887303 900580
497908...

result:

ok 100001 lines

Test #171:

score: 9
Accepted
time: 715ms
memory: 68644kb

input:

100000 100000
79530 90468 523172
59698 45505 762757
49749 2850 408622
12375 41577 247620
43576 86654 854987
25915 67712 64021
33500 85007 315239
85937 87522 614301
98076 10535 734097
40497 23575 739669
2856 37198 993271
38713 49087 315113
92560 66816 712082
57495 99663 52674
48942 86136 470051
54692...

output:

moonrabbit2
664589543 62368
49831199211 622786
187757094 139871
16610399737 103202
10839224419 209926
16610399737 242071
16610399737 305598
49831199211 897116
33093704270 213117
11133770138 416583
49831199211 407387
16610399737 152956
11477529418 909641
49831199211 738904
16610399737 211294
16610399...

result:

ok 100001 lines

Test #172:

score: 9
Accepted
time: 1132ms
memory: 70452kb

input:

100000 100000
72707 63689 100604
59386 83261 868138
30935 22397 322831
39422 66159 241515
55244 14118 161789
91344 42 67466
68171 19593 256461
84539 54487 383450
55066 25733 334856
26260 18554 216723
84069 47188 953300
62868 57065 44042
47766 72596 342401
1415 35420 370145
31515 6112 794722
77387 56...

output:

moonrabbit2
50057051758 781819
3575503697 60871
25028525879 194165
50057051758 809609
50057051758 581755
25028525879 406638
25028525879 167123
50057051758 620357
50359207 701
25028525879 104766
50057051758 495601
25028525879 463200
50057051758 585681
50057051758 930635
25028525879 233848
25028525879...

result:

ok 100001 lines

Test #173:

score: 9
Accepted
time: 704ms
memory: 69732kb

input:

100000 100000
84588 95882 483000
28244 1240 364604
67359 62511 851916
82458 11942 852045
18993 62228 965570
32796 8522 326912
709 3886 246398
63190 90141 359898
18334 88776 230075
36403 42456 107139
66413 43881 497708
24821 30911 16452
57075 17804 995043
22617 78024 108369
51185 60433 923062
41381 3...

output:

moonrabbit2
49961210868 998623
24980605434 289283
2775622826 48047
49961210868 754021
8326868478 134905
49961210868 960493
235666089 3011
24980605434 455251
16653736956 100343
2775622826 46715
49961210868 715201
2775622826 18783
49961210868 726163
24980605434 298961
8326868478 137929
16653736956 316...

result:

ok 100001 lines

Test #174:

score: 9
Accepted
time: 856ms
memory: 69672kb

input:

100000 100000
2091 7693 174180
6318 83045 798854
95269 1930 607530
43894 72575 34269
50163 5693 299874
8264 82564 225853
99988 78051 91275
10393 64608 712536
20158 27107 143959
53973 52752 211101
23133 3029 976341
13483 70307 805634
74612 89395 971665
37661 65057 47108
67064 56212 335226
29981 12175...

output:

moonrabbit2
49861086175 723024
49861086175 827198
49861086175 839659
49861086175 758833
49861086175 189861
49861086175 612957
49861086175 941412
49861086175 174337
9972217235 185432
49861086175 830103
49861086175 806844
49861086175 758308
49861086175 955489
9972217235 154968
9972217235 193329
498610...

result:

ok 100001 lines

Test #175:

score: 9
Accepted
time: 895ms
memory: 70592kb

input:

100000 100000
11118 57363 42218
46907 6264 412867
4540 26051 460916
47286 75772 188428
55720 85783 155684
66581 92451 565756
30628 29397 259906
15657 11562 324672
89801 51396 136710
51992 43103 41674
33481 81815 430354
92946 80642 4071
81583 53094 71329
62428 39960 776272
21714 22939 112193
73111 54...

output:

moonrabbit2
24998538536 393655
49997077072 459641
49997077072 833871
49997077072 761231
24998538536 365471
24998538536 387289
49997077072 291601
12499269268 32029
24998538536 461741
49997077072 555997
3124817317 39250
12499269268 216423
24998538536 477519
24998538536 430901
49997077072 737559
624963...

result:

ok 100001 lines

Subtask #8:

score: 10
Accepted

Test #176:

score: 10
Accepted
time: 610ms
memory: 63740kb

input:

100000 100000
55628 58606 40689
5784 15690 24257
72720 4206 1
69608 99473 7530
48167 78928 1
53941 38396 1
51953 39907 1
97834 17721 14667
88387 64737 1
94122 38165 1
58616 20038 1
90640 40598 31512
84598 84729 9557
39311 27869 48827
95273 81340 27050
51941 93655 1
5842 33582 44082
5873 68938 1
5918...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #177:

score: 10
Accepted
time: 588ms
memory: 64708kb

input:

100000 100000
97047 42114 1
94969 36256 45537
48887 61993 1
1368 2485 1
95090 39485 1
5624 18312 42581
1747 2766 1
98129 99383 1
22296 10740 1
10144 9560 1
33153 71669 18317
49253 77815 30669
20703 36978 1
94219 18334 1
30301 68280 1
85025 23061 14510
38156 89908 1
46937 56324 42381
85063 69931 1
31...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #178:

score: 10
Accepted
time: 591ms
memory: 64964kb

input:

100000 100000
55628 58606 81378
5784 15690 48514
72720 4206 1
69608 99473 15060
48167 78928 1
53941 38396 1
51953 39907 1
97834 17721 29334
88387 64737 1
94122 38165 1
58616 20038 1
90640 40598 63024
84598 84729 19114
39311 27869 97654
95273 81340 54100
51941 93655 1
5842 33582 88164
5873 68938 1
59...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #179:

score: 10
Accepted
time: 675ms
memory: 63376kb

input:

100000 100000
97047 42114 1
94969 36256 91074
48887 61993 1
1368 2485 1
95090 39485 1
5624 18312 85162
1747 2766 1
98129 99383 1
22296 10740 1
10144 9560 1
33153 71669 36634
49253 77815 61338
20703 36978 1
94219 18334 1
30301 68280 1
85025 23061 29020
38156 89908 1
46937 56324 84762
85063 69931 1
31...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #180:

score: 10
Accepted
time: 559ms
memory: 65484kb

input:

100000 100000
55628 58606 81378
5784 15690 48514
72720 4206 1
69608 99473 15060
48167 78928 1
53941 38396 1
51953 39907 1
97834 17721 29334
88387 64737 1
94122 38165 1
58616 20038 1
90640 40598 63024
84598 84729 19114
39311 27869 97654
95273 81340 54100
51941 93655 1
5842 33582 88164
5873 68938 1
59...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 100001 lines

Test #181:

score: 10
Accepted
time: 575ms
memory: 63804kb

input:

100000 100000
97047 42114 1
94969 36256 91074
48887 61993 1
1368 2485 1
95090 39485 1
5624 18312 85162
1747 2766 1
98129 99383 1
22296 10740 1
10144 9560 1
33153 71669 36634
49253 77815 61338
20703 36978 1
94219 18334 1
30301 68280 1
85025 23061 29020
38156 89908 1
46937 56324 84762
85063 69931 1
31...

output:

moonrabbit2
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
3 4
...

result:

ok 100001 lines

Test #182:

score: 10
Accepted
time: 611ms
memory: 57772kb

input:

100000 100000
95091 94983 414941
36124 99427 107651
38227 31303 829690
418 23626 223287
20460 55118 339951
9549 28333 67199
87722 4426 758667
78595 49867 213528
86752 99901 717104
71413 87839 933962
35365 41095 61135
28171 3567 134648
50670 46655 18709
57749 67421 480441
29624 58705 197732
88172 512...

output:

moonrabbit2
45923431 98570
121445045 8129
531740608 503833
15934451 101500
273173531 947538
62300624 135773
241388858 383409
14180868 142967
254114897 433882
97673194 208383
465122068 861621
25888005 46217
2304957 30529
184287996 398675
369279693 694237
476666285 609442
132777584 43189
259320432 467...

result:

ok 100001 lines

Test #183:

score: 10
Accepted
time: 510ms
memory: 57292kb

input:

100000 100000
42500 60735 30787
46151 17635 115934
96868 86684 387251
88788 26840 781376
39767 35043 357661
90265 96723 888682
74471 69216 744346
29002 29952 514408
54631 46621 647691
5944 31286 754650
29289 5992 369924
52243 85072 298760
62856 12411 875528
33767 67222 841721
11000 7830 598007
8604 ...

output:

moonrabbit2
213448745 189248
67945699 121560
414056404 21889
13999124 23409
28755283 27121
374925022 380111
57233602 62535
438171163 822867
176778033 359293
61794820 125463
425651055 138212
508830062 562347
249065 268
98833787 907019
251874807 728509
31629076 56849
398900289 355790
301819931 540221
...

result:

ok 100001 lines

Test #184:

score: 10
Accepted
time: 512ms
memory: 59176kb

input:

100000 100000
37740 51562 94868
82111 89354 197970
19342 29695 60676
51891 23868 216299
21521 69642 398360
77324 71438 85787
68367 91253 85202
74933 2213 302752
34006 84889 889351
46858 99955 17480
33946 13361 198831
9690 21281 285676
78096 43106 538876
21795 15739 863773
31972 9443 651309
43243 632...

output:

moonrabbit2
56286656 142647
116195178 292735
146706933 197662
246606911 629472
124700993 963271
102115377 371138
63443309 425758
89168159 842202
139474506 470705
274021153 943228
273834447 647590
142934353 311334
132006199 314238
183415147 581091
177761061 310138
143143805 238582
278871077 942137
55...

result:

ok 100001 lines

Test #185:

score: 10
Accepted
time: 431ms
memory: 57824kb

input:

100000 100000
47227 72242 140444
63757 47719 632885
71559 44807 745456
96389 45984 804352
33913 55570 246880
61824 49798 343464
96940 45900 851219
5168 27128 879572
91354 51605 906717
10441 62620 362579
3320 35618 112321
95289 29506 184959
18493 98391 87094
5783 21622 635807
59042 10222 963630
69041...

output:

moonrabbit2
65475497 241244
260200778 545081
46865142 329245
34062321 44539
74346253 173822
68788132 340525
225854661 374560
288052974 487507
33949141 107831
61738898 161319
18277555 37706
197954101 258381
44157779 903619
300430169 545079
9763016 96497
252093110 980261
293343275 284143
60266937 1760...

result:

ok 100001 lines

Test #186:

score: 10
Accepted
time: 1076ms
memory: 69696kb

input:

100000 100000
47044 1734 611962
64286 10320 219050
74797 84654 142113
90241 55213 388339
94805 62488 828951
66770 65775 580319
53920 8198 876872
6645 86964 783931
79437 8664 955957
72519 14165 22005
26298 83552 280859
61546 31885 528097
58606 87396 348757
6286 95026 281786
38808 18507 834750
9445 54...

output:

moonrabbit2
26651189524 50827
7454585884 51389
5823230995 169036
10313586569 489524
1108820669 114317
28039775262 92477
15615138832 427571
18665312591 796794
20959158988 904723
8495916990 90637
22282865343 660839
2002056204 7765
2390767099 309233
14078206861 372752
23863093937 357843
14484601 68884
...

result:

ok 100001 lines

Test #187:

score: 10
Accepted
time: 1025ms
memory: 69904kb

input:

100000 100000
47538 48235 324670
21346 97221 271513
21463 62428 39978
5613 91585 507625
30203 78615 609164
41995 24175 174349
69018 89749 63126
40397 66301 633160
63108 78410 294969
52505 87350 247072
79148 33802 537343
67471 99460 68628
8312 69335 447511
33157 13373 26252
88778 79515 836337
95520 1...

output:

moonrabbit2
24856941439 89329
40048686644 671607
49489712101 610029
47019566531 277031
6906162671 153216
1957523753 12526
5853713770 41383
49842016266 299113
42509637356 259209
15751555145 136117
41636278202 988997
42343894769 804735
42981942569 97421
42883914490 596523
45121142291 985108
4874875014...

result:

ok 100001 lines

Test #188:

score: 10
Accepted
time: 932ms
memory: 69456kb

input:

100000 100000
30597 3157 732322
13795 28388 993207
82472 91018 39976
30781 78906 321271
4841 30174 470057
96391 4610 37086
58724 5158 607146
64138 59108 436910
57712 34926 523061
97740 75662 122087
90321 52674 882905
75819 25687 160749
77135 62578 513652
1371 72696 828840
3614 64140 302643
243 95882...

output:

moonrabbit2
48137239702 406591
45923581477 662478
47639932202 249561
49993954988 802659
997714776 17617
45266474503 196399
48438611292 667253
49166218793 412701
45209915604 797789
49523256562 761987
48823950833 502417
48989469191 333635
15758550482 134501
47437386394 503747
48413503868 215131
475094...

result:

ok 100001 lines

Test #189:

score: 10
Accepted
time: 965ms
memory: 69908kb

input:

100000 100000
22607 34127 229882
51170 86586 931028
4315 99184 984908
70509 22680 850722
35625 8132 887930
42832 29823 524676
68679 34247 402473
50253 86688 510638
381 71999 747622
86910 37939 244147
19988 85471 297507
5098 7605 790887
80737 3397 91455
41279 90877 698949
34169 63188 332297
4743 6023...

output:

moonrabbit2
47504272594 623107
12253495571 30370
432162273 2450
15872501900 114857
47511757403 456116
24738557009 384417
16347676354 142655
48278328193 347917
8009237126 152567
47610041777 803095
47517951461 98220
5371830160 73587
24349146349 114538
49272875422 715507
24320252627 51023
48227867100 8...

result:

ok 100001 lines

Test #190:

score: 10
Accepted
time: 987ms
memory: 69744kb

input:

100000 100000
5182 1586 920659
73529 80824 517572
27576 97841 615710
52836 51834 890341
77342 63926 675304
96978 84651 294756
8148 21945 47453
90156 73426 384080
56483 48680 952243
96233 64856 267157
38130 29593 335649
26706 48325 149073
55572 17292 767697
260 89286 320166
86852 1697 535379
74648 58...

output:

moonrabbit2
24873623080 252697
49618179916 905447
9920553521 81221
49562292316 674599
7118731663 62253
24801190018 41665
50024585062 718341
49963668787 331541
49987396511 673285
49704729794 577125
24954116917 62721
49802103851 589077
24777456010 296079
49556716649 412327
49969314865 587177
496640081...

result:

ok 100001 lines

Test #191:

score: 10
Accepted
time: 921ms
memory: 68468kb

input:

100000 100000
55971 22906 303753
45511 19377 922079
7107 65834 814133
62154 53712 251838
84085 3512 402989
65932 90476 454000
8537 52635 63913
3673 16370 910288
53105 46792 176039
10875 53396 656487
62368 46897 950282
34358 47580 795498
92736 45087 146303
31317 31371 993735
86387 78186 882401
61065 ...

output:

moonrabbit2
49952382209 308631
8324096138 89639
49956225925 559474
24980327677 26060
24973913552 176803
24984298961 456832
49946799133 360127
24988348591 63979
49942076399 73996
49941132241 964771
49979161931 689425
49978478477 94480
49950295813 963728
49974704981 60211
49960655354 568149
2497697937...

result:

ok 100001 lines

Test #192:

score: 10
Accepted
time: 978ms
memory: 68496kb

input:

100000 100000
98517 67098 45861
77145 83632 7701
45203 75771 819427
64262 41652 860236
27237 9883 199837
34046 23535 371701
40299 84203 677291
70238 54288 744429
61792 42052 762395
81794 46763 306664
7433 18518 919685
9189 83832 747429
18486 42467 667484
15984 68591 404770
17693 44240 226375
57046 4...

output:

moonrabbit2
1813876481 57548
4363536638 419753
8888498354 753207
48972106610 690843
7686289271 479371
48961661626 489999
37593262144 932277
14389229827 372076
25264244800 596343
18200411969 849554
3837250100 109637
22493698832 116445
34865573711 577949
2697433000 38363
17780741819 496359
27968967694...

result:

ok 100001 lines

Test #193:

score: 10
Accepted
time: 1221ms
memory: 69632kb

input:

100000 100000
44976 15989 887730
68064 85732 186012
72939 20242 880150
95960 2809 74555
80163 28830 49722
5303 7603 790428
23773 1717 132526
70516 78480 234717
19940 80229 971844
95973 20003 666099
29445 96443 513990
83401 57805 752699
38801 87393 35306
989 3189 340111
96907 83926 220996
56707 33476...

output:

moonrabbit2
48398786951 754961
13906809549 310186
49216262642 610021
46055339985 968123
42225134267 179021
40643687545 505457
12419604943 41850
42277590924 417667
45013828807 742736
43239967529 571753
47261439413 493820
9847410018 141673
42322844319 896468
43165206811 632667
42073174653 747088
40153...

result:

ok 100001 lines

Test #194:

score: 10
Accepted
time: 1099ms
memory: 70152kb

input:

100000 100000
60613 83828 434641
47892 13767 541507
4862 38641 286784
76716 50245 304683
14395 29856 605167
81141 57291 978557
3318 61410 183285
53340 1273 451027
82397 84356 538655
98786 92430 526636
23217 37136 746023
697 31590 601416
60391 22817 524262
78359 14176 323446
99118 2657 573574
31975 1...

output:

moonrabbit2
23778662552 302161
23940282912 371027
24597367052 249747
47016546507 560218
6108727567 55489
6886136149 130458
45983399741 517455
47089232471 738690
15654754652 171581
45269602253 844081
47055572849 834499
22961096215 384153
7703798744 107733
45660746311 934543
22760190493 308978
2945783...

result:

ok 100001 lines

Test #195:

score: 10
Accepted
time: 1161ms
memory: 69944kb

input:

100000 100000
54169 27929 404173
83848 45463 343825
69312 19788 690219
78314 48664 522908
58447 5244 879906
79351 33838 633780
54247 78347 271811
50356 90868 838258
83903 50658 398826
13725 17007 628152
27219 46495 817231
92163 97956 721385
86749 51338 913627
25639 85994 39834
86373 6352 713278
5315...

output:

moonrabbit2
24541494755 456082
48208642883 898455
24128041606 378831
49082321388 619195
48466499174 906537
49615457899 733836
24526200547 383737
49898157704 887941
48234438365 496737
24194754378 460259
49496719805 362201
48835162078 823679
49001767592 909151
48157951847 760947
24775286069 473023
494...

result:

ok 100001 lines

Test #196:

score: 10
Accepted
time: 1183ms
memory: 68344kb

input:

100000 100000
66068 58074 928790
87092 17139 40575
27750 38942 540816
52930 95369 437360
48277 29765 153321
90925 63851 318556
40548 24131 334804
83813 28986 358357
12640 57688 775578
30885 4415 631582
25383 89724 999714
35137 12027 361682
48666 59124 619250
93993 5395 550979
36167 62453 905589
5973...

output:

moonrabbit2
24870991061 423551
49704860736 790745
49692272194 814187
49755572003 555746
49905821683 969751
49791303826 508693
9934229307 155999
49935646509 677840
6207003833 109100
24957425079 266342
24784848956 487727
49807876151 671071
49847207338 604749
49700308157 820162
49983062031 756001
55380...

result:

ok 100001 lines

Test #197:

score: 10
Accepted
time: 1092ms
memory: 68740kb

input:

100000 100000
88474 34279 455335
38262 41357 394988
67518 29038 288709
74590 35483 902149
83186 64148 764297
17781 2911 301607
85204 50674 401771
49223 60881 617981
6238 37735 388001
82029 22309 528231
51687 91832 552341
30982 78443 786310
82607 73379 928023
6010 8451 341079
13079 98148 207508
64849...

output:

moonrabbit2
24995482177 241661
50027066706 932155
49998059774 323551
50012974303 905466
50009766839 532819
49992794263 498069
49994125343 941028
16660664674 227937
49979585672 793455
49992794263 991493
847814534 2939
49980210855 905819
50000105023 640861
50003632555 550382
50003601867 577535
2500845...

result:

ok 100001 lines

Subtask #9:

score: 11
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Dependency #8:

100%
Accepted

Test #198:

score: 11
Accepted
time: 748ms
memory: 59408kb

input:

100000 100000
43617 3055 25074
6788 19759 655385
5223 90019 388180
31244 16467 392090
70468 93900 926994
77026 6658 91718
33419 9326 246284
52972 74730 764056
81598 34756 854544
99471 34749 38293
84277 28636 90659
86749 85555 329202
95659 57082 168257
30896 59244 678194
86353 41634 361697
62790 6177...

output:

moonrabbit2
25158375 153971
269026620 1513
30823677 93050
172116457 84557
101492961 427642
170174821 54328
179469398 234723
134838002 935245
229719371 292934
188524659 40274
1666697 253
371444461 313886
56743337 166214
380855660 745877
79054102 764331
89463656 327175
23409551 71623
194040052 142529
...

result:

ok 100001 lines

Test #199:

score: 11
Accepted
time: 759ms
memory: 58804kb

input:

100000 100000
58654 42596 744993
90932 59594 557941
40392 59816 689533
83025 27865 765324
41808 8331 495006
87000 31193 764670
88611 22349 157005
31083 32212 355489
14624 21161 302101
50634 41742 397954
1867 84388 495485
37315 42194 632838
6793 7378 289810
35301 3806 842002
91113 5146 788329
7595 73...

output:

moonrabbit2
103660494 127279
381222800 720691
205570749 280609
113952290 41681
156648773 755022
110942581 127865
392631308 367407
133695105 293654
355643549 799175
357064238 472007
32565519 988826
63657712 527369
306386259 91928
16540643 50591
70592914 633331
436334813 124512
199146853 644828
215680...

result:

ok 100001 lines

Test #200:

score: 11
Accepted
time: 776ms
memory: 55664kb

input:

100000 100000
69719 83931 238572
8750 84900 500415
58323 6019 4847
95265 17109 37585
60882 70877 900998
34988 14219 701571
93073 14819 415267
35514 21326 871253
76964 99888 483809
14846 88832 319895
34909 35212 691937
95214 12573 459483
96448 4244 968597
31163 40408 32619
33910 98981 515931
34054 46...

output:

moonrabbit2
425720615 390267
555627612 645071
141615773 58489
68856747 30970
541592689 83254
140183596 329339
80359149 233921
397743981 169891
189076032 954671
267647751 386504
480287795 142214
327221143 645732
69822091 99816
38214050 85359
241909165 383861
356884021 642527
127116779 174418
48160251...

result:

ok 100001 lines

Test #201:

score: 11
Accepted
time: 763ms
memory: 58908kb

input:

100000 100000
81992 65356 820744
78092 85602 507628
60030 35802 18806
55449 95274 128100
93312 65411 738980
39346 87202 222416
16448 4830 795511
54572 11868 795584
23612 21359 91882
9881 91413 559871
8852 19159 259372
77458 78851 239387
47712 89079 268936
72304 16561 92133
72903 45397 73798
18021 38...

output:

moonrabbit2
71515891 160114
267511071 886795
50541799 261894
318912707 580712
172730063 460574
139836759 758357
54465535 216906
254970323 473298
14126581 55743
56761502 427671
274425782 856889
86029357 788410
41110301 172180
15878786 18079
98802744 175559
73559813 211067
68785599 282787
53982966 277...

result:

ok 100001 lines

Test #202:

score: 11
Accepted
time: 811ms
memory: 59084kb

input:

100000 100000
12566 22644 424919
50154 88911 648261
282 8809 953223
74273 81773 758335
82671 92091 329222
22849 23349 815961
51055 21881 483541
40894 80693 253224
47084 51913 665836
67595 21995 705664
58469 5957 600477
30265 11468 783866
50173 49930 809976
14211 95065 192630
97429 2831 241905
97664 ...

output:

moonrabbit2
146684432 628945
381733080 536687
221550061 270803
172368325 488042
305924809 963554
402781 2024
15650079 51943
47105713 110425
6257251 28669
344233469 737636
29504477 328547
64521330 498611
7740632 21641
279272349 472681
52432712 335599
310712060 611401
36199526 79341
160288569 296441
2...

result:

ok 100001 lines

Test #203:

score: 11
Accepted
time: 678ms
memory: 57820kb

input:

100000 100000
78567 1800 558031
97661 92481 492729
80290 86607 254788
93444 91666 959407
50445 81218 720158
33644 77984 774506
86958 90769 768988
79541 22323 623352
20413 12179 403413
93868 32267 829633
6027 76651 610510
80004 37186 456060
99340 11642 415951
2784 92613 969508
44163 59494 981171
1128...

output:

moonrabbit2
78364475 253219
140295659 355218
57802550 454261
195615042 978749
41306089 194888
308546319 617684
144332442 853939
268903059 455102
95710824 310775
307020215 48637
239189702 692527
173055839 930887
76297966 99895
339534380 521201
278674447 286360
151385261 362627
5026827 105748
96786391...

result:

ok 100001 lines

Test #204:

score: 11
Accepted
time: 747ms
memory: 57400kb

input:

100000 100000
77308 43960 206697
85095 42989 865718
62677 66236 398613
51289 22986 871546
5412 38456 727246
96507 36067 925360
69332 85046 473008
84181 3199 801504
82605 61108 716004
63574 50052 887789
30126 58958 775046
97815 16532 656726
92811 30986 697032
30600 79722 939256
21976 16994 270485
949...

output:

moonrabbit2
87555949 1
191648062 7
389847070 9
210448977 1
465777544 7
213487367 9
130355741 1
315609087 7
78495605 2
347221601 1
93938960 1
58269627 1
203970830 3
411759733 9
37929866 1
118478197 3
458257087 8
66409519 1
401071269 8
155146441 6
83458961 2
456815514 7
390476159 8
431666775 7
2912000...

result:

ok 100001 lines

Test #205:

score: 11
Accepted
time: 874ms
memory: 59356kb

input:

100000 100000
13689 58281 28985
80550 97902 488287
69937 5151 53567
46079 98932 997307
65475 23053 914731
85785 79641 717285
34500 77914 57510
83543 25879 627802
65336 61825 231835
54085 15843 965656
36591 83651 600649
22324 30013 418645
35022 82121 110297
64440 14809 246194
45644 6089 789362
78075 ...

output:

moonrabbit2
119651898 5
296503993 10
218535438 5
31049191 1
82576432 3
99782291 5
330995131 10
207596083 4
74819120 1
343813525 4
80421517 2
201731049 10
365045729 4
56807001 4
16950967 1
146910418 3
12857870 1
77156023 2
188569203 4
404563941 10
49183176 1
271814531 5
42806483 2
34570951 3
14751348...

result:

ok 100001 lines

Test #206:

score: 11
Accepted
time: 674ms
memory: 57832kb

input:

100000 100000
51700 14869 939375
271 75694 468973
33749 20017 11127
70038 51779 567595
94560 49431 905372
85141 77989 449322
33850 99518 746764
82393 43386 942719
65266 66438 631658
82588 24235 434756
73638 89142 311037
23995 46438 867375
36058 58738 769132
12432 38274 440353
19372 85489 826920
4486...

output:

moonrabbit2
6376267 60977
18688619 568774
17584325 278343
18528823 183003
8897094 166733
5610862 99237
2181901 1769
20178149 503534
9187277 583635
17641680 490181
17394326 319635
16653874 457569
7630776 274643
20421068 233583
6597803 288653
9332409 203630
7049693 295956
3448053 193723
2894065 170934...

result:

ok 100001 lines

Test #207:

score: 11
Accepted
time: 872ms
memory: 55344kb

input:

100000 100000
13071 79179 398184
78715 25084 541842
99902 98374 452132
44372 43201 243728
81097 42131 481674
16264 76180 360263
6484 68473 290084
88798 6048 201669
45361 45779 816880
43656 65310 29996
38376 58674 721139
76500 68695 61101
68994 91870 345811
27578 12217 933365
48792 50586 807846
49643...

output:

moonrabbit2
15185665 914803
5405505 196222
17041861 904026
19183717 601386
7145684 499677
7688397 260194
13687769 763252
12000581 575706
11327285 147429
15907721 781144
12557765 532989
14244991 617929
8322896 295489
18386241 809695
5292635 326618
3025757 131711
7712371 231019
17782001 324685
1338691...

result:

ok 100001 lines

Test #208:

score: 11
Accepted
time: 836ms
memory: 58824kb

input:

100000 100000
77308 43960 206697
85095 42989 865718
62677 66236 398613
51289 22986 871546
5412 38456 727246
96507 36067 925360
69332 85046 473008
84181 3199 801504
82605 61108 716004
63574 50052 887789
30126 58958 775046
97815 16532 656726
92811 30986 697032
30600 79722 939256
21976 16994 270485
949...

output:

moonrabbit2
225606839 325181
467030173 916027
100774492 409229
205717305 963484
39730298 322479
60158487 522329
441053939 368433
408148412 104977
331397928 485839
398933413 681371
18365077 188585
452161059 157777
394935856 359733
369964174 513099
359255863 36775
218619433 160753
195663571 247789
273...

result:

ok 100001 lines

Test #209:

score: 11
Accepted
time: 864ms
memory: 59068kb

input:

100000 100000
13689 58281 28985
80550 97902 488287
69937 5151 53567
46079 98932 997307
65475 23053 914731
85785 79641 717285
34500 77914 57510
83543 25879 627802
65336 61825 231835
54085 15843 965656
36591 83651 600649
22324 30013 418645
35022 82121 110297
64440 14809 246194
45644 6089 789362
78075 ...

output:

moonrabbit2
73166987 658178
401519227 683487
127423633 222586
102988148 686411
40225251 164834
47661118 193743
113982805 207433
45625001 239368
103764873 188996
394806255 843136
439643687 422430
367186167 267554
315609243 107401
240408915 315206
200278719 482357
452536864 625345
145856107 367448
170...

result:

ok 100001 lines

Test #210:

score: 11
Accepted
time: 1003ms
memory: 62384kb

input:

100000 100000
84375 34249 48816
21340 57578 1
51834 42147 1
33977 37267 24948
52974 69157 1
74425 36267 76032
65505 25471 1
6355 58262 5824
92427 20326 94850
20379 12364 55874
78983 79109 94806
74444 43009 17790
42800 60360 1
11337 91382 1
88288 18716 15904
79509 30534 1
51598 16619 1
29044 96670 36...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #211:

score: 11
Accepted
time: 1175ms
memory: 63676kb

input:

100000 100000
42168 71619 1
95612 73323 1
6037 42699 28762
42982 77603 1
5268 78771 39612
19662 64934 74074
54181 72932 28356
29821 51032 32240
25820 86114 39500
44435 73976 1
96753 40862 1
53171 96880 91908
89936 4180 1
75502 93492 31804
74759 18418 57714
64498 29355 4268
19944 95610 85292
98526 13...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #212:

score: 11
Accepted
time: 1043ms
memory: 64696kb

input:

100000 100000
440 16587 1
97148 40695 1
62348 70789 1
70364 86677 1
97102 2636 1
60509 36721 83416
93744 22218 1
72558 84088 84474
24093 23676 1
45694 28701 1
93521 93404 1
33257 86656 1
55542 21568 1076
28596 42693 46494
45927 51127 1
37282 21311 91702
82963 35669 1
17198 64115 1
38957 65431 53936
...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #213:

score: 11
Accepted
time: 1028ms
memory: 63632kb

input:

100000 100000
84388 29139 23992
61215 51168 1
70847 54508 1
59618 85724 89578
569 88175 1
89512 93465 52160
80391 11756 49550
95547 50241 1
98458 80366 1
81450 10944 1
22328 68246 88990
28178 60723 14884
91618 93764 9588
7084 86572 1
14623 83781 13674
56987 22416 1
76133 82152 66194
92368 86146 1
34...

output:

moonrabbit2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 100001 lines

Test #214:

score: 11
Accepted
time: 1324ms
memory: 67800kb

input:

100000 100000
24815 19788 655793
86707 63690 164521
86399 83991 853688
98918 60865 886569
53733 44331 174694
7935 38016 727425
23177 33795 425930
95396 69330 712522
11721 13582 399839
64218 93129 584642
30502 23952 955528
64220 13173 153435
79062 7735 298556
32182 91789 146255
61472 11330 191870
236...

output:

moonrabbit2
22768425476 189937
27352486345 989374
12262266047 14368
11083956720 802891
22647844383 891200
23928211880 137591
40847096896 586319
34010861645 284084
10684869482 121685
48166436285 648214
546699179 4314
29984213696 643481
11630883383 163918
40009469315 243043
3103346395 575467
407285525...

result:

ok 100001 lines

Test #215:

score: 11
Accepted
time: 1526ms
memory: 66504kb

input:

100000 100000
22833 81603 508138
94124 90413 642408
45168 84505 151447
8240 14928 835837
41120 58416 76673
33868 16003 776363
71398 99265 309782
43516 63845 787368
37976 99538 429959
95337 35738 292834
36456 38254 913220
71610 23285 274707
59204 59918 205353
40504 86802 521626
49020 69810 524407
693...

output:

moonrabbit2
48451142429 316547
13774769809 55177
44242614881 256125
42720440055 202619
42878391629 276942
9539930333 177502
24644003497 338616
48610628548 121237
14255842439 26980
23764526257 100989
1284081525 22802
8202298605 51406
44913312435 660617
19597043313 305572
14332585422 247283
1345972372...

result:

ok 100001 lines

Test #216:

score: 11
Accepted
time: 1412ms
memory: 64728kb

input:

100000 100000
473 9316 68968
16540 66426 571277
28604 16860 250664
40185 39394 630174
55689 7141 66579
45786 54326 828864
76853 90549 60512
15858 62972 434948
93470 84424 942678
32797 34992 615949
26341 72558 667810
48976 18365 573319
96287 45877 957419
45629 43207 621335
68273 21294 153187
79716 66...

output:

moonrabbit2
47780927067 835165
1568897660 15063
16468536186 226799
22005373607 220673
24054670183 223284
10830283010 216041
24389508408 423151
47460939423 553328
21625955444 216101
2165649710 41763
47520457429 180855
22223437556 392837
43798236927 374114
49769355932 456533
48112882627 368705
2175571...

result:

ok 100001 lines

Test #217:

score: 11
Accepted
time: 1511ms
memory: 64976kb

input:

100000 100000
75617 1997 802220
14726 38526 971608
94665 513 309564
94568 48672 228537
58287 59608 757843
58062 33181 129928
34723 99664 56600
30822 7563 225804
11153 68394 52453
5248 12601 724069
67302 15194 849691
15539 40343 654528
39001 1065 369531
6496 29627 435654
79382 44960 243832
89303 9790...

output:

moonrabbit2
47755993240 775691
48839900491 323751
1747644083 18760
24125649109 106959
46025094706 578009
230853705 1429
23373612340 419441
23354030755 495078
22802890989 276970
47166013046 452969
4820980276 46387
24393811949 456342
46879377871 490020
45831441992 984939
46563282193 99654
48898095371 ...

result:

ok 100001 lines

Test #218:

score: 11
Accepted
time: 1548ms
memory: 69636kb

input:

100000 100000
50084 453 608090
68390 5427 765034
47718 538 280018
33014 29734 475054
28491 5455 389184
51648 37085 954517
63981 56212 180424
7182 78298 15279
13024 69528 464325
71504 17599 600589
48096 45669 952888
40511 85364 219164
42128 52341 58044
37832 87700 181044
75178 55197 878847
12804 5891...

output:

moonrabbit2
50030837769 212095
24353413376 354797
1719763346 16281
48471884891 655722
24344823261 229678
16385430444 132149
48663947045 611374
24478632955 394481
9572481449 90945
48966629223 293378
47707154163 816023
49181992546 359737
48229399077 743557
47856066617 37812
48462619204 469685
49212488...

result:

ok 100001 lines

Test #219:

score: 11
Accepted
time: 1564ms
memory: 66752kb

input:

100000 100000
11244 45602 349380
85875 2748 673149
71637 45894 900187
91507 7305 424553
61932 31520 130279
20128 1922 617596
56528 16005 147711
91515 47262 502669
89194 12454 208645
57688 20168 474657
48583 42889 794751
89862 96551 331872
77606 12535 841573
96240 72713 800587
72026 55382 836796
981 ...

output:

moonrabbit2
9767755077 39977
16488434006 166079
49479023969 996123
48912882518 456749
48607161967 104101
49825504261 579524
9741043616 160577
49440154237 819324
12317248404 2551
48947885918 769393
49799682057 298840
48234109409 734402
24815268749 489403
49721949471 350329
24296866013 173058
24384289...

result:

ok 100001 lines

Test #220:

score: 11
Accepted
time: 1709ms
memory: 65180kb

input:

100000 100000
83787 35319 201974
53249 93022 141327
13929 27856 924482
57906 36307 854958
21565 18030 481255
61536 26223 564345
61297 40635 945879
39917 61812 895472
12730 62272 923714
61371 79811 566564
43129 79163 209812
84171 82337 373973
78759 32858 593250
32211 56083 564988
93442 45204 925791
3...

output:

moonrabbit2
16407228604 307915
48891914492 63617
49286289653 433582
49593231993 446243
49038631643 865970
49085765990 387899
49090739991 480323
49421952555 304918
24824214221 35763
48937259713 784570
9841984839 893
49621789703 770214
24510562075 413272
16300710073 321310
24606823079 170787
487229784...

result:

ok 100001 lines

Test #221:

score: 11
Accepted
time: 1560ms
memory: 68820kb

input:

100000 100000
68770 73025 568576
72093 1070 640441
82237 40008 784374
31769 4758 146340
77731 28724 855752
28295 55492 448742
60664 5216 979402
11381 54137 701956
60111 79592 860563
27134 8449 614164
53181 19519 722096
65672 86198 622937
889 36496 287964
86224 32483 990096
46252 48147 292717
80494 3...

output:

moonrabbit2
49978081858 781831
49517916485 93723
24770672125 42433
24622888968 160679
6200686143 15142
49015874794 980551
49107116076 895133
24995755645 15028
12392847074 245009
49874266801 366665
24860054757 394934
49278266051 411647
40809200 171
49239402571 163549
49683193172 250267
2771472792 471...

result:

ok 100001 lines

Test #222:

score: 11
Accepted
time: 1515ms
memory: 66376kb

input:

100000 100000
79429 10499 412491
80417 43680 66078
49399 30229 607735
84008 69860 854915
54723 9061 264129
2529 79986 461593
75503 69088 960059
87870 59331 783152
51172 14917 962751
78360 52733 735578
10587 50670 959726
7125 99962 846921
53873 2880 880566
2107 4299 931767
11936 19359 647890
29618 10...

output:

moonrabbit2
49826478215 535128
49515230599 900654
49495030812 820315
12408319043 136588
68611521 272
49807886551 20761
12454121927 89253
49556516257 136439
12339007650 223279
7083350771 107936
8291483549 120833
12424787625 244162
49763131997 841998
49462809554 646227
741055855 9729
49468887823 42039...

result:

ok 100001 lines

Test #223:

score: 11
Accepted
time: 1270ms
memory: 66204kb

input:

100000 100000
62789 36332 250426
11004 14973 861139
86923 30807 83947
12738 89697 684412
71472 41751 99811
85489 19100 713077
34876 54512 393695
15872 86937 856474
10721 48222 789926
98073 45766 343979
82637 75864 21822
96440 595 581394
36175 75057 837920
86991 39423 698117
47919 83866 467822
94055 ...

output:

moonrabbit2
49990848978 986857
49985362585 568269
24974856704 90117
49992539302 274519
49955731037 630165
49953387559 638854
49982259833 601544
16650012833 7275
49975406483 683544
49990848978 958193
49958922079 578064
6247241993 82280
24972907279 245117
12496647441 157976
49961486669 613633
49984544...

result:

ok 100001 lines

Test #224:

score: 11
Accepted
time: 1254ms
memory: 67584kb

input:

100000 100000
25143 95411 144086
53457 27203 901303
62282 1374 663240
87706 72472 22543
73853 43163 279070
35165 48877 942704
49844 87988 75507
84811 91842 286422
74510 47377 495576
65078 53780 884582
67172 60235 914060
61045 43046 798723
53328 41380 730218
29297 83143 7520
35897 97954 406754
26362 ...

output:

moonrabbit2
6012123259 137834
673149659 147736
9621974675 217412
29295205467 110258
6585592419 224941
39479752403 827784
5233486431 278128
6666774189 223981
22713637373 303642
1926659765 113933
525387870 11971
7298356189 406912
22294322668 226805
45128652343 950039
9993034561 680943
15201836583 1277...

result:

ok 100001 lines

Test #225:

score: 11
Accepted
time: 1844ms
memory: 65764kb

input:

100000 100000
47699 86916 285522
57885 50372 422637
10571 2778 192980
95702 96378 685672
8155 51249 276395
53340 50399 660048
91606 12183 813059
1431 86969 135531
85008 2818 464242
34692 86043 783579
62999 37963 526377
74714 91602 597291
38079 49986 862502
18308 1228 295020
87639 59111 906285
75790 ...

output:

moonrabbit2
40337830044 439001
42655524379 910283
48884156316 737065
49549692896 503505
49025229931 987394
22998696045 467104
375804666 6917
37158038262 737611
15072172895 112639
12122994349 96102
17125173988 368821
21821888679 221434
47817729736 780665
41777157953 899304
43289648383 673016
15203693...

result:

ok 100001 lines

Test #226:

score: 11
Accepted
time: 1703ms
memory: 67328kb

input:

100000 100000
1347 27045 821197
13528 56116 725243
44109 91623 123752
24634 28067 67479
60824 32891 354942
28963 96793 317750
29015 58770 467432
26721 58672 872142
60339 12059 875311
86875 44755 848143
82014 92365 775723
10320 32048 134183
1806 20448 592557
56670 39567 152834
313 99054 107806
83488 ...

output:

moonrabbit2
20650185420 365351
21914145867 193748
959490129 3890
22456375361 412193
46126725151 584994
42772368325 922001
46777227927 821963
44624391108 701971
21614110429 120907
2682175137 32339
23866942965 335549
46304543403 928001
47963753482 218199
49167324845 811722
48100438817 894864
802557767...

result:

ok 100001 lines

Test #227:

score: 11
Accepted
time: 1715ms
memory: 65240kb

input:

100000 100000
4643 42032 471334
5231 64519 509186
38973 43316 918033
81071 11353 992926
67516 70318 840987
11223 3215 397391
15832 81206 150344
32634 38005 897937
66480 70817 339274
84711 80004 310488
41488 14456 59699
66768 39984 400300
46111 32238 436004
44768 40180 497723
70739 68220 880906
69214...

output:

moonrabbit2
49542943077 805408
12469172267 169326
48939067621 894302
46623105029 654536
48086664365 971722
47035293286 691991
46288250806 911121
22498267301 340909
46665096877 327806
24453715451 320555
24098943980 251437
23125180961 418448
15192618646 275723
46687719737 767286
46060565943 84089
1125...

result:

ok 100001 lines

Test #228:

score: 11
Accepted
time: 1591ms
memory: 67632kb

input:

100000 100000
30201 5187 484209
23135 86192 536430
18285 66812 542185
99674 76670 256427
79855 4804 653471
68922 22921 780026
85719 29858 107813
74185 81243 142976
81096 30774 912814
76342 33001 175644
34445 72191 976849
33020 5072 105742
81699 56631 321293
39057 86845 629334
23109 62727 128653
5014...

output:

moonrabbit2
48262442134 891479
49592705235 896149
49388386367 842289
49411706797 946887
9629976421 96095
48223549135 660511
16446667745 266984
49521801305 268999
48929414819 868382
16193042834 118371
16331056467 266249
49484184709 692851
48270095896 524185
16075815006 321419
6232691684 122077
240249...

result:

ok 100001 lines

Test #229:

score: 11
Accepted
time: 1872ms
memory: 65688kb

input:

100000 100000
95538 24108 944082
83271 87752 263879
52745 19681 223721
4064 42941 467116
70340 23856 865111
59159 65921 713654
87375 48499 654293
36628 40265 973460
39195 94180 179544
25908 41151 819160
15435 31067 708200
89904 70071 413414
89713 54134 919667
89782 57787 963944
23706 36999 185246
11...

output:

moonrabbit2
24101566367 74573
48982010291 289626
49220074724 736555
48271133851 885612
48409889305 274893
16523753777 260539
49194377471 694495
48660396133 909311
9800572032 169069
48867868839 137948
48149894587 935637
46566816124 109651
2926017769 55692
48117306683 956092
48150588658 868903
4959951...

result:

ok 100001 lines

Test #230:

score: 11
Accepted
time: 1728ms
memory: 66900kb

input:

100000 100000
84110 59819 160246
59311 46370 952869
91071 35790 223719
80971 74517 504954
3597 19525 758708
71976 72118 609094
80813 54633 974121
49672 8879 744506
72553 3360 374931
13800 6713 661471
28859 97052 53762
71895 48660 538239
46 15226 177295
97975 89409 799235
57752 45384 908448
88039 216...

output:

moonrabbit2
24252592719 402812
24363402750 80221
49813971472 862387
48919699783 601719
49973702719 425205
49123555455 562333
49597652795 656406
49603342077 974426
49506521495 340691
24972981565 429231
24325802893 386165
49875592391 670436
49961759509 699789
49680860608 581173
48732540628 937283
2475...

result:

ok 100001 lines

Test #231:

score: 11
Accepted
time: 1667ms
memory: 69204kb

input:

100000 100000
88111 9769 567898
52557 17614 483075
14524 10172 191013
88269 72574 542791
33448 49852 843794
69004 87556 439127
31319 466 485438
61100 56675 580960
68926 5989 411534
13562 10716 279590
12780 58575 590812
50519 92948 406168
27982 37721 243436
3522 50549 410334
92116 98130 342050
77201 ...

output:

moonrabbit2
24595953896 186521
49421931348 820403
49395046713 727660
49134180739 745810
49850233268 593179
3100441024 29765
24867756351 377821
4089573941 24972
49886891039 635888
24547456058 493359
49724564867 845838
1063779202 18173
24786630587 457952
8324105212 165003
49217321841 983164
2476668418...

result:

ok 100001 lines

Test #232:

score: 11
Accepted
time: 1359ms
memory: 67156kb

input:

100000 100000
12201 25898 222696
10282 92882 978919
71871 61709 248145
47341 84072 615733
74678 87953 232691
76531 16315 400494
40357 89337 748980
24979 31703 224560
25923 43639 154407
5911 74983 286790
66893 43591 856472
81585 52333 754070
59702 31624 598505
78749 80447 773726
96977 59168 151581
56...

output:

moonrabbit2
49637978132 175395
24948606731 439962
49967052316 454693
49961336132 874089
49600918790 986223
49675771153 782013
24810530887 447097
25004689663 306123
24882626175 288916
24921545126 421621
49758567071 177847
24863291911 451185
49791457751 842308
50036957038 298245
49652253494 968213
834...

result:

ok 100001 lines

Test #233:

score: 11
Accepted
time: 1256ms
memory: 68144kb

input:

100000 100000
37407 34864 497572
37909 51011 265655
16178 44844 446231
77533 56603 420783
17691 83420 796882
40235 26764 360525
76694 72424 880503
31426 84022 428779
76170 82564 483545
3481 75210 348993
3614 26780 616738
58943 90568 849059
51829 14542 569142
58357 37038 914253
9373 24405 104920
2155...

output:

moonrabbit2
49938856750 898461
6243294962 105809
49941119387 623830
49941443449 478906
49935993856 885415
49916745593 852844
49913948500 450531
49937741812 258575
24950152855 17589
8318179007 156518
49913159524 993705
24949569557 150210
24972157815 492713
49943567726 830683
49941443449 994003
499293...

result:

ok 100001 lines