QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#342950#4085. 통신망socpite7 116ms226020kbC++2015.3kb2024-03-01 20:01:382024-03-01 20:01:38

Judging History

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

  • [2024-03-01 20:01:38]
  • 评测
  • 测评结果:7
  • 用时:116ms
  • 内存:226020kb
  • [2024-03-01 20:01:38]
  • 提交

answer

#include <bits/stdc++.h>
// #include "communication.h"
#define rb(x) ((x)&(-(x)))
#define fi first
#define se second
#define sz(V) ((int)(V).size())
using namespace std;
typedef pair<int, int> pii;

const int MAXN = 250055;
const int MAXM = 1000055;

int T[MAXN*4];
int Ts[MAXN*2], Tdeg[MAXN*2], _Ti[MAXN*2];

int GD[MAXM + MAXN*2];
int GDs[MAXN*2], GDdeg[MAXN*2], _GDi[MAXN*2];

int G[MAXM*2 + MAXN*2]; // save edges of graph in order of node
int Gs[MAXN*2]; // prefix sum of degree + i
int Gdeg[MAXN*2], _Gi[MAXN*2];
int RT[MAXN];

int cAlpha[MAXM];
int upperUp[MAXN*2], lowerUp[MAXN*2];
int upperAbove[MAXN*2], lowerAbove[MAXN*2];
int minOrderUp[MAXN*2], maxOrderUp[MAXN*2];
int minOrderAbove[MAXN*2], maxOrderAbove[MAXN*2];
int upCnt[MAXN*2], aboveCnt[MAXN*2];
int lcaUp[MAXN*2], lcaAbove[MAXN*2];

int dep[MAXN*2], prt[MAXN*2], prte[MAXN*2], dfo[MAXN*2], cnt[MAXN*2];
bitset<MAXM> treeEdge;

int A[MAXM], B[MAXM], C[MAXM];
bitset<MAXN*2> inV;

int Ans[MAXM];
int N, M, W, K, _N, _M;


int ud[MAXN*2];
int uf(int i) { return i == ud[i] ? i : (ud[i] = uf(ud[i])); }
void uf(int a, int b) { ud[uf(b)] = uf(a); }


namespace TE3 {
	void run() {
		for(int i = ::N, r; i; i--) if(3 <= ::dep[i]) {
			r = ::lowerUp[i];
			if(1 == ::dep[r] && ::inV[r])
				Ans[::C[::prte[i]]]++;
		}
	}
}


namespace TE2 {
	int fenwick[MAXN*2];

	pii IC[MAXN*2];
	int ICT[MAXN*2], ICs[MAXN*2];

	pii VIC[MAXN*4];
	int VICs[MAXN*2], VICdeg[MAXN*2], _VICi[MAXN*2];

	pii I[MAXN*6];
	int Is[MAXN*2];

	int dfoask[MAXN*4], dfoasks[MAXN*2], dfoaskdeg[MAXN*2], _dfoaski[MAXN*2];
	int dfopush[MAXN*2];
	int dfopop[MAXN*4], dfopops[MAXN*2], dfopopdeg[MAXN*2], _dfopopi[MAXN*2];

	void upd(int i, int r) {
		for(; i <= ::N; i += rb(i))
			fenwick[i] += r;
	}
	int get(int i) {
		int r = 0;
		for(; i; i -= rb(i))
			r += fenwick[i];
		return r;
	}

	void run() {
		// Sort IC + ICT by upperAbove dep
		for(int i = ::N; i; i--)
			if(4 <= ::dep[i] && ::inV[::prt[i]])
				ICs[::dep[::upperAbove[i]]]++;
		for(int i = 1; i < ::N; i++)
			ICs[i+1] += ICs[i];
		for(int i = ::N; i; i--) if(4 <= ::dep[i] && ::inV[::prt[i]]) {
			int &idx = ICs[::dep[::upperAbove[i]]];
			ICT[idx] = ::prt[i];
			IC[idx] = { ::dep[::upperAbove[i]], ::dep[::lowerAbove[i]] };
			idx--;
		}

		// Build VIC
		for(int i = 1; ICT[i]; i++) VICdeg[ICT[i]]++;
		for(int i = 1; i < ::N; i++) VICs[i+1] = VICs[i] + VICdeg[i] + 1;
		memcpy(_VICi, VICs, ::N+1 << 2);
		for(int i = 1; ICT[i]; i++) VIC[_VICi[ICT[i]]++] = IC[i];

		// Make I
		{
			pii *it = I+1;
			for(int i = 1, s, e; i <= ::N; i++) if(3 <= ::dep[i] && ::inV[i]) {
				Is[i] = int(it - I);
				s = 2; e = ::dep[i] - 1;
				for(pii *cit = VIC + VICs[i];; cit++) {
					if(!cit->fi || s > e) break;
					if(cit->se <= cit->fi) continue;
					if(s <= cit->fi) {
						*it++ = { s, min(cit->fi, e) };
						s = cit->se + 1;
					} else {
						if(s <= cit->se)
							s = cit->se + 1;
					}
				}
				if(s <= e) *it++ = {s, e};
				it++;
			}
		}

		// Sweeping
		for(int i = ::N; i; i--) {
			if(3 <= ::dep[i] && ::inV[i]) {
				dfopush[::dfo[i]] = i;
				dfopopdeg[::dfo[i] + ::cnt[i]]++;
			}
			if(2 <= ::dep[i])
				dfoaskdeg[::dfo[::lcaUp[i]]]++;
		}
		for(int i = 1; i <= ::N+1; i++) {
			dfoasks[i+1] = dfoasks[i] + dfoaskdeg[i] + 1;
			dfopops[i+1] = dfopops[i] + dfopopdeg[i] + 1;
		}
		memcpy(_dfoaski, dfoasks, ::N+2 << 2);
		memcpy(_dfopopi, dfopops, ::N+2 << 2);
		for(int i = 1; i <= ::N; i++) {
			if(3 <= ::dep[i] && ::inV[i]) dfopop[_dfopopi[::dfo[i] + ::cnt[i]]++] = i;
			if(2 <= ::dep[i]) dfoask[_dfoaski[::dfo[::lcaUp[i]]]++] = i;
		}
		for(int dfotime = 1; dfotime <= ::N; dfotime++) {
			if(dfopush[dfotime]) {
				for(pii *it = I + Is[dfopush[dfotime]]; it->fi; it++) {
					upd(it->fi, 1);
					upd(it->se + 1, -1);
				}
			}
			for(int *it = dfopop + dfopops[dfotime]; *it; it++) {
				for(pii *iit = I + Is[*it]; iit->fi; iit++) {
					upd(iit->fi, -1);
					upd(iit->se + 1, 1);
				}
			}
			for(int *askit = dfoask + dfoasks[dfotime]; *askit; askit++)
				::Ans[::C[::prte[*askit]]] += get(::dep[*askit]);
		}
	}
}


namespace TE1C2 {
	int fenwick[MAXN*2];

	pii OC[MAXN*2]; // { dep, c }
	int OCs[MAXN*2], OCn;

	pii OV[MAXN*2]; // { dep, v }
	int OVs[MAXN*2], OVn;

	inline void upd(int i, int r) {
		for(; i <= ::N; i += rb(i))
			fenwick[i] += r;
	}
	inline int get(int i) {
		int r = 0;
		for(; i; i -= rb(i))
			r += fenwick[i];
		return r;
	}
	inline int get(int s, int e) { return get(e) - get(s-1); }

	void run() {
		// Sort OC & OV by dep
		for(int i = ::N; i; i--) {
			if(3 <= ::dep[i] && inV[::prt[i]]) {
				OCs[::dep[i]]++;
				OCn++;
			}
			if(4 <= ::dep[i]) {
				OVs[::dep[::lowerUp[i]]]++;
				OVn++;
			}
		}
		for(int i = 1; i < ::N; i++) {
			OCs[i+1] += OCs[i];
			OVs[i+1] += OVs[i];
		}
		for(int i = ::N; i; i--) {
			if(3 <= ::dep[i] && inV[::prt[i]])
				OC[OCs[::dep[i]]--] = { ::dep[i], i };
			if(4 <= ::dep[i])
				OV[OVs[::dep[::lowerUp[i]]]--] = { ::dep[::lowerUp[i]], i };
		}

		for(pii *vit = OV+OVn, *cit = OC+OCn;; vit--) {
			if(!vit->fi) break;
			for(; vit->fi < cit->fi; cit--) {
				upd(::dfo[::lcaAbove[cit->se]], 1);
				upd(::dfo[cit->se], -1);
			}
			::Ans[::C[::prte[vit->se]]] += get(::dfo[vit->se], ::dfo[vit->se] + ::cnt[vit->se] - 1);
		}
	}
}


namespace TE1C1 {
	void run() {
		for(int v = ::N, u; v; v--) if(4 <= ::dep[v]) {
			if(::upperUp[v] != ::lowerUp[v]) continue;
			u = ::upperUp[v];
			if(1 < ::dep[u] && inV[u]) ::Ans[::C[::prte[v]]]++;
		}
	}
}


namespace BE {
	int AC[MAXN*2];

	void dfs(int i, int d) {
		for(int *eit = ::G + ::Gs[i];; eit++) {
			if(!*eit) break;
			::Ans[::C[*eit]] = W + (AC[d] - AC[::dep[::A[*eit]] + 1]);
		}
		for(int *eit = ::T + ::Ts[i];; eit++) {
			if(!*eit) break;
			AC[d+1] = AC[d] + (::inV[i] && 1 == ::aboveCnt[::B[*eit]] ? 1 : 0);
			dfs(::B[*eit], d+1);
		}
	}

	void run() {
		for(int i = ::K; i; i--) dfs(::RT[i], 1);
	}
}

namespace DFS2 {
	int QU[MAXN*6], QUs[MAXN*2], QUdeg[MAXN*2], _QUi[MAXN*2];
	int QA[MAXN*6], QAs[MAXN*2], QAdeg[MAXN*2], _QAi[MAXN*2];

	bitset<MAXN*2> black;

	void dfs(int i) {
		for(int *eit = ::T + ::Ts[i], v;; eit++) {
			if(!*eit) break;
			v = ::B[*eit];
			dfs(v);
			::upCnt[i] += ::upCnt[v];
			::aboveCnt[i] += ::aboveCnt[v];
			::uf(i, v);
		}
		black[i] = true;
		for(int *eit = QU + QUs[i], e, v;; eit++) {
			e = *eit;
			if(!e) break;
			v = ::minOrderUp[e]^::maxOrderUp[e]^i;
			if(black[v]) ::lcaUp[e] = v;
		}
		for(int *eit = QA + QAs[i], e, v;; eit++) {
			e = *eit;
			if(!e) break;
			v = ::minOrderAbove[e]^::maxOrderAbove[e]^i;
			if(black[v]) ::lcaAbove[e] = v;
		}
	}

	void run() {
		// Precompute for upCnt & aboveCnt
		for(int i = ::M; i; i--) if(!::treeEdge[i]) {
			::upCnt[::A[i]]--;
			::upCnt[::B[i]]++;
			::aboveCnt[::cAlpha[i]]--;
			::aboveCnt[::B[i]]++;
		}

		// Build QU & QA
		for(int i = ::N; i; i--) {
			QUdeg[::minOrderUp[i]]++;
			QUdeg[::maxOrderUp[i]]++;
			if(::minOrderAbove[i]) {
				QAdeg[::minOrderAbove[i]]++;
				QAdeg[::maxOrderAbove[i]]++;
			}
		}
		for(int i = 1; i <= ::N; i++) {
			QUs[i+1] = QUs[i] + QUdeg[i] + 1;
			QAs[i+1] = QAs[i] + QAdeg[i] + 1;
		}
		memcpy(_QUi, QUs, ::N+1 << 2);
		memcpy(_QAi, QAs, ::N+1 << 2);
		for(int i = 1; i <= ::N; i++) {
			QU[_QUi[::minOrderUp[i]]++] = i;
			QU[_QUi[::maxOrderUp[i]]++] = i;
			if(::minOrderAbove[i]) {
				QA[_QAi[::minOrderAbove[i]]++] = i;
				QA[_QAi[::maxOrderAbove[i]]++] = i;
			}
		}

		// Run DFS
		iota(::ud, ::ud + ::N + 1, 0);
		for(int i = ::K; i; i--) dfs(::RT[i]);
	}
}


namespace MMO {
	// sorted by dfo
	int O[MAXN*2];

	int pdep[MAXN*2];

	inline void goup(int dp[], int i, int deplim) {
		int v = i;
		while(true) {
			v = ::uf(v);
			if(::dep[v] <= deplim) break;
			dp[v] = i;
			::uf(::prt[v], v);
		}
	}

	void run() {
		// Sort by dfo
		for(int i = ::N; i; i--) O[::dfo[i]] = i;

		// Precompute pdep
		for(int i = ::N, t; i; i--) {
			t = ::dep[i];
			for(int *eit = ::G + ::Gs[i], pd;; eit++) {
				if(!*eit) break;
				pd = ::dep[::A[*eit]];
				if(pd < t) t = pd;
			}
			pdep[i] = t;
		}

		// Compute minOrderUp
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+1;; it++) {
			if(!*it) break;
			goup(::minOrderUp, *it, pdep[*it]);
		}

		// Compute maxOrderUp
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+::N;; it--) {
			if(!*it) break;
			goup(::maxOrderUp, *it, pdep[*it]);
		}

		// Compute minOrderAbove
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+1;; it++) {
			if(!*it) break;
			goup(::minOrderAbove, *it, pdep[*it] + 1);
		}

		// Compute maxOrderAbove
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+::N;; it--) {
			if(!*it) break;
			goup(::maxOrderAbove, *it, pdep[*it] + 1);
		}
	}
}


namespace UL {
	// sorted by dep
	int O[MAXN*2], _I[MAXN*2];

	inline void goup(int dp[], int i, int depi) {
		for(int *eit = ::GD + ::GDs[i], v;; eit++) {
			if(!*eit) break;
			v = ::B[*eit];
			while(true) {
				v = ::uf(v);
				if(::dep[v] <= depi) break;
				dp[v] = i;
				::uf(::prt[v], v);
			}
		}
	}

	void run() {
		// Sort by dep
		for(int i = ::N; i; i--) _I[::dep[i]]++;
		for(int i = 2; i <= ::N; i++) _I[i] += _I[i-1];
		for(int i = ::N; i; i--) O[_I[::dep[i]]--] = i;

		// Compute upperUp
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+1;; it++) {
			if(!*it) break;
			goup(::upperUp, *it, ::dep[*it]);
		}

		// Compute lowerUp
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+::N;; it--) {
			if(!*it) break;
			goup(::lowerUp, *it, ::dep[*it]);
		}

		// Compute upperAbove
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+1;; it++) {
			if(!*it) break;
			goup(::upperAbove, *it, ::dep[*it] + 1);
		}

		// Compute lowerAbove
		iota(::ud, ::ud + ::N + 1, 0);
		for(int *it = O+::N;; it--) {
			if(!*it) break;
			goup(::lowerAbove, *it, ::dep[*it] + 1);
		}
	}
}


namespace DFS1 {
	int path[MAXN*2];
	bitset<MAXN*2> chk;

	int dfstime;

	void dfs(int i, int pe) {
		chk[i] = true;
		path[::dep[i]] = i;
		::cnt[i] = 1;
		::dfo[i] = ++dfstime;
		for(int *it = ::G + ::Gs[i], e, v;; it++) {
			e = *it;
			if(!e) break;
			if(e == pe) continue;
			v = ::A[e]^::B[e]^i;
			if(chk[v]) {
				if(::dep[v] < ::dep[i])
					::cAlpha[e] = path[::dep[v]+1];
				continue;
			}
			::treeEdge[e] = true;
			::dep[v] = ::dep[i] + 1;
			::prt[v] = i;
			::prte[v] = e;
			dfs(v, e);
			::cnt[i] += ::cnt[v];
		}
	}

	void run() {
		for(int i = 1, rt; i <= ::K; i++) {
			rt = ::RT[i];
			dep[rt] = 1;
			dfs(rt, 0);
		}
	}
}


namespace BCC {
	int A[MAXM], B[MAXM], C[MAXM];
	int RT[MAXN], _I[MAXN], _OI[MAXN*2];
	int N, M, K;

	int st[MAXM], stn;

	int disc[MAXN], low[MAXN];
	bitset<MAXM> cutedge;
	bitset<MAXN> cutvertex;

	int dfstime, cutcnt;

	void dfs(int u, int pe) {
		disc[u] = low[u] = ++dfstime;
		int children = 0;
		bool cut = false;
		for(int *it = ::G + ::Gs[u], e, v;; it++) {
			e = *it;
			if(!e) break;
			if(e == pe) continue;
			v = ::A[e]^::B[e]^u;
			if(disc[v]) {
				if(disc[v] < low[u])
					low[u] = disc[v];
				if(disc[v] < disc[u])
					st[++stn] = e;
			} else {
				children++;
				st[++stn] = e;
				dfs(v, e);
				if(low[v] < low[u])
					low[u] = low[v];
				if(disc[u] < low[v])
					cutedge[e] = true;
				if((!pe && 1 < children)
					|| (pe && disc[u] <= low[v])) {
					cut = true;
					if(st[stn] == e) stn--;
					else {
						K++;
						const int startn = N;
						while(true) {
							int a = ::A[st[stn]];
							int b = ::B[st[stn]];
							if(_I[a] <= startn) {
								N++;
								_I[a] = N;
								_OI[N] = a;
							}
							if(_I[b] <= startn) {
								N++;
								_I[b] = N;
								_OI[N] = b;
							}
							M++;
							A[M] = _I[a];
							B[M] = _I[b];
							C[M] = st[stn];
							stn--;
							if(!stn || st[stn+1] == e) break;
						}
						RT[K] = _I[u];
					}
				}
			}
		}
		if(cut) {
			cutvertex[u] = true;
			cutcnt++;
		}
	}

	void run(int rt) {
		dfs(rt, 0);
		if(stn) {
			if(1 == stn) stn--;
			else {
				K++;
				const int startn = N;
				while(stn) {
					int a = ::A[st[stn]];
					int b = ::B[st[stn]];
					if(_I[a] <= startn) {
						N++;
						_I[a] = N;
						_OI[N] = a;
					}
					if(_I[b] <= startn) {
						N++;
						_I[b] = N;
						_OI[N] = b;
					}
					M++;
					A[M] = _I[a];
					B[M] = _I[b];
					C[M] = st[stn];
					stn--;
				}
				RT[K] = _I[rt];
			}
		}
	}
}

void solve() {
	// Small case; Ans[*] = 0
	if(2 == N) return;

	// Build given graph
	for(int i = M; i; i--) {
		Gdeg[A[i]]++;
		Gdeg[B[i]]++;
	}
	for(int i = 1; i <= N; i++)
		Gs[i+1] = Gs[i] + Gdeg[i] + 1;
	memcpy(_Gi, Gs, N+1 << 2);
	for(int i = 1; i <= M; i++) {
		G[_Gi[A[i]]++] = i;
		G[_Gi[B[i]]++] = i;
	}

	// Find BCC from 1
	BCC::run(1);

	// Case; 1 + (N-1)

	// Now, given graph is connected

	// Case; cut edge
	for(int i = 1; i <= M; i++) if(BCC::cutedge[i])
		Ans[i] = (BCC::cutvertex[A[i]] && BCC::cutvertex[B[i]]) ? N : N-1;
	
	// Rebuild graph
	_N = N; _M = M;
	N = BCC::N; M = BCC::M; K = BCC::K;
	W = BCC::cutvertex.count();
	for(int i = 1; i <= N; i++)
		inV[i] = !BCC::cutvertex[BCC::_OI[i]];
	memcpy(A, BCC::A, M+1 << 2);
	memcpy(B, BCC::B, M+1 << 2);
	memcpy(C, BCC::C, M+1 << 2);
	memcpy(RT, BCC::RT, K+1 << 2);
	memset(Gdeg, 0, N+1 << 2);
	for(int i = M; i; i--) {
		Gdeg[A[i]]++;
		Gdeg[B[i]]++;
	}
	for(int i = 1; i <= N; i++)
		Gs[i+1] = Gs[i] + Gdeg[i] + 1;
	memcpy(_Gi, Gs, N+1 << 2);
	memset(G, 0, M+M+N+1 << 2);
	for(int i = 1; i <= M; i++) {
		G[_Gi[A[i]]++] = i;
		G[_Gi[B[i]]++] = i;
	}

	// 1st DFS
	DFS1::run();

	// Edge depth consistency
	for(int i = M; i; i--)
		if(dep[A[i]] > dep[B[i]])
			swap(A[i], B[i]);
	
	// Build tree (forest, only down) & Rebuild graph (only back edge) (up / down)
	memset(Gdeg, 0, N+1 << 2);
	for(int i = M; i; i--) {
		if(treeEdge[i]) Tdeg[A[i]]++;
		else { Gdeg[B[i]]++; GDdeg[A[i]]++; }
	}
	for(int i = 1; i <= N; i++) {
		Ts[i+1] = Ts[i] + Tdeg[i] + 1;
		Gs[i+1] = Gs[i] + Gdeg[i] + 1;
		GDs[i+1] = GDs[i] + GDdeg[i] + 1;
	}
	memcpy(_Ti, Ts, N+1 << 2);
	memcpy(_Gi, Gs, N+1 << 2);
	memcpy(_GDi, GDs, N+1 << 2);
	memset(G, 0, M+N+1 << 2);
	for(int i = 1; i <= M; i++) {
		if(treeEdge[i]) T[_Ti[A[i]]++] = i;
		else {
			G[_Gi[B[i]]++] = i;
			GD[_GDi[A[i]]++] = i;
		}
	}

	// Compute upper/lower Up/Above
	UL::run();

	// Compute min/max Order Up/Above
	MMO::run();

	// 2nd DFS
	DFS2::run();

	// Answer; Back edge
	BE::run();

	// Answer; Tree edge 1 - Case 1
	TE1C1::run();

	// Answer; Tree edge 1 - Case 2
	TE1C2::run();

	// Answer; Tree edge 2
	TE2::run();

	// Answer; Tree edge 3
	TE3::run();

	// Answer; Tree edge - Base W
	for(int i = ::M; i; i--) if(treeEdge[i])
		Ans[C[i]] += W;

	M = _M;
}

vector<int> find_num_critical(int N, vector<pii> E) {
    ::N = N;
    ::M = sz(E);
    for(int i = 1; i <= ::M; i++)
        tie(::A[i], ::B[i]) = E[i-1];
    
    solve();
    
    return vector<int>(::Ans+1, ::Ans+::M+1);
}

// int32_t main() {
// 	int N, M;
// 	vector<pii> E;
// 	cin >> N >> M;
// 	for (int i = 1; i <= M; ++i) {
// 		int u, v;
// 		cin >> u >> v;
// 		E.emplace_back(u, v);
// 	}
// 	auto ans = find_num_critical(N, E);
// 	for (auto val : ans) cout << val << "\n";
// }

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 0ms
memory: 132784kb

input:

200 200
29 99
132 153
145 179
144 45
56 28
48 3
89 51
88 127
177 53
26 73
50 151
92 13
93 159
116 135
28 74
100 126
44 91
92 193
187 124
177 25
94 11
27 16
165 37
71 7
152 188
71 189
98 173
94 93
172 81
113 36
131 117
107 23
185 91
20 59
2 121
109 77
48 79
33 69
102 81
128 137
16 190
167 136
10 178
...

output:

Gyojun is handsome
199
199
199
199
200
199
200
200
200
199
200
199
199
101
200
199
200
199
100
199
200
200
200
200
199
199
199
200
199
101
200
199
200
199
199
200
199
200
199
200
200
199
199
200
199
199
200
200
199
200
200
199
200
200
200
200
200
199
199
200
199
199
200
100
200
199
199
200
199
200
2...

result:

ok 202 lines

Test #2:

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

input:

200 200
29 147
132 12
145 83
106 45
56 117
79 3
135 51
88 94
177 160
26 86
142 151
20 13
85 159
116 197
28 131
100 22
69 91
13 193
187 199
150 25
48 11
151 16
165 126
71 153
152 141
132 189
133 173
11 93
172 102
127 36
146 117
107 111
185 33
20 184
2 114
109 55
54 79
33 110
102 2
109 137
176 190
96 ...

output:

Gyojun is handsome
196
196
196
196
196
196
200
200
200
196
200
196
196
200
200
196
200
196
200
196
196
200
196
196
196
196
196
196
196
200
196
199
200
196
196
196
196
200
196
196
200
196
196
196
196
196
196
196
200
200
196
196
200
196
200
200
200
196
196
196
196
196
200
198
200
200
200
200
196
200
1...

result:

ok 202 lines

Test #3:

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

input:

200 200
184 104
196 154
4 105
153 68
120 38
179 82
81 54
74 122
89 169
110 137
172 90
189 121
94 62
153 11
30 47
177 20
51 3
31 70
24 46
21 150
46 41
135 96
16 55
61 189
72 7
56 43
184 79
152 138
198 99
160 5
69 166
29 180
131 143
63 22
123 92
110 199
25 126
70 181
50 139
170 181
171 23
187 133
164 ...

output:

Gyojun is handsome
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
1...

result:

ok 202 lines

Test #4:

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

input:

200 200
116 6
153 60
106 164
63 191
159 86
46 66
55 122
80 76
21 133
84 189
194 156
23 107
9 7
8 67
14 133
134 133
179 137
154 4
20 125
45 33
4 52
43 144
76 15
190 124
77 56
104 144
8 87
165 131
136 72
1 28
171 192
182 136
126 58
94 167
194 82
108 5
180 133
96 152
84 124
92 156
136 124
162 191
123 1...

output:

Gyojun is handsome
199
199
200
199
200
199
199
199
199
199
200
200
200
199
199
200
199
199
200
200
199
200
200
199
200
200
200
200
200
200
199
200
200
199
200
199
200
200
200
199
200
200
200
200
199
200
199
199
199
199
200
199
199
200
200
199
200
200
200
199
199
199
200
200
199
200
199
199
200
199
2...

result:

ok 202 lines

Test #5:

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

input:

200 200
200 83
85 139
109 103
104 160
31 74
137 193
9 23
58 56
157 70
7 82
184 102
172 107
194 83
47 176
174 185
79 199
43 161
77 74
107 137
169 91
26 186
156 64
192 189
85 95
39 97
22 35
134 56
50 195
129 164
67 200
101 108
52 172
66 29
142 60
28 197
133 48
40 75
81 16
100 192
84 155
16 78
167 48
1...

output:

Gyojun is handsome
200
200
199
199
200
199
200
200
199
200
200
200
200
200
200
199
199
199
200
199
199
199
200
199
199
199
199
200
199
200
199
100
199
199
199
200
199
199
199
199
200
200
199
200
199
200
199
199
199
199
200
200
199
199
199
200
199
199
200
200
199
199
199
199
200
199
199
199
199
200
2...

result:

ok 202 lines

Test #6:

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

input:

200 200
24 136
125 184
186 154
12 126
94 177
128 54
101 78
49 106
28 57
53 107
104 132
107 155
4 197
32 142
141 158
110 16
179 54
125 47
103 188
9 180
58 74
81 49
129 61
96 127
83 182
167 43
131 128
54 116
63 138
57 132
19 133
148 14
65 186
99 40
167 34
112 32
80 39
6 59
84 178
26 86
37 95
145 155
7...

output:

Gyojun is handsome
200
199
199
199
96
200
199
200
199
199
199
200
200
199
199
199
199
199
199
199
199
200
199
199
199
96
199
96
200
200
199
199
96
199
199
199
200
199
199
95
200
199
200
199
200
200
200
200
199
200
199
199
199
200
199
199
200
199
200
199
200
200
200
199
199
199
200
200
199
200
200
19...

result:

ok 202 lines

Test #7:

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

input:

200 200
76 158
134 144
163 131
90 81
101 12
48 146
143 63
193 83
102 92
117 192
97 194
149 40
152 1
3 158
164 38
149 78
150 70
145 54
36 95
144 39
63 56
87 75
149 195
189 149
21 200
184 16
71 65
108 81
18 134
58 128
20 177
66 41
44 75
49 77
151 171
135 138
98 32
42 61
66 29
169 129
68 138
17 140
62 ...

output:

Gyojun is handsome
106
200
199
199
200
105
200
200
106
105
199
199
199
200
199
199
199
105
199
199
199
200
199
199
199
199
200
200
106
199
200
199
105
200
199
105
200
199
200
105
200
199
105
105
199
105
199
104
199
199
199
200
199
199
199
199
105
200
199
199
105
200
199
106
200
199
200
199
105
199
2...

result:

ok 202 lines

Test #8:

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

input:

200 200
196 142
196 40
49 173
104 163
82 15
96 167
73 62
32 33
124 140
114 50
25 190
117 31
96 74
83 162
2 191
152 126
165 115
181 23
1 38
123 66
21 153
200 119
187 111
185 76
131 199
61 194
168 95
31 52
28 187
177 182
163 124
146 196
73 134
91 84
105 48
115 195
30 113
61 13
22 111
197 184
40 25
58 ...

output:

Gyojun is handsome
123
124
199
199
200
122
199
199
199
123
200
199
122
200
124
199
200
124
122
123
199
124
200
124
199
199
122
199
123
123
124
199
123
199
122
123
122
123
199
199
200
123
123
122
122
199
123
199
123
199
199
123
199
199
199
124
199
199
122
200
123
199
122
122
199
199
200
199
124
200
1...

result:

ok 202 lines

Test #9:

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

input:

200 200
88 4
88 144
24 156
116 41
89 146
170 190
6 76
171 98
16 139
158 6
66 133
136 91
187 75
17 122
145 126
140 63
82 27
61 140
180 170
78 14
127 136
127 22
80 186
64 60
196 102
152 125
155 176
186 108
83 74
109 173
110 11
124 25
3 129
183 135
107 52
154 116
26 110
197 117
66 75
192 182
73 198
167...

output:

Gyojun is handsome
183
183
199
183
183
183
183
183
183
183
183
183
184
183
183
183
183
183
184
183
183
183
184
183
184
183
184
183
183
199
199
183
183
183
183
183
184
183
184
183
183
183
183
184
183
199
183
183
184
183
199
183
183
183
183
183
183
183
183
183
183
183
183
183
183
183
199
184
184
184
1...

result:

ok 202 lines

Test #10:

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

input:

200 199
128 61
197 124
163 80
155 173
43 140
42 8
89 4
101 113
33 74
11 85
137 100
189 100
177 175
22 126
169 178
42 25
70 78
159 54
148 189
29 130
13 98
70 108
154 177
76 109
146 187
96 144
159 46
145 109
172 109
15 102
101 168
161 178
40 165
8 156
35 163
99 26
48 65
152 153
32 44
87 55
95 11
4 17
...

output:

Gyojun is handsome
199
200
200
200
200
200
200
199
200
199
200
200
200
200
199
200
199
199
199
200
199
200
199
200
199
200
200
200
200
199
200
200
199
200
200
199
199
199
199
199
200
199
199
199
199
200
200
200
200
199
199
200
200
199
199
199
200
199
200
200
199
199
200
200
199
200
199
200
200
199
2...

result:

ok 201 lines

Test #11:

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

input:

200 199
128 94
59 124
163 46
155 195
43 166
155 8
73 4
149 113
181 74
154 85
137 101
189 137
177 90
22 6
169 143
42 173
26 78
10 54
148 18
29 36
13 194
70 99
154 198
95 109
28 187
96 86
159 66
145 172
172 77
17 102
101 199
44 178
67 165
140 156
35 103
50 26
48 151
30 153
32 164
188 55
177 11
45 17
3...

output:

Gyojun is handsome
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
199
200
200
200
200
200
200
200
200
200
200
2...

result:

ok 201 lines

Test #12:

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

input:

200 354
89 16
104 1
50 139
178 175
33 188
59 14
121 173
17 54
185 189
149 31
74 16
75 41
56 26
154 44
52 91
142 166
53 30
26 101
10 164
112 53
105 127
22 176
90 175
154 47
150 132
29 172
10 160
164 147
145 20
116 25
154 86
183 33
74 28
13 123
87 122
104 4
121 173
90 21
31 111
49 162
112 23
20 43
50 ...

output:

Gyojun is handsome
101
200
101
101
101
101
101
101
101
101
101
101
101
101
101
199
101
101
101
101
199
101
101
101
101
101
101
101
101
101
101
101
101
101
200
200
101
101
101
101
101
101
101
101
101
200
200
200
199
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
1...

result:

ok 356 lines

Test #13:

score: -5
Wrong Answer
time: 0ms
memory: 114640kb

input:

200 331
97 67
88 111
156 155
81 177
129 15
30 70
96 94
155 172
42 52
170 22
190 98
146 23
184 197
74 199
157 109
95 166
181 78
45 156
100 70
58 183
164 163
105 134
165 169
85 195
50 9
104 39
146 80
59 103
146 48
165 169
78 181
46 115
168 104
150 135
85 195
168 27
27 196
102 80
46 153
98 126
165 168
...

output:

Gyojun is handsome
98
99
98
98
99
98
99
98
98
200
99
99
98
99
98
98
98
199
98
98
98
200
98
98
98
98
99
98
98
98
98
98
98
98
98
99
98
98
98
99
98
98
200
200
99
98
98
98
99
98
104
98
98
103
104
98
98
98
98
99
98
98
200
98
200
99
98
98
98
98
98
200
200
98
98
98
98
200
98
99
98
98
98
200
199
98
98
98
98...

result:

wrong answer 46th lines differ - expected: '98', found: '99'

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 7
Accepted

Test #129:

score: 7
Accepted
time: 0ms
memory: 131060kb

input:

8000 8000
3334 4850
3702 6021
2278 2531
3485 5926
4321 314
4357 2816
4319 5050
1156 2107
4081 7202
6243 2320
7047 851
991 7155
1633 6760
3727 1879
2911 2993
4844 268
3467 5932
7915 7713
4183 4309
7329 1750
540 4486
6665 5370
7505 1560
1033 5053
2424 5725
5532 1809
2943 5853
4037 2466
3482 7480
410 5...

output:

Gyojun is handsome
7999
7999
8000
7999
7999
8000
8000
8000
7999
8000
8000
7999
8000
8000
8000
7999
8000
8000
7999
8000
7999
7999
8000
8000
8000
7999
7999
8000
8000
8000
8000
7999
8000
8000
7999
7999
7999
7999
8000
8000
8000
7999
8000
8000
7999
8000
7999
7999
8000
7999
7999
7999
7999
8000
8000
8000
8...

result:

ok 8002 lines

Test #130:

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

input:

8000 8000
4783 4850
3702 2908
5328 2531
3485 1966
4321 4808
5145 2816
2112 5050
5985 2107
4081 2921
6243 6624
4549 851
991 5631
1633 6570
3727 4764
6472 2993
6826 268
3215 5932
7915 3533
4183 631
7329 4372
1685 4486
6665 5187
5271 1560
3966 5053
2424 2755
6250 1809
2943 7889
4037 5331
1660 7480
5224...

output:

Gyojun is handsome
7996
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
7996
8000
8000
8000
8000
8000
8000
7996
8000
7996
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
7996
8000
8000
8000
8000
8000
8000
8000
8000
8000
7996
8000
8000
8000
8000
8000
8000
8000
7996
8000
8000
8000
8000
8000
8000
8...

result:

ok 8002 lines

Test #131:

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

input:

8000 8000
4948 7076
4312 6258
4961 4925
525 2003
1064 5764
4026 440
4211 1953
5449 4786
5912 5905
2633 6210
6057 7215
2111 1116
2641 2310
1203 2614
3407 7705
720 3724
4826 2134
6385 5588
7918 5283
5590 7364
3893 3610
276 5509
4873 3798
1906 4026
7958 3999
3833 6359
450 2882
4196 7166
7184 5263
2319 ...

output:

Gyojun is handsome
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7998
7...

result:

ok 8002 lines

Test #132:

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

input:

8000 8000
3645 1885
746 1887
7513 4178
3434 5693
640 2123
5096 1864
4117 34
310 2847
4479 6143
6287 738
5780 2803
1713 1307
1621 4560
7751 5904
3017 6623
4289 6814
2991 7549
2338 5286
5096 1023
634 7114
5871 4246
5967 7857
4597 4521
4914 345
4421 5087
3739 2279
4318 7161
5943 5457
3705 3949
6515 619...

output:

Gyojun is handsome
8000
7999
7999
7999
7999
8000
7999
8000
7999
7999
7999
8000
7999
7999
8000
8000
7999
8000
7999
7999
7999
8000
7999
8000
8000
7999
7999
7999
7999
8000
7999
8000
7999
7999
8000
7999
8000
7999
8000
8000
8000
7999
7999
8000
7999
8000
7999
8000
8000
7999
7999
7999
3999
8000
8000
8000
7...

result:

ok 8002 lines

Test #133:

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

input:

8000 8000
2147 14
5289 3695
6068 943
7552 2441
6815 5007
6254 6003
4763 5586
6197 5277
4600 5776
3593 365
4597 5159
5409 6440
3627 4621
5719 1562
3596 7197
3801 4047
6541 5300
7616 6690
7298 1147
3009 7402
51 4475
3670 5282
4823 581
51 4354
4281 6608
3354 3928
7388 842
5359 3083
7830 3066
4241 6334
...

output:

Gyojun is handsome
8000
8000
8000
8000
8000
8000
7999
7999
7999
7999
7999
8000
7999
8000
8000
8000
7999
8000
8000
7999
8000
7999
7999
8000
7999
8000
7999
8000
8000
8000
8000
8000
7999
7999
7999
7999
7999
7999
8000
8000
8000
8000
7999
7999
7999
8000
7999
7999
8000
7999
7999
8000
8000
7999
8000
7999
8...

result:

ok 8002 lines

Test #134:

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

input:

8000 8000
3679 266
3257 7324
5909 6434
7316 2784
2877 154
2065 1845
6877 1287
1590 5924
1873 1824
2900 4858
3128 3675
4986 5021
1852 5741
2407 7509
167 6240
5674 6833
155 3151
1496 878
5924 5863
6062 714
345 1858
3500 1720
1701 851
7700 7548
336 6397
3991 5435
6080 3424
1145 1193
3687 2953
5147 1874...

output:

Gyojun is handsome
8000
8000
8000
7999
8000
8000
8000
8000
8000
7999
8000
7999
8000
8000
7999
8000
7999
8000
8000
7999
7999
8000
7999
8000
7999
8000
8000
7999
8000
7999
7999
7999
7999
7999
8000
7999
7999
8000
7999
8000
7999
8000
7999
8000
8000
7999
8000
7999
7999
8000
7999
8000
7999
8000
8000
8000
8...

result:

ok 8002 lines

Test #135:

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

input:

8000 8000
3779 6335
7682 2879
6788 6083
913 750
5646 1453
1188 206
5773 5284
467 7617
1354 4261
3310 6248
1985 2870
165 5349
4631 3721
5614 2379
4225 5058
7024 3298
5715 7511
4122 272
265 7245
2066 5099
3972 557
6557 3644
2286 690
7329 4365
5294 5467
5099 3439
456 3574
6693 4758
7065 5272
3509 3429
...

output:

Gyojun is handsome
8000
7999
7999
7999
8000
8000
7999
8000
7999
7999
8000
7999
8000
7999
8000
8000
7999
7999
8000
8000
8000
7999
8000
8000
8000
8000
8000
8000
8000
7999
7999
8000
7999
8000
8000
7999
7999
8000
8000
8000
8000
7999
7999
7999
8000
8000
8000
7999
7999
7999
8000
8000
7999
8000
7999
8000
7...

result:

ok 8002 lines

Test #136:

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

input:

8000 8000
4523 7489
1372 486
2622 6169
1428 2750
1511 2256
4612 6323
6990 4108
6342 5856
4483 2032
332 2760
1846 2517
2410 3889
7849 3945
7530 2942
5586 6683
609 1644
780 4896
5802 4226
1702 4152
1719 3206
306 5429
2597 2798
23 1622
91 7317
1128 3568
5036 2496
4677 5992
618 6015
3923 3517
6828 3793
...

output:

Gyojun is handsome
7999
8000
8000
7999
8000
8000
8000
7999
8000
8000
7999
8000
7999
7999
8000
7999
7999
7999
8000
7999
7999
8000
7999
7999
8000
3996
8000
7999
7999
8000
8000
7999
7999
8000
8000
7999
7999
7999
8000
7999
8000
8000
8000
7999
7999
7999
8000
7999
8000
7999
7999
8000
7999
7999
8000
7999
7...

result:

ok 8002 lines

Test #137:

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

input:

8000 8000
663 4468
5020 6487
7197 837
3268 7919
1165 1245
6908 1933
377 4895
4222 261
747 6629
6773 7710
3180 5808
1478 4348
6632 6193
7436 1903
1904 2925
4859 1016
4328 704
2516 546
5661 1884
4042 3572
3427 7133
156 6986
7829 7161
7913 656
5981 7569
3848 1291
131 978
3519 3874
2932 7061
2392 3512
5...

output:

Gyojun is handsome
7999
3998
8000
7999
7999
7999
8000
7999
7999
7999
7999
7999
8000
3998
7999
8000
7999
7999
8000
8000
7999
8000
7999
7999
7999
8000
8000
7999
8000
7999
7999
8000
7999
8000
7999
8000
7999
7999
8000
7999
7999
7999
7999
8000
8000
7999
8000
7999
8000
7999
8000
8000
8000
7999
8000
7999
7...

result:

ok 8002 lines

Test #138:

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

input:

8000 8000
1246 293
3616 1425
3109 1609
464 6774
4927 2305
189 2964
3341 5549
2651 3539
653 5944
7693 7558
943 4935
2947 76
4925 6653
5335 5642
6158 1272
1159 6841
1032 7690
4805 5234
127 6292
5805 1038
6941 7007
3419 5121
3306 3054
1321 2158
4861 1334
143 5490
1515 7495
1694 4381
2968 5902
4335 1578...

output:

Gyojun is handsome
8000
7999
7999
7999
7999
7999
7999
7999
8000
7999
7999
7999
7999
7999
7999
8000
8000
8000
7999
7999
3989
8000
8000
7999
8000
7999
8000
8000
7999
7999
8000
8000
7999
8000
7999
8000
7999
7999
8000
7999
7999
7999
7999
8000
7999
8000
7999
7999
7999
7999
8000
7999
7999
8000
7999
8000
8...

result:

ok 8002 lines

Test #139:

score: 0
Accepted
time: 4ms
memory: 131472kb

input:

8000 8000
2472 5355
4811 6963
7949 5889
5286 1800
3357 1321
6514 1782
871 3818
5683 73
55 7789
7066 3741
2822 5051
2948 1240
4566 6192
6424 1396
6435 1982
4506 2964
970 7416
1905 1858
2187 4254
5647 1077
3799 1095
2074 753
4750 4737
6329 3589
505 6772
7320 2137
3782 3591
1698 3282
4007 1254
7502 474...

output:

Gyojun is handsome
8000
8000
4071
8000
7999
8000
8000
8000
4070
7999
4070
8000
8000
8000
7999
7999
7999
8000
8000
8000
4071
7999
7999
4071
7999
7999
8000
7999
7999
8000
4071
8000
7999
7999
7999
8000
8000
7999
7999
7999
8000
8000
4070
8000
7999
7999
4071
7999
8000
8000
7999
8000
7999
7999
8000
8000
4...

result:

ok 8002 lines

Test #140:

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

input:

8000 8000
3299 6687
5966 905
6326 2800
2473 6970
2033 7640
3953 375
2928 5318
1198 445
6256 5723
7297 85
5996 1131
3941 4717
4038 7914
5856 3875
2676 839
5829 1530
4523 1936
1075 5164
1548 5208
185 5769
310 211
3005 4780
3214 6195
1430 4151
7561 1764
7034 4956
6961 3358
7761 5976
5071 7992
2198 2502...

output:

Gyojun is handsome
7999
4436
7999
7999
4437
4436
4436
7999
7999
7999
7999
7999
8000
7999
7999
4436
7999
8000
7999
4436
4435
4437
4437
4437
4437
7999
7999
7999
8000
8000
8000
7999
4436
8000
4437
4437
7999
8000
8000
4436
8000
7999
4437
4436
4436
4436
7999
4437
8000
4437
8000
8000
7999
4436
7999
7999
7...

result:

ok 8002 lines

Test #141:

score: 0
Accepted
time: 4ms
memory: 135848kb

input:

8000 8000
1197 651
970 5859
766 4095
1308 4891
2871 4376
400 24
7679 1212
1052 6745
1670 6415
1277 7226
2957 3909
775 2367
6918 4031
882 1734
3320 5276
7790 7980
989 2153
7048 4332
2436 850
1989 5701
1782 7653
1635 3989
2863 2001
3786 1151
7969 2514
1211 7287
7426 6560
1247 5642
5306 7344
3472 1810
...

output:

Gyojun is handsome
7999
5556
7999
5556
7999
7999
7999
5556
5556
5556
5557
7999
5557
5555
7999
8000
5556
5555
7999
5557
5555
5555
7999
5556
5556
5556
8000
7999
5556
7999
5556
5556
5555
5557
5556
7999
5557
5555
7999
5557
7999
7999
5556
5555
7999
7999
5556
5555
7999
7999
7999
5556
7999
5555
5556
5556
5...

result:

ok 8002 lines

Test #142:

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

input:

8000 8000
6650 871
6293 3460
6774 3936
2898 880
454 6121
6440 1442
5667 7577
2514 3489
1177 3757
3449 2830
1006 3068
7026 2431
7608 1978
2541 7070
6960 5397
5169 7933
6976 7004
7232 2982
2350 32
7135 2723
5354 1026
798 3767
1191 1402
6694 6050
7005 1111
3700 2315
3135 2118
3196 5537
7412 606
989 555...

output:

Gyojun is handsome
6611
6611
6611
6611
6611
6611
6611
6611
6612
6612
6611
6611
6611
7999
6612
6611
6611
6611
6611
6611
6611
6611
6611
6612
6612
6611
6611
7999
6612
6612
6611
6611
6612
6611
6612
6612
6612
6611
6611
6611
6611
6611
6611
6611
6611
7999
6611
6612
6611
6611
6612
6611
7999
6611
7999
7999
6...

result:

ok 8002 lines

Test #143:

score: 0
Accepted
time: 4ms
memory: 138180kb

input:

8000 8000
5312 7367
5739 7486
6457 6978
4612 2547
180 5983
875 1715
5484 7530
1639 1579
214 4103
5196 7462
5522 5720
4755 2825
4775 2659
4658 1212
6952 4834
2357 2355
643 4582
80 6818
2380 3907
3956 5823
4256 5268
4182 531
355 1383
6969 3090
2814 4406
2528 6394
2275 1454
6758 7116
2398 4113
2247 762...

output:

Gyojun is handsome
7606
7606
7606
7607
7606
7606
7606
7606
7606
7606
7606
7606
7606
7607
7999
7606
7606
7606
7607
7606
7999
7606
7606
7606
7606
7606
7607
7606
7606
7606
7607
7606
7999
7606
7607
7606
7606
7606
7606
7606
7999
7606
7606
7606
7606
7606
7606
7606
7606
7607
7606
7606
7606
7606
7606
7999
7...

result:

ok 8002 lines

Test #144:

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

input:

8000 8000
2027 2724
5800 5842
1596 1899
5968 3362
7024 5448
4466 4518
4401 523
3949 5616
2272 6971
1804 1830
624 5589
4557 697
6624 2643
6189 707
763 3487
1885 4501
421 2565
908 7717
251 6277
5568 6685
3945 1158
2312 7408
3471 6896
6154 2308
7153 6970
6137 2495
4753 2555
6157 1796
3 6133
7809 2231
3...

output:

Gyojun is handsome
7801
7801
7801
7801
7801
7999
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7802
7801
7801
7801
7801
7801
7801
7801
7999
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7801
7...

result:

ok 8002 lines

Test #145:

score: 0
Accepted
time: 7ms
memory: 138448kb

input:

8000 8000
3715 4072
676 681
3816 278
4293 6104
7623 2090
6624 3364
1389 7023
4717 3867
6803 5863
5642 631
3402 6910
3866 2313
5078 2525
7397 7366
6452 5107
6385 4447
6906 4382
7582 7541
6303 6480
1460 4947
3535 4492
1331 6039
1738 104
684 7412
2054 7024
7086 4790
1810 6497
7392 7251
4420 4808
7845 8...

output:

Gyojun is handsome
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7967
7...

result:

ok 8002 lines

Test #146:

score: 0
Accepted
time: 11ms
memory: 139224kb

input:

100000 100000
62873 59773
50070 89150
41572 88074
72013 52721
26716 96245
62957 71344
5550 57535
5023 54246
208 67379
86578 79548
94645 32461
77024 39200
38179 80266
31181 94536
42118 67954
67880 51111
84229 11133
27625 52938
78963 2705
52931 69794
37594 33452
56109 61098
44683 95974
65182 52860
105...

output:

Gyojun is handsome
100000
100000
99999
99999
99999
100000
99999
100000
99999
100000
100000
100000
100000
99999
100000
99999
99999
100000
100000
99999
100000
100000
100000
99999
99999
99999
99999
99999
99999
99999
99999
100000
99999
100000
99999
99999
99999
100000
99999
99999
100000
99999
100000
1000...

result:

ok 100002 lines

Test #147:

score: 0
Accepted
time: 16ms
memory: 144388kb

input:

100000 100000
62873 29559
35134 89150
41572 91263
49605 52721
26716 68428
37888 71344
5550 81247
90278 54246
85813 67379
347 79548
94645 15034
90283 39200
38179 4749
10220 94536
42118 97122
25970 51111
84229 80367
27625 79822
78963 66675
52931 57634
56267 33452
47805 61098
18481 95974
65182 99032
58...

output:

Gyojun is handsome
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
99996
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
10...

result:

ok 100002 lines

Test #148:

score: 0
Accepted
time: 41ms
memory: 161392kb

input:

100000 100000
51430 59080
52076 17980
65479 69325
3106 37737
79812 25855
99625 21769
5122 83668
65560 58355
51206 76600
69950 80567
76260 99709
6917 41623
69634 14335
49276 66754
85806 94210
11825 11566
18623 47971
71710 59290
8834 78031
25914 81900
22728 1259
82749 77767
37724 21082
57384 92183
553...

output:

Gyojun is handsome
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998
99998...

result:

ok 100002 lines

Test #149:

score: 0
Accepted
time: 14ms
memory: 92620kb

input:

100000 100000
42118 79170
78283 47702
55152 22656
48928 81644
52671 5258
42939 34691
12986 27832
37266 70961
55866 16316
26380 74847
59544 16064
79786 40759
23285 67235
61213 34178
16425 45136
17997 3130
32315 92562
40696 43454
3280 39772
26273 74790
74882 63100
76238 5349
61418 22005
15615 24890
83...

output:

Gyojun is handsome
100000
99999
100000
100000
100000
100000
100000
100000
100000
99999
100000
100000
99999
100000
99999
99999
99999
100000
100000
100000
100000
100000
100000
100000
100000
99999
100000
100000
100000
99999
100000
100000
99999
99999
100000
99999
99999
100000
99999
100000
99999
99999
10...

result:

ok 100002 lines

Test #150:

score: 0
Accepted
time: 11ms
memory: 109120kb

input:

100000 100000
71301 61334
14623 94555
67758 58355
59411 76444
46609 41511
94486 76478
39626 80794
16030 40290
6401 94477
98757 54762
59814 90315
81266 2722
70541 65580
23639 72160
48007 97309
16879 18182
60861 21252
94057 77279
23101 13447
8141 49967
50851 38661
52300 91454
52276 83143
98161 45064
9...

output:

Gyojun is handsome
99999
99999
100000
99999
99999
100000
100000
100000
100000
100000
100000
100000
99999
99999
100000
99999
99999
100000
99999
99999
100000
99999
100000
99999
99999
100000
100000
99999
100000
99999
100000
100000
99999
99999
99999
99999
100000
99999
100000
99999
99999
100000
100000
10...

result:

ok 100002 lines

Test #151:

score: 0
Accepted
time: 11ms
memory: 110752kb

input:

100000 100000
26681 59602
42312 76269
23520 71850
95873 88631
33897 93417
89990 27914
2616 7220
34543 25259
5918 31735
26131 28036
90330 97126
62046 78678
87027 87697
69179 10887
5277 61742
4717 57071
38568 34254
16929 76822
92959 30839
10301 36575
75158 70144
15187 40069
43620 45431
78971 90830
413...

output:

Gyojun is handsome
99999
100000
100000
100000
100000
100000
100000
100000
99999
99999
99999
99999
99999
100000
99999
100000
100000
99999
100000
100000
99999
99999
100000
100000
99999
100000
100000
100000
99999
100000
100000
100000
100000
99999
99999
99999
99999
100000
100000
99999
100000
99999
99999...

result:

ok 100002 lines

Test #152:

score: 0
Accepted
time: 12ms
memory: 113376kb

input:

100000 100000
84883 11178
37355 38776
32392 23302
19111 46243
88640 18164
6383 21733
60735 61569
2283 91910
3104 6372
57915 53305
19131 84870
70135 1614
43474 38149
98567 27051
19264 13656
61133 69900
37547 68070
56099 68859
33361 96702
7471 60167
36199 13825
1812 35705
86408 25449
40457 24913
60810...

output:

Gyojun is handsome
100000
100000
100000
99999
100000
100000
99999
100000
99999
99999
99999
100000
99999
100000
99999
100000
100000
100000
99999
100000
99999
99999
100000
100000
100000
100000
100000
99999
99999
99999
100000
100000
100000
99999
100000
100000
100000
100000
99999
99999
99999
99999
10000...

result:

ok 100002 lines

Test #153:

score: 0
Accepted
time: 4ms
memory: 115192kb

input:

100000 100000
78892 29198
5569 74471
44226 81161
79310 12918
99188 88107
9587 70067
75351 18985
19506 38448
46863 89891
65592 57970
49939 96546
99127 32344
89730 85960
14562 19377
58175 89254
33439 48160
53316 17563
21910 98822
62098 60084
18751 36326
51663 54552
10253 67060
75077 57349
35848 38192
...

output:

Gyojun is handsome
99999
100000
99999
100000
100000
99999
99999
99999
99999
100000
100000
99999
99999
99999
99999
99999
100000
99999
99999
100000
99999
99999
99999
99999
99999
99999
99999
99999
100000
100000
99999
100000
99999
99999
100000
99999
100000
100000
100000
99999
99999
99999
99999
99999
100...

result:

ok 100002 lines

Test #154:

score: 0
Accepted
time: 7ms
memory: 143400kb

input:

100000 100000
14876 1625
42626 72947
4137 8368
52115 86972
81504 40854
74838 45255
18499 83330
77121 22340
8932 75553
22066 38412
80422 68978
65281 86899
52438 37081
8155 5470
92690 36414
77651 45136
47197 36875
88042 51466
3272 17436
45379 59334
699 7948
11112 72678
86662 10177
85182 97067
68686 35...

output:

Gyojun is handsome
99999
100000
99999
100000
100000
99999
100000
99999
99999
100000
100000
100000
99999
99999
100000
100000
100000
100000
99999
99999
99999
99999
100000
100000
100000
100000
99999
99999
99999
100000
99999
100000
100000
100000
99999
99999
49779
99999
99999
99999
99999
99999
99999
1000...

result:

ok 100002 lines

Test #155:

score: 0
Accepted
time: 12ms
memory: 139616kb

input:

100000 100000
74398 52467
7043 18447
46050 42721
10148 99084
47135 69484
54576 86791
70655 60711
77632 57240
37924 75104
41539 64884
82032 69750
76914 9853
53981 84347
99679 548
86704 365
38801 31409
28363 56688
39911 96969
68052 56973
77920 36965
711 53608
32682 28060
74368 66054
41001 58845
93763 ...

output:

Gyojun is handsome
99999
100000
100000
99999
100000
100000
99999
99999
100000
100000
100000
100000
99999
99999
100000
100000
100000
99999
100000
100000
99999
99999
100000
99999
99999
100000
100000
99999
100000
99999
100000
99999
100000
100000
99999
99999
99999
99999
100000
99999
100000
99999
100000
...

result:

ok 100002 lines

Test #156:

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

input:

100000 100000
93769 38051
22789 54034
97146 79886
11499 21437
19765 57357
17553 237
14415 79343
47436 88636
70625 60173
5443 29025
70940 63633
30881 85461
31509 51439
55719 85149
97176 51693
19316 63046
90558 2806
26261 89559
23699 50605
96321 99724
97516 88990
80011 28340
64359 38965
66718 74954
70...

output:

Gyojun is handsome
99999
100000
100000
99999
100000
100000
99999
99999
100000
100000
50187
99999
100000
99999
100000
100000
50186
100000
50187
99999
100000
99999
100000
100000
100000
99999
100000
99999
100000
99999
99999
99999
99999
99999
100000
100000
99999
100000
100000
99999
99999
100000
99999
99...

result:

ok 100002 lines

Test #157:

score: 0
Accepted
time: 19ms
memory: 141768kb

input:

100000 100000
96269 2202
65700 32589
44742 6346
5183 31421
45568 75467
54644 61638
80438 60173
51555 62497
94953 73709
4500 49057
13086 12635
14732 70230
38612 64224
69441 97093
16417 29119
85366 2645
95825 60562
1715 15326
19568 16007
51859 46841
23365 41440
78356 3525
51754 89307
46613 73823
83339...

output:

Gyojun is handsome
50487
99999
99999
100000
100000
100000
99999
50488
99999
99999
99999
99999
100000
50488
99999
100000
100000
99999
100000
99999
99999
99999
99999
100000
99999
100000
99999
99999
99999
50488
100000
100000
99999
99999
100000
99999
99999
99999
50488
99999
100000
100000
99999
99999
100...

result:

ok 100002 lines

Test #158:

score: 0
Accepted
time: 11ms
memory: 143292kb

input:

100000 100000
63281 97723
94502 52567
73463 12888
45904 53063
34698 82065
21508 86911
70329 40304
17519 7025
71836 9822
72969 44774
68760 88301
25794 95219
95553 87836
61932 25484
40189 55483
29573 73482
58557 66695
70395 57816
29023 39716
5239 33243
33366 72420
97708 68586
76465 86632
87628 17239
7...

output:

Gyojun is handsome
99999
100000
52054
52054
100000
99999
99999
100000
52054
100000
52053
99999
52053
100000
99999
100000
99999
52054
100000
99999
99999
100000
99999
99999
99999
100000
52054
99999
52053
99999
99999
99999
100000
100000
99999
99999
52053
99999
99999
100000
52052
99999
99999
100000
9999...

result:

ok 100002 lines

Test #159:

score: 0
Accepted
time: 8ms
memory: 144968kb

input:

100000 100000
92539 72921
13746 52422
5127 36843
78551 41145
59109 81216
11141 20673
83679 76589
63112 47072
92853 81283
97421 74622
83319 99968
23165 67295
53405 8146
68082 23590
86984 65900
13439 40542
90024 65462
79820 67662
62172 94534
73276 28461
21061 61560
2888 45533
7077 6799
2696 77337
8744...

output:

Gyojun is handsome
100000
100000
99999
99999
100000
56122
100000
99999
99999
56123
56124
56124
100000
99999
99999
99999
100000
56124
56122
56124
99999
56124
99999
99999
100000
56124
56123
56124
99999
99999
99999
100000
99999
100000
56123
56123
99999
56123
99999
100000
56123
100000
99999
99999
100000...

result:

ok 100002 lines

Test #160:

score: 0
Accepted
time: 26ms
memory: 150380kb

input:

100000 100000
75558 71032
49273 7078
58543 36486
40246 95944
79218 74421
68212 94533
75308 63419
75443 29035
5461 54798
6790 773
72010 41959
65724 80751
13482 55415
18454 54574
13208 66258
2336 66251
69483 18220
36781 83963
74571 26822
43619 6565
23681 43123
44116 88012
35930 88839
28694 62965
74894...

output:

Gyojun is handsome
99999
99999
99999
99999
99999
62495
62496
100000
99999
100000
100000
99999
99999
62495
62496
62496
99999
62494
62496
62494
99999
62495
62496
62494
62495
99999
99999
100000
99999
99999
62495
62494
62495
62494
62494
62496
62495
62494
62495
62494
99999
62494
62495
62496
62495
99999
6...

result:

ok 100002 lines

Test #161:

score: 0
Accepted
time: 31ms
memory: 162348kb

input:

100000 100000
26097 25564
22249 32971
74296 9439
38027 38804
73098 763
5568 57241
42180 94292
4882 96327
41436 58666
91553 7854
20426 58608
81090 82754
96417 6929
42551 58025
23581 6504
80788 22259
14004 20651
51171 43156
2853 58904
80831 47757
85431 75334
95990 14476
82722 46381
51369 28593
27699 6...

output:

Gyojun is handsome
78205
99999
78205
78205
78205
78204
78204
78204
78205
78206
78204
78205
78205
78204
78205
78204
78204
78205
78206
78204
78205
78205
99999
99999
78204
78204
78205
78205
78204
99999
99999
78204
78204
78204
78204
78205
99999
78205
78205
78204
78205
78204
78204
99999
78204
78204
78204...

result:

ok 100002 lines

Test #162:

score: 0
Accepted
time: 33ms
memory: 161016kb

input:

100000 100000
38586 6003
22092 3214
69940 83623
3977 95555
27847 55231
5211 91568
53604 38408
48172 72874
24291 21874
79273 91731
21752 93833
81842 71545
63834 123
90918 86941
93530 75879
69177 41773
86713 45879
76780 14580
76656 18154
51080 41521
70593 1237
10120 20433
2099 73276
64223 33986
15649 ...

output:

Gyojun is handsome
88704
88704
88705
88704
88704
88704
88704
88704
88704
88704
88704
88705
88704
88704
88704
88704
99999
88704
100000
88704
88704
99999
88704
88704
88704
88704
88705
88704
99999
88705
88704
88705
88704
88705
99999
88704
88704
88705
88704
88704
88705
88704
88704
88704
99999
88705
8870...

result:

ok 100002 lines

Test #163:

score: 0
Accepted
time: 43ms
memory: 164448kb

input:

100000 100000
58663 33313
57159 3428
30534 65890
2898 27334
95988 29968
17779 95054
14835 34115
36145 12026
90907 84170
3061 16968
27723 43564
46024 97731
97464 92176
82945 92649
14480 48163
98025 40838
35195 78557
44721 14571
75410 90830
90248 95161
37755 32205
42084 18759
12263 42679
42087 59677
7...

output:

Gyojun is handsome
95130
95130
95130
95130
95130
95130
95131
95130
99999
95131
95130
95130
95130
95130
95130
95131
95130
95131
95130
95130
95130
95130
95130
95130
95130
95130
95130
95130
95130
95130
95130
95130
95131
95130
95130
95130
95130
95131
95131
99999
95130
99999
95130
95131
95130
95130
95130...

result:

ok 100002 lines

Test #164:

score: 0
Accepted
time: 32ms
memory: 163728kb

input:

100000 100000
52325 85480
86121 17894
76423 14994
48761 67782
53843 88491
52020 70130
57171 49873
9537 42725
51455 61660
84783 26358
9326 54689
915 14438
21695 57033
84221 90110
61611 76111
9596 20800
83812 51352
12011 24056
55659 69111
54222 54850
49199 52112
6503 83413
92660 35315
116 43421
42509 ...

output:

Gyojun is handsome
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99002
99001
99001
99001
99001
99001
99001
99002
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001
99001...

result:

ok 100002 lines

Test #165:

score: 0
Accepted
time: 61ms
memory: 164596kb

input:

100000 100000
81561 22442
4731 69231
87517 27757
45873 94255
72347 80041
89712 62561
63466 26576
99963 55695
78541 15052
20080 34858
6397 3332
43039 54883
67981 6187
68469 61834
56149 48210
8456 85381
73482 54523
93137 66884
83612 93387
37862 24405
51469 74311
97960 5738
59395 88201
33723 36937
7143...

output:

Gyojun is handsome
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99600
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599
99599...

result:

ok 100002 lines

Test #166:

score: 0
Accepted
time: 38ms
memory: 165396kb

input:

100000 100000
69798 5756
32612 17009
22990 64203
23929 69582
59500 11677
46664 71766
66726 97987
26589 4072
36385 64509
62253 67005
76244 82306
70241 68691
33003 98563
58276 9833
52206 52737
4688 14753
74611 59081
97793 65714
74068 45642
16278 54642
29230 98357
58736 9197
94812 86876
73258 20386
606...

output:

Gyojun is handsome
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988
99988...

result:

ok 100002 lines

Test #167:

score: 0
Accepted
time: 19ms
memory: 146652kb

input:

250000 250000
195825 166003
148703 192387
146540 18698
220556 130235
44011 12790
22627 203147
189135 152275
190554 228061
222446 74773
100990 92336
211587 56144
93012 206799
75997 83865
95597 43340
71863 88053
215277 127273
155439 190668
61808 69864
207792 223732
9253 194328
240880 124514
133468 117...

output:

Gyojun is handsome
249999
250000
249999
249999
250000
249999
249999
249999
249999
249999
250000
250000
249999
249999
249999
250000
250000
250000
249999
249999
250000
249999
250000
249999
250000
250000
249999
250000
249999
249999
250000
249999
249999
249999
250000
250000
249999
249999
249999
249999
2...

result:

ok 250002 lines

Test #168:

score: 0
Accepted
time: 92ms
memory: 202192kb

input:

250000 250000
195825 5033
148703 124783
207350 18698
85714 130235
103134 12790
249682 203147
70257 152275
190554 153486
222446 201608
100990 181093
211587 224124
93012 162273
75997 223907
95597 172765
54778 88053
172845 127273
143290 190668
61808 75638
207792 28831
207201 194328
108289 124514
133468...

output:

Gyojun is handsome
249996
250000
249996
249996
249996
249996
249996
249996
249996
249996
250000
249996
249996
249996
249996
249996
250000
250000
249996
249996
249996
250000
249996
249996
250000
250000
249996
250000
249996
249996
250000
249996
249996
249996
250000
250000
250000
250000
249996
249996
2...

result:

ok 250002 lines

Test #169:

score: 0
Accepted
time: 110ms
memory: 226020kb

input:

250000 250000
201847 33407
122020 187173
143585 93332
51173 193617
51222 243156
27290 36494
186501 249852
83702 104768
240914 132985
148031 171878
44148 54217
49942 123646
175672 67919
101678 187462
156742 244025
127491 160734
166055 56164
173124 248502
222106 181005
200756 163112
186656 197755
1971...

output:

Gyojun is handsome
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
249998
2...

result:

ok 250002 lines

Test #170:

score: 0
Accepted
time: 20ms
memory: 105980kb

input:

250000 250000
35257 175821
123799 207884
157854 48713
206755 19815
224938 32798
20035 104088
20784 122668
185975 23089
242448 245621
43123 70088
230997 245809
249113 218888
204663 165286
47906 145757
197962 224795
230318 46655
87486 198548
124971 10153
231930 80401
205553 26405
61608 148635
14679 14...

output:

Gyojun is handsome
249999
249999
250000
249999
249999
250000
250000
249999
249999
250000
250000
249999
249999
250000
250000
250000
250000
250000
249999
250000
250000
249999
249999
249999
249999
249999
249999
249999
250000
250000
250000
249999
250000
250000
249999
250000
250000
250000
249999
249999
2...

result:

ok 250002 lines

Test #171:

score: 0
Accepted
time: 31ms
memory: 117076kb

input:

250000 250000
98515 56749
50019 183721
236960 72759
170713 154317
166182 202383
223366 25250
168672 5970
177942 37011
162986 15088
60408 128292
179336 157730
120974 44262
59900 57258
119981 170739
121530 87101
18709 236349
214832 135902
32012 199795
42867 222697
204865 146291
227704 246901
65643 103...

output:

Gyojun is handsome
249999
249999
250000
249999
250000
250000
250000
249999
249999
250000
250000
249999
250000
249999
250000
249999
250000
249999
249999
250000
249999
249999
249999
249999
250000
249999
249999
250000
249999
250000
249999
249999
249999
250000
250000
249999
250000
249999
250000
249999
2...

result:

ok 250002 lines

Test #172:

score: 0
Accepted
time: 23ms
memory: 115872kb

input:

250000 250000
58650 122168
93796 60455
127150 54568
93169 70979
38566 198334
40615 211331
181968 65976
85688 46617
46021 244630
183501 19531
247424 111178
218605 105141
107388 8091
5864 17630
46836 103684
40240 4598
167080 196986
65728 49093
121467 10407
160590 135523
91484 102328
101511 49493
6959 ...

output:

Gyojun is handsome
249999
249999
250000
249999
249999
249999
250000
250000
250000
250000
250000
249999
249999
249999
249999
250000
249999
250000
250000
249999
249999
250000
249999
250000
249999
250000
250000
249999
249999
249999
249999
249999
250000
250000
249999
250000
250000
249999
249999
250000
2...

result:

ok 250002 lines

Test #173:

score: 0
Accepted
time: 37ms
memory: 115240kb

input:

250000 250000
235653 243533
248593 224668
176022 6987
152738 52315
165898 107162
233654 184167
158250 191288
242057 208596
37400 80138
162065 85265
181917 168062
158230 215509
78452 4612
76346 122033
142687 162915
22961 234696
3146 147669
39000 56
20969 101788
134293 189566
205024 231144
44131 42379...

output:

Gyojun is handsome
250000
249999
250000
249999
249999
250000
250000
250000
249999
250000
250000
250000
250000
249999
250000
250000
249999
249999
249999
250000
249999
249999
249999
250000
249999
250000
250000
250000
249999
249999
250000
250000
250000
249999
249999
249999
249999
249999
249999
250000
2...

result:

ok 250002 lines

Test #174:

score: 0
Accepted
time: 27ms
memory: 118916kb

input:

250000 250000
230920 226422
103964 97116
105078 103783
156561 59587
49911 190560
48898 3019
71553 161208
84838 177081
215330 163970
169049 122827
66871 25301
210243 91521
192751 85166
167244 41104
131772 144726
99540 90722
107187 22752
65951 103726
183277 247644
111040 99706
157408 48020
195643 1027...

output:

Gyojun is handsome
249999
250000
250000
250000
249999
250000
249999
250000
250000
249999
249999
249999
249999
249999
250000
249999
250000
249999
250000
250000
250000
250000
250000
249999
249999
250000
249999
249999
249999
249999
250000
250000
250000
249999
249999
250000
250000
250000
250000
250000
2...

result:

ok 250002 lines

Test #175:

score: 0
Accepted
time: 31ms
memory: 115856kb

input:

250000 250000
213862 169616
184355 71450
188406 22225
113846 195991
215242 217070
145235 86237
126846 84634
35556 183281
59209 82816
206575 132785
155514 60344
146781 186474
168922 40718
29060 29633
18880 222905
134774 246068
142321 97804
181201 94207
39384 128116
99882 97372
176068 136284
129902 23...

output:

Gyojun is handsome
250000
250000
249999
250000
250000
249999
250000
249999
250000
250000
249999
250000
250000
249999
249999
250000
249999
249999
249999
249999
250000
250000
250000
250000
250000
249999
249999
250000
250000
249999
250000
249999
250000
249999
249999
250000
250000
249999
249999
250000
2...

result:

ok 250002 lines

Test #176:

score: 0
Accepted
time: 20ms
memory: 143604kb

input:

250000 250000
111817 212957
82016 237815
44854 98042
153083 143416
113230 149962
147515 216517
99157 86759
56840 36509
71200 4941
132146 188183
125300 124788
131463 146556
174249 124903
76858 229196
82923 10766
220814 222517
14868 181777
210971 134375
146576 153516
203515 79230
148970 22936
161470 2...

output:

Gyojun is handsome
249999
250000
249999
250000
250000
250000
249999
250000
249999
249999
250000
250000
250000
249999
249999
249999
249999
249999
250000
249999
249999
250000
249999
249999
250000
249999
250000
249999
249999
249999
250000
249999
250000
249999
250000
250000
249999
250000
249999
250000
2...

result:

ok 250002 lines

Test #177:

score: 0
Accepted
time: 41ms
memory: 146376kb

input:

250000 250000
225849 169973
71458 173127
36896 131889
85320 69086
236069 173079
236033 150195
107936 25943
238944 69881
35633 196928
58374 105621
97977 53893
112701 143781
205015 198705
98696 236226
177741 78808
225945 206710
100319 92289
174526 185579
45305 211824
151291 40305
113347 3687
17784 214...

output:

Gyojun is handsome
250000
249999
250000
249999
249999
249999
249999
249999
249999
250000
250000
249999
250000
249999
249999
249999
249999
249999
249999
250000
249999
250000
249999
249999
249999
249999
250000
249999
250000
249999
249999
250000
249999
249999
250000
250000
249999
250000
250000
250000
2...

result:

ok 250002 lines

Test #178:

score: 0
Accepted
time: 26ms
memory: 150304kb

input:

250000 250000
198843 51100
160902 71274
84651 96151
144188 153690
47664 216722
12971 45311
91598 127345
194588 94074
149881 883
134776 124097
138652 105324
28597 23998
150191 202807
21966 104208
78750 202220
73615 148619
121894 247430
206099 189284
227500 4731
228217 7806
163167 208368
154688 190351...

output:

Gyojun is handsome
249999
249999
250000
250000
250000
250000
249999
249999
250000
250000
250000
250000
249999
250000
250000
249999
249999
250000
249999
249999
250000
249999
249999
249999
125033
249999
250000
249999
249999
250000
249999
249999
250000
249999
249999
250000
250000
249999
249999
249999
2...

result:

ok 250002 lines

Test #179:

score: 0
Accepted
time: 41ms
memory: 151764kb

input:

250000 250000
196606 21970
76954 29940
202722 154875
79227 246379
8320 86329
7011 95048
178084 1527
16739 120874
127040 11565
24957 88687
77048 68620
3489 243932
150694 5145
54281 59166
128551 239147
144822 110364
205091 177416
94285 181944
136597 225200
18522 43346
75721 20408
97105 107900
159885 2...

output:

Gyojun is handsome
249999
249999
249999
126379
250000
249999
249999
249999
250000
249999
249999
249999
250000
249999
249999
249999
249999
249999
249999
249999
250000
249999
250000
249999
249999
250000
249999
249999
249999
249999
249999
249999
249999
250000
250000
249999
249999
249999
249999
250000
2...

result:

ok 250002 lines

Test #180:

score: 0
Accepted
time: 69ms
memory: 178144kb

input:

250000 250000
19991 79539
73014 166454
10900 206213
96110 211226
97726 218361
89540 101000
120391 186916
232159 171129
227955 131406
13370 222923
67360 243680
61871 138228
4515 138215
136031 194056
243695 167994
35859 45194
193852 25960
100122 76657
229723 73530
162481 151743
238726 39057
199428 723...

output:

Gyojun is handsome
249999
144811
249999
249999
249999
144811
144810
144809
144810
249999
249999
250000
249999
144809
144811
250000
250000
144810
144810
250000
249999
250000
250000
144810
250000
249999
249999
249999
249999
249999
144810
249999
250000
249999
144811
249999
249999
249999
249999
250000
2...

result:

ok 250002 lines

Test #181:

score: 0
Accepted
time: 76ms
memory: 201512kb

input:

250000 250000
248111 44905
20024 31800
108625 23300
139113 99798
241321 80881
62575 199906
136776 107650
224401 144136
74139 160409
172340 138007
168447 238251
113771 144168
38640 131531
113318 69703
108154 167852
160645 78016
40980 60767
199214 219571
135961 196926
234382 83748
160028 147415
135866...

output:

Gyojun is handsome
250000
193407
193408
193407
250000
193408
249999
193408
193407
193408
193407
193407
193408
193407
193407
193408
193407
249999
193408
193407
249999
193407
249999
193407
193407
249999
193407
249999
249999
193409
193408
193407
193408
249999
193408
250000
193407
193408
193408
193408
1...

result:

ok 250002 lines

Test #182:

score: 0
Accepted
time: 114ms
memory: 204612kb

input:

250000 250000
20729 207894
76007 218525
66978 212163
215334 239350
220516 48760
169845 184095
40429 137729
45985 28980
197093 167300
54442 121654
101562 84809
175627 76529
182832 219105
224235 190388
127091 58104
100899 115638
25900 128240
102285 127236
150640 213180
12293 164562
244885 42423
21553 ...

output:

Gyojun is handsome
204846
249999
204845
204845
204847
204846
204845
204846
204845
204845
204845
249999
204845
249999
204846
204845
204846
204845
204845
204845
204845
204846
204846
204846
249999
204846
204846
204846
204845
204846
204845
204845
204846
204845
250000
204846
204845
249999
250000
249999
2...

result:

ok 250002 lines

Test #183:

score: 0
Accepted
time: 116ms
memory: 205488kb

input:

250000 250000
130273 117903
159404 138620
212649 146332
180645 63216
77353 105434
241064 114631
192324 61359
196225 220711
15735 157589
213848 201961
91395 235185
180947 60672
224366 130276
32302 49522
10772 118309
56113 229392
160282 3032
17300 196857
118570 115643
150413 121249
144643 78806
210684...

output:

Gyojun is handsome
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
245048
249999
245048
245048
245049
245048
245048
245048
245048
245048
245048
245048
245048
245049
245048
245048
2...

result:

ok 250002 lines

Test #184:

score: 0
Accepted
time: 104ms
memory: 218616kb

input:

250000 250000
67109 50172
76165 183451
64736 142863
195939 128156
7616 234428
173326 228250
201675 92295
242766 143943
17147 4947
163981 134625
233707 32694
144647 18705
62433 130999
39054 103365
12520 6899
191893 112345
191782 4666
71820 218513
104852 235481
9555 127276
6121 165047
205141 211084
64...

output:

Gyojun is handsome
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
249898
2...

result:

ok 250002 lines

Subtask #4:

score: 0
Wrong Answer

Test #185:

score: 13
Accepted
time: 3ms
memory: 39004kb

input:

8000 7999
6715 5630
5399 1611
522 5896
5200 288
4783 2611
5206 1534
1491 5946
2860 984
5854 7761
7173 2988
4855 7410
3295 451
457 2349
7896 6105
7685 6007
6778 7505
5872 2713
6470 1380
4248 3888
6388 2792
1047 3549
5226 97
509 409
4856 7396
4149 2439
5406 2518
3230 6097
6050 5856
2346 5118
3521 6541...

output:

Gyojun is handsome
7999
7999
7999
8000
7999
8000
8000
8000
7999
8000
7999
8000
8000
8000
8000
8000
8000
8000
7999
7999
8000
8000
7999
8000
7999
7999
8000
8000
8000
8000
7999
8000
7999
8000
8000
8000
8000
8000
8000
7999
8000
7999
8000
7999
7999
7999
8000
7999
8000
8000
7999
7999
7999
7999
7999
8000
8...

result:

ok 8001 lines

Test #186:

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

input:

8000 7999
4778 5630
5399 7803
522 3556
5200 6570
4783 4982
5206 7136
1915 5946
2860 4731
2729 7761
7589 2988
4855 6133
3295 1076
7258 2349
4942 6105
3756 6007
6778 3255
5872 6819
4474 1380
4248 6096
6388 6937
4994 3549
5226 6487
509 2771
4856 3913
5390 2439
3169 2518
1452 6097
6050 6838
2346 2250
69...

output:

Gyojun is handsome
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8000
8...

result:

ok 8001 lines

Test #187:

score: -13
Wrong Answer
time: 43ms
memory: 121396kb

input:

8000 13325
2772 5782
2128 4495
1037 5792
3616 4270
745 4057
2939 5893
4335 234
2937 1269
5200 6910
60 1225
4248 7802
701 139
4832 7101
6231 2406
1753 3756
4008 1720
7690 2182
1913 7124
6418 1802
6362 7026
5773 5706
3470 5622
2982 2909
6263 6512
6903 6067
6538 7125
4967 5904
1575 6209
5360 2091
4694 ...

output:

Gyojun is handsome
3994
3994
8000
3994
3994
3994
3994
3994
3994
3995
8000
3994
3994
3994
7999
3994
3994
3994
3994
3994
3994
3994
3994
3994
3994
3994
3995
3994
3994
8000
3994
3994
3994
3994
3994
3994
3995
3994
3994
3994
3994
3995
3994
3994
3994
8000
3994
3994
3994
3994
3994
3994
3995
3995
3994
3994
3...

result:

wrong answer 349th lines differ - expected: '3994', found: '4128'

Subtask #5:

score: 0
Skipped

Dependency #2:

0%

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

0%