QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#72343#5093. 会议zhoukangyang41 75ms8700kbC++173.0kb2023-01-15 14:54:032023-01-15 14:54:09

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-15 14:54:09]
  • 评测
  • 测评结果:41
  • 用时:75ms
  • 内存:8700kb
  • [2023-01-15 14:54:03]
  • 提交

answer

//#include<bits/stdc++.h>
//#include "majority.h" 
//#define L(i, j, k) for(int i = (j); i <= (k); i++)
//#define R(i, j, k) for(int i = (j); i >= (k); i--)
//#define ll long long
//#define ull unsigned long long 
//#define sz(a) ((int) a.size())
//#define vi vector<int>
//#define me(a, x) memset(a, x, sizeof(a))
//#define i128 __int128 
//using namespace std;
//const int N = 1e6 + 7;
//
//#define A D_t
//
//struct inter {
//	int l, r;
//	A w;
//	set < int > st;
//} it[N];
//set < int > con[N];
//
//inline int find(int x) {
//	return f[x] == x ? x : f[x] = find(f[x]);
//}
//
//int mg(int a, int b) {
//	int len = min(it[a].r, it[b].r) - max(it[a].l, it[b].l) + 1;
//	if(len <= 0) assert(false);
//	int l = min(it[a].l, it[b].l) - len / 2 - 1, r = max(it[a].r, it[b].r) + len / 2 + 1;
//	if(sz(it[a].st) < sz(it[b].st)) {
//		swap(a, b);
//	}
//	int ql = it[a].l, qr = it[a].r;
//	
//	it[a].l = l, it[b].r = r;
//	for(auto p : it[b].st) 
//		it[a].st.insert(p);
//	
//	L(j, st[b].l, st[b].r) st[j].erase(b);
//	L(j, it[a].l, ql - 1) st[j].insert(a);
//	L(j, qr + 1, it[a].r) st[j].insert(a);
//	
//	return a;
//}
//
//int cur, tp, cnts;
//A f[N];
//bool ok[N];
//
//inline int lst(int x) {
//	while(x && !ok[x]) 
//		--x;
//	return x;
//}
//inline int nxt(int x) {
//	while(x <= cur && !ok[x]) 
//		++x;
//	return x;
//}
//
//int fib = 1;
//bool print() {
//	if(!cnts) 
//		return false;
//	while(ok[fib]) 
//		++fib;
//	for(auto u : con[fib]) 
//		if(sz(it[u].st) > cnts / 2) 
//			return submit(it[u].w), true;
//	return false;
//}
//
//bool insert(const D_t& x) {
//	++cur, ++cnts;
//	f[cur] = x, ok[cur] = true;
//	it[cur].l = cur - 1, it[cur].r = cur + 1, it[cur].w = ;
//	
//	
//	for(auto u : con[cur - 1]) 
//		 
//		 
//		
//		
//	submit(A.w);
//	
//	return print();
//}
//
//bool erase(int id) {
//	--cnts;
//	ok[id] = false;
//	
//	return print();
//}

#include<bits/stdc++.h>
#include "majority.h" 
#define L(i, j, k) for(int i = (j); i <= (k); i++)
#define R(i, j, k) for(int i = (j); i >= (k); i--)
#define ll long long
#define ull unsigned long long 
#define sz(a) ((int) a.size())
#define vi vector<int>
#define me(a, x) memset(a, x, sizeof(a))
#define i128 __int128 
using namespace std;
const int N = 1e6 + 7;

#define A D_t

int cnt[N];
int cnts, up[N];
int mx;

set < pair < int, int > > st;

int lim, cur, f[N];

bool print() {
	if(!lim) return false;
	if((--st.end()) -> first > lim / 2) 
		return submit(D_t((--st.end()) -> second)), true;
	return false;
}

bool insert(const D_t& x) {
	++lim; 
	
	int l = 0, r = 1e5, ns = -1;
	while(l <= r) {
		int mid = (l + r) >> 1;
		if(x <= D_t(mid)) ns = mid, r = mid - 1;
		else l = mid + 1;
	}
//	cerr << "ns = " << ns << endl;
	
	f[++cur] = ns;
	
	if(cnt[ns]) st.erase({cnt[ns], ns});
	cnt[ns] += 1;
	st.insert({cnt[ns], ns});
	
	return print();
}

bool erase(int id) {
	--lim;
	
	st.erase({cnt[f[id]], f[id]});
	cnt[f[id]] -= 1;
	if(cnt[f[id]]) st.insert({cnt[f[id]], f[id]});
	
	return print();
}

详细

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 3ms
memory: 5472kb

input:

1
100
0 4
0 4
0 1
1 1
0 2
0 2
1 3
1 2
0 2
1 5
0 2
0 3
0 3
0 4
1 8
1 9
1 6
0 1
0 2
0 1
1 11
1 12
0 2
1 13
1 14
1 4
0 2
1 15
0 3
1 16
0 4
0 2
0 2
1 17
1 19
1 7
0 3
1 20
0 4
1 21
0 4
1 22
0 1
0 3
1 23
1 24
0 3
1 25
0 1
0 4
1 26
1 27
0 4
0 1
1 29
1 28
0 4
1 30
0 1
0 3
0 4
0 4
0 3
0 2
1 34
0 4
0 4
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0...

result:

ok both questions correct

Test #2:

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

input:

1
100
0 1
0 1
0 1
0 2
1 3
0 1
0 1
1 5
0 2
0 2
0 2
1 9
0 1
1 1
0 2
0 2
1 11
1 10
1 12
1 8
1 4
1 6
0 2
1 13
0 1
1 14
0 2
1 15
0 1
0 2
1 16
0 1
0 2
1 19
1 18
0 1
1 20
1 17
0 1
1 21
0 1
0 2
1 22
1 2
0 1
1 24
0 2
1 25
0 2
1 26
0 1
0 2
0 1
1 29
1 28
1 27
0 2
1 30
0 1
1 31
0 1
1 32
0 1
1 33
0 2
0 1
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2...

result:

ok both questions correct

Test #3:

score: 2
Accepted
time: 1ms
memory: 5568kb

input:

1
100
0 3
0 2
0 3
1 2
0 1
0 2
0 1
0 1
1 7
1 3
0 2
1 8
1 4
0 1
1 9
1 5
0 2
0 1
0 1
0 3
0 4
0 4
1 15
1 10
0 3
0 3
1 17
1 16
0 1
0 3
1 18
1 13
0 1
1 20
0 3
1 21
1 12
0 2
0 2
1 23
0 2
0 3
0 2
1 24
0 1
0 2
0 1
0 1
0 3
1 27
0 1
1 32
0 1
0 3
0 1
1 35
1 28
1 34
0 2
1 30
1 31
0 2
0 1
0 2
0 1
0 1
0 1
1 37
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #4:

score: 2
Accepted
time: 2ms
memory: 5532kb

input:

1
100
0 3
0 2
0 1
1 3
0 1
1 2
0 1
1 5
0 2
1 6
0 1
0 2
1 8
0 1
1 9
0 4
0 1
1 10
1 11
0 2
1 12
1 4
0 3
1 13
0 1
1 14
0 1
1 15
0 1
0 4
0 4
0 1
1 19
0 2
0 1
0 1
1 21
0 2
0 1
0 1
0 1
1 25
1 23
1 24
0 1
1 27
1 26
1 16
1 18
0 3
0 1
0 1
0 2
0 1
1 30
0 2
0 1
1 28
1 34
0 1
1 32
0 1
1 35
1 29
1 36
1 7
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 3
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #5:

score: 2
Accepted
time: 3ms
memory: 5468kb

input:

1
100
0 5
0 2
0 5
1 3
0 2
1 2
0 3
1 4
0 1
0 6
0 7
1 6
1 8
0 6
1 9
0 3
0 2
1 10
1 11
0 2
1 5
1 1
0 2
0 4
0 5
1 15
1 14
1 12
0 5
0 2
1 16
0 6
0 1
1 19
0 3
0 5
0 7
1 21
1 22
0 2
0 1
1 24
1 23
0 5
1 7
1 17
1 20
1 25
0 3
1 26
0 5
0 6
0 1
1 27
1 28
0 3
0 3
1 30
1 31
0 1
0 5
0 2
1 33
1 34
0 1
1 35
1 29
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
1 5
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #6:

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

input:

1
100
0 1
0 3
0 3
1 3
0 8
1 4
0 5
1 5
0 3
0 5
1 7
1 6
0 5
0 4
0 8
1 9
0 1
1 10
0 6
0 1
1 13
1 12
1 11
1 8
0 7
1 14
0 3
0 4
0 1
1 17
1 15
1 16
0 1
0 7
1 18
1 19
0 8
1 20
0 6
1 21
0 4
0 6
1 22
0 3
0 3
1 24
1 25
0 1
0 7
1 26
0 4
1 28
1 27
0 2
0 6
1 29
0 2
1 30
0 5
0 6
0 4
1 34
1 33
1 32
0 7
0 2
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #7:

score: 2
Accepted
time: 2ms
memory: 5528kb

input:

1
100
0 5
0 5
0 7
1 1
0 5
1 2
0 2
0 9
1 6
1 4
0 10
0 6
1 8
1 5
0 7
1 9
0 4
0 6
0 10
0 1
0 5
1 12
0 3
1 11
0 6
0 6
1 15
1 13
0 8
1 17
1 16
0 7
1 14
1 18
1 7
0 1
0 13
0 5
1 22
0 9
1 23
1 20
0 4
0 11
1 24
1 25
1 10
1 21
0 2
1 26
0 13
0 10
0 4
0 2
1 28
1 29
1 30
1 27
0 1
1 31
0 2
1 32
0 13
1 33
0 9
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
1 5
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 ...

result:

ok both questions correct

Test #8:

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

input:

1
100
0 5
0 12
0 2
1 2
0 1
0 2
1 1
0 1
0 7
1 5
0 3
1 4
1 8
0 6
0 1
1 9
1 3
1 7
0 4
0 3
0 2
0 4
0 1
1 13
0 1
1 14
1 12
0 9
1 17
1 15
0 7
0 2
0 1
0 6
0 1
0 4
1 21
0 1
0 10
1 24
1 22
1 23
1 11
0 1
1 20
0 8
0 10
0 2
0 1
1 27
1 30
0 4
1 31
1 28
0 6
1 32
0 13
1 29
1 16
1 18
1 26
0 12
1 34
1 6
1 10
0 10
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #9:

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

input:

1
100
0 14
0 14
0 14
1 3
0 7
1 4
0 18
0 21
0 18
1 7
1 5
0 17
0 24
0 11
1 6
0 7
0 8
0 3
1 1
1 13
1 10
0 7
0 3
0 24
0 19
0 9
0 13
0 1
1 20
0 17
1 21
0 24
0 1
1 16
0 25
1 22
1 14
1 24
0 16
0 10
1 25
1 15
0 3
0 6
1 9
1 27
1 8
1 18
0 14
0 24
1 29
1 30
1 28
1 12
0 9
1 31
1 23
0 2
0 15
1 32
0 1
1 34
0 10
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 14
1 14
1 14
1 14
1 14
1 14
1 14
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #10:

score: 2
Accepted
time: 3ms
memory: 5516kb

input:

1
100
0 1
0 1
0 16
1 2
0 19
0 4
1 5
0 19
0 7
1 7
0 7
0 15
1 8
0 9
0 5
1 10
1 9
0 3
0 12
1 12
1 11
0 5
0 8
0 9
1 14
0 1
1 16
0 2
0 3
1 19
0 5
1 18
1 20
0 10
0 4
1 21
1 22
1 4
1 3
0 9
0 1
1 23
0 11
0 2
0 6
0 12
0 17
0 13
1 25
0 11
1 31
0 8
0 17
0 5
0 8
0 15
0 10
0 3
1 37
0 16
0 5
0 6
0 5
1 42
0 12
1 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #11:

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

input:

1
100
0 2
0 4
0 4
1 3
0 4
0 4
0 3
1 6
1 2
0 3
1 7
1 1
0 4
0 4
0 2
0 3
0 4
1 8
1 10
0 3
1 9
0 4
0 3
0 3
0 4
0 4
0 3
1 15
0 4
1 14
1 16
1 12
0 4
1 5
1 21
1 4
0 3
0 4
0 4
0 4
0 3
1 23
1 24
0 3
0 4
0 2
1 26
1 27
0 4
1 30
0 4
0 4
0 3
1 22
1 33
1 32
1 31
1 28
0 4
1 34
1 11
1 13
1 18
0 2
0 4
0 3
0 2
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4...

result:

ok both questions correct

Test #12:

score: 2
Accepted
time: 2ms
memory: 5548kb

input:

1
100
0 4
0 2
0 1
1 2
0 2
0 1
0 4
0 1
1 5
0 3
1 6
1 7
0 1
1 9
0 1
1 10
0 2
0 2
0 2
0 1
0 4
1 12
0 4
1 11
1 13
0 2
0 3
1 18
1 15
1 14
0 2
1 19
0 4
0 3
0 3
1 20
1 21
1 16
0 4
1 23
0 3
1 24
0 4
0 4
0 3
1 17
1 3
0 1
1 28
1 1
0 3
1 26
1 4
1 29
1 22
1 27
0 1
0 2
1 31
1 30
0 3
0 3
0 1
1 34
0 2
1 32
0 2
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #13:

score: 2
Accepted
time: 2ms
memory: 5572kb

input:

1
100
0 4
0 3
0 4
0 3
0 4
1 1
0 4
1 6
0 4
1 4
0 4
1 2
1 7
0 4
1 9
1 3
0 3
0 2
1 11
1 10
0 4
0 4
0 4
0 3
0 3
1 12
1 13
1 16
0 1
0 4
1 17
1 14
0 4
0 3
0 4
0 4
0 4
0 2
1 20
1 18
1 19
0 3
0 1
1 26
0 2
1 27
1 25
0 3
1 21
0 3
1 29
0 2
1 23
1 22
1 28
1 15
1 5
1 30
0 3
1 31
0 1
1 32
0 4
1 33
0 3
1 34
0 4
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #14:

score: 2
Accepted
time: 2ms
memory: 5516kb

input:

1
100
0 7
0 7
0 6
0 6
0 9
1 5
0 9
1 6
0 7
0 7
1 8
0 7
0 5
1 7
1 1
0 9
0 4
0 8
1 11
0 8
0 9
1 13
0 4
1 14
1 12
0 6
0 8
1 16
0 4
1 19
1 15
0 4
1 17
1 4
1 10
1 18
1 20
1 3
0 7
0 9
1 22
1 21
0 7
1 23
0 8
0 9
0 9
1 26
0 5
0 7
0 4
0 7
1 28
0 8
0 9
1 29
1 30
0 4
1 24
1 32
0 8
0 8
1 34
0 9
1 35
1 31
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #15:

score: 2
Accepted
time: 2ms
memory: 5540kb

input:

1
100
0 8
0 7
0 7
1 3
0 9
0 9
1 4
1 5
0 7
0 8
1 7
0 8
1 8
1 1
0 9
0 7
0 7
0 6
0 4
0 7
1 12
1 9
1 10
0 5
1 15
1 6
1 13
0 3
1 2
1 16
0 5
0 6
1 17
1 11
0 8
1 19
0 9
1 20
0 8
0 8
1 22
1 21
0 9
1 23
0 7
0 7
0 9
1 24
1 25
1 26
0 9
1 27
0 5
1 28
0 7
1 29
0 7
0 8
1 31
1 18
0 6
1 32
0 8
1 33
0 6
0 9
1 34
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #16:

score: 2
Accepted
time: 2ms
memory: 5552kb

input:

1
100
0 13
0 7
0 15
1 2
0 14
0 13
1 1
0 10
1 4
0 10
1 7
1 6
0 9
1 8
0 4
1 9
0 13
1 10
0 12
0 15
1 11
0 7
1 12
0 9
1 14
0 11
0 8
1 16
0 14
1 17
1 15
1 5
0 10
1 18
0 13
1 19
0 13
1 3
0 15
1 21
0 14
1 22
0 7
1 23
0 13
0 15
1 24
1 25
0 14
1 26
0 7
1 27
0 2
0 15
1 28
1 20
0 15
0 15
1 31
1 30
0 11
1 32
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 13
0 -1
0...

result:

ok both questions correct

Test #17:

score: 2
Accepted
time: 2ms
memory: 5472kb

input:

1
100
0 15
0 12
0 15
0 13
0 12
1 2
0 14
0 15
1 3
0 14
0 13
1 8
0 4
0 7
1 10
1 9
0 13
1 11
1 1
1 4
1 12
0 14
1 5
0 15
0 15
0 11
0 13
0 15
0 12
0 12
0 12
0 14
0 14
0 14
1 15
1 22
1 21
1 19
1 17
1 14
0 15
1 20
0 13
0 13
0 8
1 27
0 7
1 29
0 11
0 7
1 30
1 28
1 26
1 6
0 12
0 11
1 33
0 13
0 12
1 32
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #18:

score: 2
Accepted
time: 2ms
memory: 5472kb

input:

1
100
0 6
0 23
0 26
1 2
0 18
0 22
0 20
0 29
0 17
1 7
0 23
1 9
0 22
1 1
1 6
1 4
0 20
0 24
1 12
0 29
0 23
0 28
0 27
0 16
0 27
0 27
0 28
0 25
0 25
0 30
1 19
0 15
1 17
1 16
1 13
0 27
1 25
0 30
1 15
0 26
0 24
0 25
1 23
1 26
1 21
1 18
0 11
1 20
1 3
0 17
0 12
1 31
0 23
1 32
0 18
1 33
1 34
0 30
0 19
1 36
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #19:

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

input:

1
100
0 23
0 20
0 29
0 24
0 26
0 23
0 17
1 4
0 26
0 16
1 8
0 26
1 6
1 10
0 30
1 9
0 19
1 1
1 7
1 5
1 11
0 27
1 13
0 20
1 14
1 12
0 24
0 23
1 16
1 15
0 20
0 30
0 26
1 17
1 18
0 15
0 24
1 20
1 21
0 28
0 14
1 23
0 27
0 16
0 19
1 25
0 17
0 30
0 27
0 16
1 27
1 30
1 24
1 26
1 29
0 23
1 31
0 24
0 29
0 22
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 20
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #20:

score: 2
Accepted
time: 2ms
memory: 5532kb

input:

1
100
0 43
0 47
0 31
0 38
1 1
0 44
0 36
1 6
1 3
1 2
0 46
0 49
0 41
0 16
1 9
0 40
1 11
1 4
1 8
0 49
1 12
0 44
0 41
0 46
1 15
0 34
1 14
0 19
0 21
0 50
0 27
0 42
1 21
1 18
0 36
0 41
0 42
0 26
0 36
0 49
0 3
1 24
1 25
1 22
0 36
0 29
0 49
0 19
0 49
1 31
1 29
1 30
1 10
0 49
0 42
1 35
0 46
1 5
0 20
1 37
1 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 43
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #21:

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

input:

1
100
0 28
0 44
0 35
1 3
0 46
1 1
0 42
1 2
0 48
0 49
1 6
0 40
1 7
0 41
0 43
0 43
1 11
0 49
0 45
1 13
0 26
1 9
1 10
1 12
1 14
0 44
0 14
1 16
1 15
1 5
0 35
1 17
0 32
1 18
0 47
1 19
0 30
0 46
0 47
1 21
1 22
0 28
0 45
0 44
1 24
0 40
0 37
0 41
1 27
1 26
1 20
1 28
0 15
1 29
1 23
0 43
1 25
0 33
0 46
1 32
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #22:

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

input:

1
100
0 9
0 10
0 9
0 9
0 10
0 9
1 2
0 10
0 7
0 10
1 6
1 3
1 8
0 9
1 10
0 9
0 10
0 8
1 13
0 10
0 10
1 14
0 7
1 16
1 1
0 9
1 12
1 7
1 5
0 9
1 9
1 11
1 4
1 15
0 7
0 10
0 9
0 10
0 10
1 19
1 22
1 23
1 20
1 18
0 10
0 10
1 24
0 8
1 21
1 17
0 10
0 10
1 28
1 26
0 9
1 29
0 9
0 10
1 31
1 30
0 10
0 10
0 10
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 10
0 -1
1 10
0 -1
1 10
0 -1
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 ...

result:

ok both questions correct

Test #23:

score: 2
Accepted
time: 2ms
memory: 5616kb

input:

1
100
0 1
0 3
0 1
1 2
0 2
1 4
0 1
0 2
0 3
1 6
1 5
0 1
1 1
0 4
1 9
0 4
0 1
1 11
1 10
0 2
1 12
0 1
0 3
1 13
1 3
1 14
0 3
1 15
0 3
1 16
0 4
0 4
0 2
0 4
0 3
1 18
0 4
1 22
1 19
0 1
0 2
0 3
0 2
1 23
1 24
1 21
1 26
1 20
0 3
1 27
0 4
1 28
0 4
1 29
1 17
0 1
1 30
0 2
0 2
0 2
0 4
0 3
0 1
0 4
0 1
0 3
0 2
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 ...

result:

ok both questions correct

Test #24:

score: 2
Accepted
time: 2ms
memory: 5596kb

input:

1
100
0 16
0 18
0 14
0 13
0 15
1 2
1 3
0 17
1 4
0 14
0 14
1 8
1 6
0 16
0 18
0 18
0 18
1 10
0 15
0 17
1 11
1 9
0 16
1 15
0 12
0 16
0 15
1 1
0 12
1 19
1 17
0 13
1 20
1 7
1 14
1 18
0 16
0 16
1 22
1 21
1 5
1 12
0 18
1 23
0 15
1 24
0 18
0 17
1 25
1 26
0 16
1 27
0 18
0 18
0 17
1 28
0 12
1 29
1 31
0 18
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
...

result:

ok both questions correct

Test #25:

score: 2
Accepted
time: 2ms
memory: 5520kb

input:

1
100
0 36
0 40
0 37
1 3
0 40
0 32
0 37
0 35
0 39
0 39
1 4
1 7
1 2
0 37
1 10
0 37
1 11
1 6
1 1
0 39
0 40
0 36
1 13
0 36
0 33
1 16
0 39
1 17
0 34
0 38
1 18
1 19
1 14
1 8
0 36
1 20
0 37
1 21
1 12
1 9
0 39
0 38
0 37
0 39
1 23
1 25
0 38
0 39
1 27
0 40
0 38
0 36
1 30
0 34
0 37
1 31
1 32
0 37
0 38
0 37
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 36
0 -1
0 -1
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
1 39
1 39
0 -1
1 39
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #26:

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

input:

1
100
0 99
0 107
0 108
0 106
0 104
0 103
0 106
1 2
0 108
1 8
0 110
1 5
0 110
0 109
0 110
1 12
1 10
0 109
1 13
0 109
0 97
0 108
1 15
1 9
0 109
0 108
1 18
0 100
1 19
0 99
1 1
0 82
0 106
0 107
0 101
0 108
0 108
1 24
0 109
1 26
0 103
1 28
1 25
0 79
1 29
0 110
1 30
0 109
0 109
1 32
1 31
0 110
0 109
0 108...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 99
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #27:

score: 2
Accepted
time: 2ms
memory: 5524kb

input:

1
100
0 30
0 28
0 30
0 30
0 30
0 27
0 30
0 28
1 2
0 26
1 9
1 1
0 29
1 10
1 5
0 28
1 6
1 8
0 28
1 3
1 12
0 28
1 13
0 30
1 14
1 7
0 26
0 30
1 16
0 28
1 15
1 17
0 29
1 18
0 30
1 11
0 29
0 30
1 20
0 30
1 22
1 21
0 30
1 23
0 26
1 24
0 30
1 25
0 30
0 29
1 27
1 26
0 29
1 28
0 30
1 29
0 28
0 30
1 31
0 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
0 -1
1 30
0 -1
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
1 28
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
...

result:

ok both questions correct

Test #28:

score: 2
Accepted
time: 2ms
memory: 5524kb

input:

1
100
0 15
0 20
0 2
1 2
0 12
1 3
0 4
1 5
0 1
1 4
0 9
0 8
0 12
1 9
1 8
0 1
1 10
1 7
0 1
0 5
0 2
0 10
1 11
1 14
0 5
0 8
0 10
0 14
0 14
0 4
1 18
1 16
1 15
1 20
1 12
1 6
1 13
0 2
1 21
1 19
0 3
0 1
1 23
1 22
0 2
1 24
0 21
1 1
0 10
1 26
0 2
0 5
0 2
1 27
1 29
1 28
0 4
1 30
0 2
1 31
0 1
1 32
0 1
1 33
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #29:

score: 2
Accepted
time: 2ms
memory: 5472kb

input:

1
100
0 1
0 3
0 3
0 3
1 2
1 4
0 2
1 3
0 1
1 6
0 4
1 5
0 3
1 7
0 4
1 9
0 4
1 10
0 7
1 11
0 2
1 12
0 2
0 1
0 1
1 14
1 13
0 1
0 2
0 2
1 18
1 16
0 2
0 2
1 20
0 5
0 1
0 1
1 22
1 17
1 21
1 19
0 2
0 4
1 24
0 7
0 2
1 27
1 26
0 1
0 1
0 1
1 29
1 30
0 9
1 31
1 25
1 23
0 1
0 4
0 2
1 33
1 34
0 3
0 1
1 36
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
...

result:

ok both questions correct

Test #30:

score: 2
Accepted
time: 3ms
memory: 5556kb

input:

1
100
0 1
0 3
0 10
0 1
0 2
0 2
0 1
0 2
1 8
0 8
1 1
0 2
1 6
0 1
0 4
0 1
0 1
1 13
1 12
1 14
0 1
0 7
1 15
0 2
1 17
1 16
1 5
0 2
0 1
1 19
1 10
1 2
1 7
0 2
0 6
1 21
0 13
0 1
1 22
1 23
0 1
1 24
0 1
0 1
0 1
1 27
1 26
0 2
0 3
1 29
1 28
0 4
1 30
1 25
0 4
1 31
1 11
1 3
1 9
1 18
0 2
1 32
0 1
1 4
0 1
0 6
0 2
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #31:

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

input:

1
100
0 13
0 9
0 27
1 3
0 12
0 8
1 5
0 6
0 8
1 6
1 7
0 86
0 22
1 9
0 8
1 8
1 2
0 48
1 4
1 11
0 10
0 50
1 12
0 36
1 14
0 6
0 9
1 16
0 17
1 13
0 12
0 6
0 2
0 8
1 18
1 19
0 8
1 22
1 17
0 3
1 23
0 8
1 21
0 26
1 20
1 24
0 6
0 7
1 27
0 5
0 11
0 69
0 7
0 15
0 1
1 32
1 29
0 1
1 34
1 33
0 17
0 1
1 36
1 26
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #32:

score: 2
Accepted
time: 2ms
memory: 5560kb

input:

1
100
0 10
0 11
0 32
0 4
0 3
1 2
0 7
0 32
0 5
1 7
1 1
1 5
0 28
0 44
1 9
1 6
1 4
1 10
0 24
0 16
0 2
0 57
1 12
0 7
0 7
1 14
0 7
1 17
0 9
1 18
0 15
0 24
0 4
0 72
0 6
0 4
0 15
1 22
0 20
0 27
0 2
0 25
1 26
0 6
0 11
1 31
1 20
1 21
0 25
0 40
0 7
0 41
1 32
1 25
1 34
1 35
0 8
1 15
0 4
1 37
1 11
1 8
0 8
0 50
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #33:

score: 2
Accepted
time: 2ms
memory: 5516kb

input:

1
100
0 26
0 10
0 22
1 1
0 2
0 23
0 17
0 32
1 5
0 19
1 8
0 9
1 9
0 8
1 10
1 6
0 32
1 3
1 4
0 6
1 12
1 7
0 2
0 6
0 5
0 8
1 14
0 12
1 13
1 16
0 17
1 18
1 15
1 17
0 11
1 19
0 43
0 8
0 5
0 19
0 26
0 3
1 21
0 9
0 1
0 21
0 25
0 17
1 28
0 4
0 19
0 59
1 33
0 4
0 17
1 26
1 30
0 11
0 2
0 7
1 27
0 10
1 39
0 17...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 32
0 -1
1 32
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #34:

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

input:

1
100
0 4
0 6
0 4
1 2
0 3
0 4
1 3
1 5
0 6
1 6
0 7
0 7
1 7
0 6
1 9
1 1
0 8
1 10
0 3
0 6
0 5
0 5
1 14
1 12
0 4
1 15
1 11
0 7
0 1
1 16
1 17
1 13
0 3
1 18
0 5
1 19
0 4
1 20
0 7
0 1
0 8
1 22
1 23
1 21
0 4
1 24
0 8
0 1
0 4
1 26
1 25
0 5
1 27
1 28
0 7
1 29
0 5
0 1
1 31
1 30
0 9
0 9
1 32
0 5
0 6
0 9
0 3
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #35:

score: 2
Accepted
time: 2ms
memory: 5520kb

input:

1
100
0 2
0 2
0 21
0 7
1 4
0 4
0 7
1 5
0 3
1 1
0 43
1 8
0 17
0 7
1 10
0 6
1 2
0 3
1 3
1 11
1 12
0 2
1 13
1 9
0 13
1 14
0 2
1 6
0 48
0 16
0 9
0 2
0 20
1 18
1 20
1 17
0 14
1 21
1 15
1 16
0 5
0 5
1 22
0 4
1 24
0 14
1 23
1 25
0 9
0 19
0 3
1 26
0 3
1 27
0 36
1 30
1 28
1 19
0 8
0 4
1 31
1 32
0 4
0 27
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #36:

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

input:

1
100
0 5
0 9
0 17
1 2
0 2
1 3
0 5
1 4
0 7
0 15
1 5
1 7
0 15
0 9
1 8
1 9
0 2
0 9
0 11
0 16
0 17
1 12
1 11
0 13
0 4
0 15
0 15
0 11
1 19
0 15
1 20
0 11
0 5
1 22
0 5
1 23
1 15
1 14
1 21
0 41
0 13
0 5
1 26
0 22
0 1
0 14
1 27
1 28
0 1
0 2
0 11
0 8
0 23
0 7
1 33
1 29
1 30
0 32
1 36
1 25
1 31
1 18
0 52
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #37:

score: 2
Accepted
time: 2ms
memory: 5548kb

input:

1
100
0 8
0 25
0 15
1 1
0 6
0 6
1 5
0 47
1 6
0 35
0 11
0 19
0 6
1 8
0 13
0 10
0 31
0 1
0 16
0 9
0 16
0 25
1 12
0 4
0 11
0 22
0 13
0 17
1 21
1 22
0 19
1 14
1 16
1 7
1 23
1 17
0 17
1 25
0 21
1 10
1 20
0 1
1 9
1 13
0 11
0 11
1 29
1 15
1 11
1 26
1 2
1 28
1 18
0 4
0 2
0 8
1 30
1 32
0 3
1 33
1 31
0 11
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #38:

score: 2
Accepted
time: 1ms
memory: 5552kb

input:

1
100
0 12
0 4
0 1
1 3
0 5
0 8
0 8
0 1
0 6
1 5
1 4
0 22
1 6
0 3
0 2
0 15
1 12
1 2
0 5
0 12
1 14
0 5
1 15
1 8
1 9
1 7
0 2
1 13
0 6
1 16
1 1
0 6
0 3
0 1
0 3
1 21
0 12
0 2
0 1
0 10
1 23
1 22
1 24
1 10
1 18
0 1
0 17
0 15
1 28
1 26
1 27
1 17
1 11
0 8
1 29
1 19
0 1
0 5
0 12
1 31
0 10
0 3
1 33
0 17
0 4
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #39:

score: 2
Accepted
time: 2ms
memory: 5604kb

input:

1
100
0 1
0 11
0 1
1 1
0 9
1 4
0 16
1 5
0 6
0 9
1 2
1 7
0 20
1 8
0 3
1 9
0 10
1 6
0 3
0 1
0 1
1 11
1 12
1 13
0 1
1 14
0 8
1 15
0 5
1 16
0 1
1 17
0 2
1 18
0 5
0 1
1 19
0 5
1 20
0 3
1 22
1 21
0 15
0 1
1 23
0 13
1 24
1 25
0 5
0 11
1 26
1 27
0 3
1 10
0 23
0 2
0 2
0 8
0 12
1 32
0 5
0 9
0 3
1 30
1 34
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #40:

score: 2
Accepted
time: 3ms
memory: 5536kb

input:

1
100
0 27
0 25
0 6
1 3
0 1
0 15
0 3
1 5
0 12
1 7
1 4
0 38
1 6
0 4
1 1
0 8
1 10
0 1
0 3
0 4
1 8
1 9
0 18
0 11
0 20
1 14
1 16
0 16
1 17
1 11
1 12
1 15
0 4
0 11
1 18
0 5
1 20
0 5
0 5
0 4
0 1
1 24
0 19
0 6
0 19
0 7
0 3
0 8
0 2
0 6
1 32
0 8
0 1
0 9
0 7
0 7
1 34
1 37
0 11
1 27
1 31
1 26
1 22
1 23
0 47
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #41:

score: 2
Accepted
time: 2ms
memory: 5516kb

input:

1
100
0 1
0 4
0 5
1 1
0 4
1 4
0 4
1 5
0 15
1 6
0 21
1 7
0 4
0 31
0 8
0 35
0 33
0 8
1 9
0 2
0 4
1 10
1 2
0 2
0 23
0 3
0 12
0 12
1 18
0 30
0 23
1 21
1 17
1 22
1 16
1 19
0 1
0 11
1 15
0 2
0 13
1 26
1 25
0 53
1 3
0 17
1 28
1 8
1 13
0 45
1 29
1 12
0 11
0 2
1 30
1 31
0 8
0 14
0 18
0 1
0 26
1 32
1 34
0 16
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #42:

score: 2
Accepted
time: 2ms
memory: 5644kb

input:

1
100
0 498
0 492
0 498
1 1
0 494
0 484
1 3
1 2
0 500
1 6
0 492
1 7
0 480
0 493
1 8
0 483
1 10
0 499
1 4
0 489
1 12
0 498
0 488
1 13
0 481
1 14
1 11
1 9
0 492
1 16
0 487
0 497
0 486
0 500
1 20
1 19
1 18
0 491
1 21
0 494
1 22
0 499
1 23
1 15
0 495
0 488
1 24
1 5
0 495
1 26
0 498
0 494
1 28
0 492
0 45...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #43:

score: 2
Accepted
time: 2ms
memory: 5640kb

input:

1
100
0 496
0 470
0 498
0 481
0 489
0 489
1 3
1 2
0 493
0 477
0 493
0 498
0 494
1 11
1 7
1 10
1 1
0 488
1 8
1 6
0 500
1 9
0 498
1 14
1 13
0 497
0 490
0 500
0 478
1 18
0 496
0 492
0 497
0 490
1 19
1 20
1 17
0 491
0 498
1 24
1 5
1 4
0 497
1 23
0 496
0 483
0 496
1 26
0 479
1 27
0 498
0 493
1 30
0 488
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #44:

score: 2
Accepted
time: 2ms
memory: 5616kb

input:

1
100
0 498
0 499
0 500
0 487
0 500
1 1
0 499
0 499
1 7
1 2
1 4
0 496
1 8
1 6
0 500
1 9
0 495
1 5
0 480
1 10
0 497
1 11
0 494
1 13
0 499
1 14
0 499
1 15
0 500
1 16
0 500
0 497
0 499
1 18
0 500
0 499
0 499
0 496
1 20
0 499
0 496
0 500
1 19
1 21
1 17
0 499
1 27
1 26
0 500
0 498
1 28
1 25
0 495
0 498
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #45:

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

input:

1
100
0 8
0 8
0 5
1 2
0 2
0 7
1 3
1 5
0 9
1 1
0 7
1 4
0 8
1 8
0 7
1 9
0 3
0 3
1 10
0 7
1 12
1 11
0 8
0 4
1 14
0 1
0 9
0 5
1 16
1 13
1 15
0 9
1 17
1 6
0 7
0 1
0 6
1 21
0 8
1 19
1 20
1 22
0 4
1 23
0 9
0 7
0 1
1 26
1 25
1 24
0 3
0 3
0 8
1 29
0 7
1 28
1 27
0 2
0 5
1 32
1 31
0 3
1 33
1 30
0 3
0 8
0 8
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #46:

score: 2
Accepted
time: 2ms
memory: 5520kb

input:

1
100
0 496
0 493
0 500
0 499
1 2
0 499
0 500
1 6
1 3
1 1
0 499
1 4
0 485
1 8
0 500
1 9
0 499
1 7
0 500
1 11
0 493
0 500
1 12
1 13
0 497
1 14
0 497
0 500
0 495
1 16
0 498
1 15
1 17
1 18
0 495
1 19
0 497
1 20
0 500
0 500
0 498
0 492
0 500
0 499
0 498
1 24
1 27
0 491
1 28
1 26
0 499
1 29
0 500
1 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1...

result:

ok both questions correct

Test #47:

score: 2
Accepted
time: 3ms
memory: 5644kb

input:

1
100
0 490
0 500
0 500
0 499
1 2
0 495
1 1
1 4
0 498
1 3
0 500
1 7
0 499
1 6
0 498
1 8
0 500
1 10
0 499
0 500
0 499
0 499
1 13
1 11
0 498
1 12
1 5
1 15
0 499
1 16
0 500
1 17
0 500
1 18
0 500
0 492
1 20
0 499
0 497
0 498
0 499
1 23
0 500
1 22
1 19
1 25
0 498
1 21
1 26
0 497
0 500
0 499
1 29
1 27
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 490
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
...

result:

ok both questions correct

Test #48:

score: 2
Accepted
time: 2ms
memory: 5624kb

input:

1
100
0 500
0 498
0 500
0 498
1 3
1 4
0 500
0 499
0 498
1 5
0 499
1 7
1 1
1 8
0 500
1 2
0 499
0 500
0 500
1 10
1 11
1 12
0 499
1 13
0 500
0 500
0 500
0 500
0 500
0 500
1 16
1 18
1 15
1 19
1 17
0 498
1 20
1 9
0 498
0 499
0 496
1 22
1 21
0 500
0 500
1 24
0 497
0 498
1 26
0 500
1 27
1 28
1 23
0 496
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
0 -1
1 500
0 -1
1 498
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #49:

score: 2
Accepted
time: 2ms
memory: 5608kb

input:

1
100
0 1
0 1
0 1
1 2
0 1
0 1
1 3
0 1
1 6
0 1
1 7
0 1
1 8
1 1
0 2
0 1
0 1
0 2
1 12
1 9
0 1
0 3
1 14
1 10
0 2
0 1
1 16
1 4
0 2
1 17
1 5
1 13
0 1
1 18
0 1
0 1
1 20
0 3
1 21
1 15
0 1
0 2
1 23
0 1
0 4
1 24
0 4
0 1
0 1
0 2
0 2
1 29
1 27
1 25
0 2
0 3
0 2
1 33
1 32
1 31
0 2
0 3
1 34
1 35
0 1
0 2
1 36
1 22
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #50:

score: 2
Accepted
time: 2ms
memory: 5624kb

input:

1
100
0 1
0 1
0 5
1 1
0 2
1 4
0 2
0 1
1 2
0 2
1 3
0 1
1 8
0 1
1 5
0 4
1 7
0 1
0 3
0 2
0 1
0 2
1 15
1 12
0 1
0 2
1 17
1 16
0 2
0 2
1 19
1 11
1 10
0 1
1 20
1 14
1 18
1 9
0 2
1 21
0 1
0 1
0 2
1 22
1 24
0 1
1 25
1 23
0 3
0 2
1 26
0 1
0 2
1 28
1 29
0 1
0 1
0 1
0 1
1 33
0 4
0 1
0 3
0 1
0 2
0 2
1 39
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
...

result:

ok both questions correct

Test #51:

score: 2
Accepted
time: 2ms
memory: 5556kb

input:

1
100
0 48
0 99
0 6
0 99
0 99
0 99
0 99
0 42
0 99
0 39
0 99
0 18
0 99
0 99
0 47
0 99
0 99
0 45
0 99
0 99
0 8
0 99
0 99
0 34
0 99
0 22
0 36
0 49
0 99
0 31
0 99
0 99
0 99
0 99
0 40
0 99
0 12
0 43
0 7
0 30
0 99
0 29
0 19
0 26
0 99
0 99
0 1
0 37
0 46
0 99
0 41
0 11
0 10
0 99
0 99
0 99
0 9
0 99
0 4
0 24
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 48
0 -1
0 -1
0 -1
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
...

result:

ok both questions correct

Test #52:

score: 2
Accepted
time: 2ms
memory: 5556kb

input:

1
100
0 25
1 1
0 19
1 2
0 58
1 3
0 99
1 4
0 39
1 5
0 45
1 6
0 41
1 7
0 3
1 8
0 90
1 9
0 95
1 10
0 9
1 11
0 54
1 12
0 67
1 13
0 39
1 14
0 53
1 15
0 23
1 16
0 44
1 17
0 95
1 18
0 22
1 19
0 16
1 20
0 31
1 21
0 58
1 22
0 7
1 23
0 31
1 24
0 32
1 25
0 6
1 26
0 7
1 27
0 21
1 28
0 78
1 29
0 47
1 30
0 70
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 25
0 -1
1 19
0 -1
1 58
0 -1
1 99
0 -1
1 39
0 -1
1 45
0 -1
1 41
0 -1
1 3
0 -1
1 90
0 -1
1 95
0 -1
1 9
0 -1
1 54
0 -1
1 67
0 -1
1 39
0 -1
1 53
0 -1
1 23
0 -1
1 44
0 -1
1 95
0 -1
1 22
0 -1
1 16
0 -1
1 31
0 -1
1 58
0 -1
1 7
0 -1
1 3...

result:

ok both questions correct

Test #53:

score: 2
Accepted
time: 2ms
memory: 5540kb

input:

1
100
0 99
0 99
0 23
0 99
0 99
0 6
0 99
0 47
0 99
0 22
0 99
1 5
0 48
1 12
0 99
0 99
1 10
0 99
0 5
1 1
0 99
0 99
0 33
0 99
0 40
0 41
1 21
1 6
0 18
0 34
0 11
0 16
1 23
1 24
0 3
1 27
1 25
1 19
1 4
1 3
0 99
0 46
0 30
0 99
0 31
0 99
1 29
0 99
0 99
0 7
1 35
0 99
0 42
1 28
0 99
0 9
1 39
0 99
0 1
0 99
1 42
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
...

result:

ok both questions correct

Test #54:

score: 2
Accepted
time: 2ms
memory: 5544kb

input:

1
100
0 1
0 3
0 3
0 3
0 1
0 4
0 4
1 4
0 3
1 1
1 8
0 4
0 4
0 2
0 2
0 3
1 9
0 1
0 4
1 11
1 6
1 5
1 15
0 1
1 16
1 2
0 2
1 17
0 3
0 1
1 18
1 19
1 14
0 4
0 1
1 21
1 12
1 7
1 13
0 2
0 3
1 23
1 22
1 3
0 4
0 3
0 2
1 24
0 2
1 25
0 3
0 1
1 28
0 2
0 3
0 1
0 4
0 3
0 1
1 32
1 30
1 34
1 35
0 2
0 1
0 1
0 4
1 38
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 ...

result:

ok both questions correct

Test #55:

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

input:

1
100
0 1
0 1
0 3
0 3
0 2
1 1
1 5
1 4
0 1
1 6
0 2
1 3
0 2
1 7
0 2
1 9
0 1
0 3
1 10
0 1
1 2
1 8
0 4
0 1
0 1
1 13
0 1
1 15
0 3
0 2
1 18
1 14
0 4
0 3
1 16
0 4
0 4
0 4
1 22
0 1
0 4
1 23
0 4
1 25
0 1
1 24
1 21
0 3
0 1
1 29
0 1
1 30
0 3
1 31
0 3
0 2
1 32
0 3
0 1
1 35
1 28
0 3
1 34
1 19
1 11
1 26
0 4
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #56:

score: 2
Accepted
time: 2ms
memory: 5592kb

input:

1
100
0 3
0 3
0 7
1 1
0 6
1 4
0 5
1 5
0 7
1 6
0 3
1 2
0 1
1 8
0 4
0 9
1 10
1 7
0 7
1 9
0 1
1 12
0 7
0 3
1 13
1 14
0 7
0 8
0 4
1 15
0 3
0 5
0 8
0 7
1 21
1 20
0 7
0 7
0 7
0 6
0 4
1 25
0 9
1 16
0 7
1 26
0 7
0 6
0 9
0 6
1 22
0 7
0 7
0 2
1 33
1 34
0 8
1 35
0 8
1 37
1 27
1 29
1 17
0 7
0 9
1 38
0 4
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 ...

result:

ok both questions correct

Test #57:

score: 2
Accepted
time: 1ms
memory: 5528kb

input:

1
100
0 5
0 7
0 6
0 3
1 4
1 2
0 8
1 5
0 3
1 1
0 6
1 7
0 6
1 8
0 3
0 1
1 9
0 3
1 6
1 3
0 2
1 12
0 3
0 6
0 2
1 13
0 4
0 8
1 16
0 2
1 14
1 15
0 6
1 19
1 17
1 18
0 2
0 5
1 21
0 2
1 22
1 20
0 4
1 23
0 6
0 1
0 2
0 4
1 25
0 2
1 24
1 26
0 3
1 28
0 6
1 30
0 8
1 31
0 3
0 4
0 7
1 33
1 32
0 3
0 6
0 2
1 35
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #58:

score: 2
Accepted
time: 1ms
memory: 5532kb

input:

1
100
0 2
0 5
0 2
1 2
0 5
0 8
0 6
1 6
0 2
1 4
1 1
1 3
0 3
0 2
1 8
0 5
1 5
1 9
0 6
0 5
1 11
1 12
0 7
0 8
1 14
1 13
0 3
0 4
0 5
0 1
0 3
1 16
1 19
1 18
0 1
1 20
1 7
1 17
0 4
1 21
0 1
1 22
0 3
0 4
0 2
1 24
0 5
0 1
0 6
0 6
1 26
0 1
0 5
1 31
1 27
0 4
1 29
1 25
1 28
0 4
0 7
1 23
1 33
1 32
0 2
0 5
0 1
0 2
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #59:

score: 2
Accepted
time: 1ms
memory: 5524kb

input:

1
100
0 18
0 4
0 32
0 25
1 2
1 4
0 30
1 5
0 27
0 7
1 7
0 15
1 3
1 6
0 4
0 8
0 24
1 10
1 9
1 1
0 14
0 30
1 12
0 8
0 11
1 15
1 13
1 8
0 13
0 6
1 11
1 14
0 25
0 14
0 32
1 20
0 18
1 19
1 18
1 17
0 9
1 22
0 9
0 6
1 24
1 23
0 20
1 21
0 20
1 26
0 18
0 4
1 28
0 5
1 27
1 29
0 2
1 30
0 16
0 13
1 32
0 23
0 8
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 18
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #60:

score: 2
Accepted
time: 2ms
memory: 5596kb

input:

1
100
0 31
0 10
0 20
0 16
1 4
0 5
1 5
1 1
0 12
0 28
0 17
1 6
0 7
1 8
1 9
1 3
0 18
0 2
0 21
0 1
1 13
1 12
1 7
1 2
0 8
1 14
0 24
0 1
0 26
0 31
1 17
0 7
0 7
0 9
0 9
1 16
0 12
0 14
1 23
1 24
0 22
0 27
0 2
1 21
1 22
0 21
0 25
1 28
1 20
1 19
0 22
0 1
1 31
0 4
1 32
1 25
0 30
0 2
0 2
1 35
1 34
0 2
0 16
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #61:

score: 2
Accepted
time: 1ms
memory: 5556kb

input:

1
100
0 2
0 2
0 4
1 3
0 3
0 1
1 2
1 4
0 2
1 6
0 1
0 2
1 8
0 3
1 7
0 4
0 3
1 10
1 11
1 5
0 3
0 2
0 2
1 14
0 2
1 13
0 1
1 15
1 9
0 4
1 17
0 4
0 4
0 3
0 3
1 20
1 21
0 2
1 22
0 2
0 4
0 2
0 2
0 1
1 24
1 18
1 25
0 3
1 28
1 27
0 4
1 29
1 19
0 2
0 3
1 30
0 2
1 32
0 1
1 31
1 33
0 2
0 3
0 4
0 2
0 1
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #62:

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

input:

1
100
0 2
0 3
0 4
1 3
0 3
1 1
0 2
1 5
0 3
1 6
0 4
1 2
0 1
0 1
0 3
0 1
1 9
1 11
0 4
1 12
0 1
0 3
1 8
1 10
1 14
1 4
0 1
1 15
0 4
1 16
0 1
0 1
1 17
1 13
0 2
0 3
0 3
0 1
1 21
0 1
0 3
1 24
1 23
0 3
1 22
0 1
0 2
0 4
0 4
0 3
1 29
1 28
1 27
0 1
0 3
1 30
0 3
0 2
1 32
0 4
0 1
1 25
1 33
1 20
1 26
0 4
0 4
1 38
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 4
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #63:

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

input:

1
100
0 4
0 5
0 1
0 7
0 5
0 2
1 3
0 2
0 5
1 8
0 5
1 5
1 6
0 2
0 8
1 11
1 1
0 6
1 12
0 7
0 3
1 13
1 14
1 4
0 1
1 10
0 8
1 16
1 7
1 9
0 2
0 3
1 18
1 17
0 4
0 5
0 5
0 1
1 22
1 21
0 4
1 19
1 20
0 7
0 2
1 24
1 25
1 15
0 7
0 3
0 3
0 6
1 26
1 27
1 29
1 23
0 6
1 30
0 8
0 3
1 31
1 32
0 7
0 5
1 34
1 33
0 8
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #64:

score: 2
Accepted
time: 1ms
memory: 5620kb

input:

1
100
0 8
0 2
0 5
0 6
1 3
1 4
0 2
0 4
1 2
0 6
0 7
1 7
1 5
1 8
0 8
0 6
1 9
0 6
0 5
0 4
0 7
0 3
1 12
0 2
1 15
0 7
0 5
1 11
1 18
1 10
1 14
1 13
0 8
1 6
1 1
0 8
0 4
0 3
1 20
1 21
1 22
1 16
0 5
0 1
0 7
1 25
0 3
0 5
1 23
1 26
0 1
1 27
0 7
0 4
0 2
0 2
0 5
1 29
1 31
1 30
0 7
0 1
1 33
0 1
0 4
1 37
0 6
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #65:

score: 2
Accepted
time: 1ms
memory: 5532kb

input:

1
100
0 17
0 17
0 26
0 21
0 1
1 2
1 3
0 31
1 6
1 5
0 30
0 5
1 4
1 8
0 10
0 8
0 3
1 11
1 1
1 9
0 13
1 12
0 2
0 11
0 18
1 15
1 13
1 14
0 20
0 14
1 17
0 16
1 18
0 10
1 19
0 21
1 20
1 16
0 17
0 30
0 25
0 25
0 2
0 3
0 4
1 27
1 25
1 21
0 14
0 23
0 19
1 29
1 28
1 22
0 24
0 26
1 31
0 32
1 33
0 23
0 3
0 31
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #66:

score: 2
Accepted
time: 2ms
memory: 5604kb

input:

1
100
0 29
0 23
0 14
0 13
0 2
0 5
0 24
1 1
0 13
0 18
1 7
0 16
0 19
1 10
0 30
0 1
0 3
1 14
1 8
1 9
0 31
0 28
1 11
0 2
1 12
1 15
0 3
1 18
0 23
0 11
0 9
0 17
1 20
0 30
1 23
0 24
0 1
1 21
1 19
1 2
0 15
1 13
1 25
0 31
1 27
1 3
0 2
0 8
1 28
1 29
1 22
0 21
1 17
1 16
0 13
1 31
1 30
1 26
0 23
1 32
1 5
0 3
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #67:

score: 2
Accepted
time: 1ms
memory: 5556kb

input:

1
100
0 6
0 2
0 6
1 1
0 12
0 2
1 4
0 11
0 12
0 12
0 3
0 3
1 7
0 10
0 9
0 13
1 5
1 13
1 9
0 7
0 14
1 15
1 12
0 3
0 2
1 17
0 1
0 14
0 13
1 19
1 20
1 10
0 15
1 3
1 16
1 6
1 18
1 8
1 14
0 7
1 22
1 11
0 8
0 4
0 7
0 2
0 1
1 27
1 26
0 6
1 24
0 3
1 29
0 8
1 30
0 7
0 13
1 32
0 9
1 33
0 5
1 34
1 31
1 21
0 4
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
1 6
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #68:

score: 2
Accepted
time: 3ms
memory: 5644kb

input:

1
100
0 1
0 2
0 3
1 2
0 4
1 1
0 4
1 5
0 4
1 4
0 3
0 1
0 2
1 8
0 1
0 4
1 11
1 7
1 10
0 4
1 12
0 2
0 2
1 14
1 9
1 13
0 2
1 15
0 1
0 3
1 17
0 4
1 16
0 4
0 4
0 2
0 1
0 4
0 2
1 19
0 4
1 18
1 22
0 4
0 4
0 2
0 2
0 3
1 26
1 30
0 3
1 25
1 31
0 1
0 2
0 3
1 32
0 3
1 35
1 33
1 27
0 4
0 3
1 36
1 20
1 28
1 24
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #69:

score: 2
Accepted
time: 1ms
memory: 5604kb

input:

1
100
0 1
0 3
0 3
1 3
0 4
0 3
1 5
1 4
0 1
1 1
0 3
0 2
0 1
0 4
0 3
0 2
0 2
0 4
0 3
1 9
1 13
1 6
0 3
0 3
1 17
0 4
1 18
0 3
0 1
0 1
1 19
0 1
1 8
0 2
0 3
1 24
1 23
0 2
0 3
0 3
0 1
0 2
0 4
0 1
1 26
0 2
1 32
0 2
1 30
1 27
1 15
0 2
0 3
0 4
0 4
1 35
0 1
1 38
0 4
1 34
1 21
0 4
0 2
1 41
0 4
1 10
1 31
1 42
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #70:

score: 2
Accepted
time: 2ms
memory: 5524kb

input:

1
100
0 15
0 1
0 5
1 3
0 6
1 4
0 13
0 2
0 3
1 7
0 5
1 8
1 1
1 2
0 4
1 9
0 10
1 10
0 7
0 1
1 11
1 12
0 6
1 13
0 2
0 13
1 14
1 15
0 3
0 14
1 16
1 17
0 2
1 18
0 8
0 15
1 19
1 20
0 7
0 3
0 6
1 22
1 21
0 7
1 23
1 6
0 9
1 25
0 5
1 26
0 15
1 27
0 11
0 4
0 9
0 6
0 9
0 10
0 6
0 13
1 33
0 14
0 5
0 2
0 14
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #71:

score: 2
Accepted
time: 2ms
memory: 5520kb

input:

1
100
0 10
0 8
0 2
0 14
0 7
1 1
0 2
1 6
1 4
0 5
1 5
1 2
0 11
1 3
0 4
1 9
0 4
0 1
0 4
0 6
1 11
1 10
0 9
0 14
0 4
0 10
1 16
1 12
1 15
0 7
0 6
1 18
1 13
1 17
0 14
1 20
0 5
0 10
0 3
1 22
0 6
1 21
0 13
0 1
1 26
0 2
1 27
1 24
1 8
0 14
0 10
1 29
1 28
1 25
0 7
1 30
0 6
1 14
0 9
0 4
0 3
0 4
1 33
0 12
0 12
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Subtask #2:

score: 6
Accepted

Test #72:

score: 6
Accepted
time: 2ms
memory: 5680kb

input:

2
5000
0 2
0 1
0 3
1 3
0 4
1 4
0 3
1 5
0 1
0 2
1 7
1 1
0 2
0 3
0 3
1 9
1 8
1 10
0 1
1 11
0 2
0 4
1 12
0 4
0 4
0 3
1 14
1 15
0 1
1 13
0 3
0 3
1 2
0 4
0 3
1 21
0 1
1 22
1 20
1 6
1 16
1 19
0 3
1 23
0 4
0 1
0 1
1 25
1 18
1 17
0 4
0 4
0 1
0 4
0 2
1 31
1 28
1 27
0 4
1 32
1 29
1 26
0 4
1 33
0 2
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 4...

result:

ok both questions correct

Test #73:

score: 6
Accepted
time: 5ms
memory: 5628kb

input:

2
5000
0 1
0 2
0 1
1 3
0 2
0 2
0 1
1 4
0 1
1 5
1 1
1 6
0 2
1 2
0 1
0 2
1 9
0 2
1 10
1 11
0 2
0 2
0 2
1 13
0 2
1 14
1 15
0 2
0 2
0 1
0 2
1 17
0 1
1 19
0 1
1 18
1 16
0 1
0 1
0 2
1 23
1 22
0 1
0 1
1 25
1 26
1 24
1 7
1 21
0 1
0 1
1 28
0 1
0 1
0 2
1 31
1 29
1 30
1 27
0 2
1 32
1 20
0 1
1 12
0 1
1 34
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
...

result:

ok both questions correct

Test #74:

score: 6
Accepted
time: 0ms
memory: 5748kb

input:

2
5000
0 3
0 2
0 2
1 3
0 3
1 1
0 1
0 2
1 4
1 2
0 2
0 2
1 8
1 7
0 1
0 2
1 9
0 2
1 11
0 1
1 12
1 5
0 1
0 1
0 4
0 3
0 3
0 3
0 3
1 16
0 2
0 1
1 20
1 18
1 15
1 17
0 1
1 19
0 1
1 13
1 21
1 14
1 10
0 1
1 24
0 3
1 25
0 2
1 26
0 2
0 2
1 27
1 28
0 3
1 29
0 1
0 2
1 30
1 22
1 31
0 3
0 1
0 1
0 1
1 32
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 2
0 -1
1 3
0 -1
0 -1
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
...

result:

ok both questions correct

Test #75:

score: 6
Accepted
time: 5ms
memory: 5716kb

input:

2
5000
0 3
0 1
0 1
0 1
1 3
0 1
1 1
0 1
0 1
0 3
0 2
1 7
1 6
0 2
1 9
0 2
0 4
1 11
1 2
0 2
1 13
1 5
1 12
1 10
0 1
1 14
0 1
1 15
0 3
0 2
1 16
1 17
0 2
1 18
0 1
1 19
0 2
0 2
0 1
0 1
1 21
1 22
0 1
0 2
0 2
1 24
0 2
0 2
1 23
1 25
0 3
1 28
0 2
1 30
0 1
0 1
0 2
0 2
0 2
0 3
0 1
1 31
1 35
0 1
1 33
0 1
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2...

result:

ok both questions correct

Test #76:

score: 6
Accepted
time: 5ms
memory: 5708kb

input:

2
5000
0 1
0 6
0 2
1 3
0 2
1 4
0 6
0 4
1 5
0 3
0 3
1 8
0 4
1 9
1 6
1 1
0 5
0 2
1 10
1 11
0 2
1 12
0 4
1 13
0 2
1 14
0 2
1 15
0 1
0 1
0 6
0 2
1 19
0 1
1 17
0 1
0 1
0 5
1 23
1 18
1 16
1 20
1 22
1 2
0 6
0 3
1 24
0 4
0 4
0 6
0 5
0 5
0 5
0 6
0 8
0 1
0 7
1 30
1 27
0 4
0 2
1 32
1 28
0 7
1 37
0 1
0 3
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 ...

result:

ok both questions correct

Test #77:

score: 6
Accepted
time: 1ms
memory: 5748kb

input:

2
5000
0 3
0 1
0 2
1 2
0 6
0 6
1 1
1 3
0 2
0 3
1 6
1 7
0 7
1 8
0 7
0 3
1 10
1 9
0 8
1 11
0 3
1 5
0 7
1 12
0 4
1 14
0 2
0 1
0 3
0 2
1 18
1 15
0 6
0 6
1 19
1 16
0 1
1 21
0 5
0 3
0 7
0 3
1 23
1 24
0 1
0 5
1 27
1 25
0 5
0 2
0 9
1 30
0 1
1 31
1 26
1 29
1 22
0 2
1 17
1 32
0 1
0 2
0 2
0 3
0 3
1 37
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #78:

score: 6
Accepted
time: 7ms
memory: 5748kb

input:

2
5000
0 3
0 5
0 2
1 1
0 1
1 2
0 3
0 3
0 11
0 5
0 10
0 1
0 4
1 5
0 2
1 10
0 3
0 5
0 4
1 6
0 1
0 14
1 17
1 15
0 1
0 13
0 9
0 7
0 1
1 21
0 7
1 18
0 6
0 3
0 3
1 24
1 19
0 8
0 3
1 27
0 8
0 2
0 8
0 3
0 1
1 32
0 6
1 30
1 23
1 25
1 29
1 31
1 11
0 5
1 4
1 20
0 3
0 9
0 6
1 37
1 36
0 9
0 2
1 38
0 9
0 12
1 41
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #79:

score: 6
Accepted
time: 2ms
memory: 5576kb

input:

2
5000
0 1
0 8
0 10
1 2
0 5
1 1
0 9
0 9
0 6
1 7
1 3
1 5
0 7
0 3
1 9
1 8
0 8
0 9
1 11
0 11
1 12
1 6
0 9
0 4
1 13
0 12
0 8
0 1
1 17
0 10
0 3
1 19
1 15
1 14
1 16
1 10
0 2
0 1
1 20
0 6
1 22
0 11
1 23
1 18
0 2
0 10
0 8
0 2
1 26
0 9
0 11
1 25
1 28
0 6
1 30
0 4
0 7
0 2
1 31
1 33
0 2
1 34
0 5
0 5
1 36
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #80:

score: 6
Accepted
time: 3ms
memory: 5628kb

input:

2
5000
0 15
0 2
0 13
1 3
0 18
1 4
0 8
0 11
0 2
1 7
1 6
0 18
0 1
1 5
0 8
0 1
0 8
0 9
0 1
1 10
1 12
1 8
0 13
1 9
1 15
0 2
0 23
0 6
1 18
0 19
0 10
0 15
1 20
0 5
1 22
0 1
1 19
1 16
1 17
1 11
0 3
0 6
1 25
1 24
0 6
0 7
1 27
1 26
1 21
0 18
1 28
1 2
1 23
0 11
0 8
1 29
0 20
0 1
1 32
1 31
1 30
1 1
0 6
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #81:

score: 6
Accepted
time: 5ms
memory: 5672kb

input:

2
5000
0 11
0 20
0 3
1 1
0 4
0 17
1 5
1 2
0 16
1 4
0 24
0 9
1 8
1 7
0 4
1 9
0 11
0 3
1 10
0 17
1 11
1 12
0 1
1 3
0 16
1 14
0 14
1 15
0 13
1 16
0 23
0 4
1 17
0 15
1 19
1 18
0 17
0 15
1 21
0 17
0 20
0 3
1 24
0 8
1 22
0 22
1 26
1 20
0 9
1 27
1 23
0 11
1 28
1 25
0 8
1 6
0 24
0 11
0 1
1 32
0 1
1 33
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #82:

score: 6
Accepted
time: 5ms
memory: 5704kb

input:

2
5000
0 4
0 4
0 3
1 1
0 2
1 2
0 4
0 2
0 3
1 3
0 4
1 5
0 4
0 3
1 10
1 6
0 4
1 11
0 4
0 4
1 13
0 3
0 4
1 12
1 7
1 14
1 8
0 4
1 16
1 15
0 3
0 2
1 18
0 4
0 2
0 2
0 2
1 19
0 4
1 23
1 17
1 21
1 22
0 2
0 3
0 4
1 26
0 4
0 4
0 4
1 29
0 4
0 3
0 3
0 4
1 30
0 4
1 34
0 4
1 35
0 4
0 4
0 4
0 3
0 4
0 4
1 38
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #83:

score: 6
Accepted
time: 5ms
memory: 5712kb

input:

2
5000
0 2
0 2
0 3
1 1
0 4
0 2
0 4
1 3
0 4
0 1
1 2
0 1
0 3
1 10
0 4
0 2
0 2
0 1
0 3
1 12
0 3
0 3
1 14
1 16
0 4
1 13
0 2
1 18
0 4
0 3
0 2
0 2
1 23
1 19
1 15
1 9
1 20
1 6
0 4
0 4
0 4
1 25
1 24
0 3
0 4
1 26
1 27
0 2
0 1
0 2
1 30
1 29
0 3
1 7
1 4
1 17
1 5
1 32
1 31
1 22
1 21
1 28
0 4
1 33
0 4
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #84:

score: 6
Accepted
time: 5ms
memory: 5744kb

input:

2
5000
0 4
0 4
0 3
1 3
0 4
1 4
0 3
1 1
0 3
0 2
1 2
1 5
0 4
1 8
0 4
1 6
0 2
0 2
1 11
1 10
0 4
1 12
0 4
0 4
0 3
0 4
0 4
0 4
0 4
1 15
0 3
1 20
1 18
1 16
1 14
0 4
0 2
0 4
1 21
0 4
0 3
1 24
1 25
1 22
1 9
0 2
0 4
0 4
1 28
1 26
0 4
0 3
1 30
1 29
0 4
1 31
0 4
1 32
0 4
1 33
0 4
1 34
0 4
0 3
0 3
1 35
0 4
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1...

result:

ok both questions correct

Test #85:

score: 6
Accepted
time: 3ms
memory: 5676kb

input:

2
5000
0 9
0 5
0 9
1 3
0 9
1 4
0 7
1 1
0 8
0 9
1 2
1 5
0 6
1 7
0 6
1 9
0 8
0 5
1 10
0 8
0 8
1 12
1 13
1 11
0 4
1 14
0 9
0 8
1 15
1 16
0 6
1 17
0 9
1 18
0 9
1 8
0 9
0 5
1 20
0 5
0 9
1 23
0 4
0 6
1 24
0 5
1 21
1 26
1 22
0 9
0 6
0 5
0 8
0 6
0 9
1 31
1 28
1 27
1 32
1 30
1 25
0 9
1 33
1 29
0 8
0 8
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
1 9
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #86:

score: 6
Accepted
time: 0ms
memory: 5660kb

input:

2
5000
0 8
0 3
0 9
0 9
1 1
0 9
0 9
1 2
0 7
1 4
0 8
0 8
1 6
0 9
0 8
0 8
0 8
0 8
0 9
0 6
0 7
0 4
0 8
1 16
1 5
0 9
0 9
1 18
0 8
1 12
1 19
0 9
1 22
0 8
1 24
1 10
1 21
1 17
0 6
0 9
1 25
0 7
0 7
1 28
0 8
1 29
1 15
1 27
1 11
1 3
0 8
0 7
1 30
1 31
0 9
0 7
1 33
0 7
0 8
0 7
0 7
1 35
1 32
0 9
0 9
0 3
0 8
0 6
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #87:

score: 6
Accepted
time: 4ms
memory: 3588kb

input:

2
5000
0 11
0 7
0 10
0 14
1 2
1 1
0 13
1 5
0 13
1 6
0 12
0 15
1 7
0 5
0 10
1 9
1 10
0 9
1 11
0 15
1 12
0 13
0 12
1 4
1 14
0 7
1 15
0 14
0 15
0 7
0 11
0 15
1 20
0 13
1 16
0 10
0 14
0 15
1 21
0 10
1 25
0 10
1 22
1 26
1 18
0 11
1 27
0 15
1 28
0 10
1 29
0 4
1 24
1 30
0 9
0 12
1 31
1 32
1 23
1 17
1 13
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #88:

score: 6
Accepted
time: 5ms
memory: 5656kb

input:

2
5000
0 10
0 15
0 11
1 2
0 6
0 14
0 8
0 11
1 6
0 14
0 7
0 15
1 10
1 7
0 15
1 11
1 1
1 8
0 15
0 11
0 13
1 13
0 12
0 12
1 15
1 5
0 15
1 4
1 3
0 13
1 14
0 15
1 17
1 19
1 9
1 12
0 10
0 4
1 21
1 20
0 6
0 5
1 23
1 18
0 13
0 13
1 24
1 25
0 12
0 12
0 10
0 12
0 14
1 28
0 13
0 7
1 31
0 14
1 32
1 26
1 29
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #89:

score: 6
Accepted
time: 3ms
memory: 5580kb

input:

2
5000
0 29
0 27
0 24
1 2
0 9
1 3
0 28
1 5
0 27
1 4
0 15
0 29
1 8
1 7
0 30
1 9
0 14
0 23
0 30
0 27
1 11
0 30
0 30
0 27
1 13
0 12
1 12
1 16
1 10
0 30
0 15
1 18
0 28
0 23
1 20
0 28
1 22
1 17
1 6
1 19
1 14
1 15
0 20
1 23
0 21
1 24
0 19
0 16
0 16
0 29
0 14
1 27
1 29
0 26
1 25
1 28
0 17
1 31
1 30
1 21
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #90:

score: 6
Accepted
time: 7ms
memory: 5676kb

input:

2
5000
0 25
0 28
0 23
0 25
0 27
1 1
1 5
1 4
0 27
0 18
0 17
0 20
1 6
1 2
1 3
0 28
0 29
1 11
1 8
0 17
1 12
1 7
0 24
1 13
0 22
0 14
0 29
1 15
0 26
0 26
0 21
0 23
0 28
1 18
0 24
0 16
0 26
1 23
0 23
0 27
1 26
1 22
0 17
1 17
0 30
1 28
1 24
1 14
1 20
1 25
1 27
0 16
1 29
1 19
1 16
1 21
0 27
1 30
0 22
0 21
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #91:

score: 6
Accepted
time: 1ms
memory: 5720kb

input:

2
5000
0 38
0 25
0 43
0 40
0 42
1 3
0 18
0 50
0 21
1 7
1 5
1 1
1 6
1 4
0 31
1 9
0 36
1 8
0 44
0 40
0 35
0 40
1 12
0 50
1 15
1 14
0 45
1 13
1 16
0 50
1 17
0 48
0 32
0 46
1 20
0 21
0 38
0 45
0 41
1 21
0 28
0 40
1 18
1 24
1 25
0 37
0 32
1 27
1 19
0 45
1 29
1 23
1 22
1 26
1 2
1 28
0 28
0 40
0 36
0 25
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #92:

score: 6
Accepted
time: 5ms
memory: 5640kb

input:

2
5000
0 49
0 33
0 42
1 2
0 43
1 1
0 48
0 35
0 44
1 4
0 50
1 8
0 43
1 5
0 44
1 10
0 49
0 44
1 12
1 11
0 31
1 13
1 3
1 9
0 49
1 14
0 34
0 26
0 40
0 37
1 15
0 43
0 44
1 16
0 29
0 39
1 22
1 17
1 18
0 26
1 19
0 46
1 24
0 46
0 36
0 48
0 46
1 26
0 28
0 42
0 29
0 50
1 30
1 25
1 32
0 34
1 33
0 49
0 42
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 49
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #93:

score: 6
Accepted
time: 5ms
memory: 5664kb

input:

2
5000
0 9
0 7
0 9
0 5
0 10
1 4
0 9
0 7
1 2
1 7
1 5
0 10
0 8
1 8
0 6
0 10
1 11
0 9
1 12
1 10
0 10
0 9
0 9
1 15
0 10
0 6
1 13
1 14
1 17
1 16
0 3
1 18
0 8
0 9
1 19
0 10
0 9
1 21
1 22
0 10
1 23
1 20
1 6
1 1
0 10
0 9
1 25
0 10
0 8
1 26
1 27
0 10
0 9
1 29
1 28
1 24
0 8
0 10
1 31
1 30
0 6
0 10
1 32
0 9
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #94:

score: 6
Accepted
time: 5ms
memory: 5632kb

input:

2
5000
0 2
0 4
0 3
1 2
0 3
1 3
0 1
0 4
0 2
1 5
1 6
1 7
0 4
1 8
0 2
1 9
0 4
1 10
0 2
0 3
1 12
1 11
0 3
1 13
0 3
0 3
0 1
1 16
1 14
0 4
0 2
1 15
1 17
0 4
1 1
1 18
0 4
1 20
0 4
1 21
0 3
1 22
0 4
1 23
0 1
0 4
0 4
0 4
0 2
0 2
1 24
1 28
1 25
1 26
1 29
1 27
0 4
0 1
1 31
0 4
1 32
1 30
0 3
1 33
0 1
0 4
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
...

result:

ok both questions correct

Test #95:

score: 6
Accepted
time: 6ms
memory: 5636kb

input:

2
5000
0 13
0 10
0 15
0 14
0 17
0 17
0 17
1 2
0 17
1 8
0 13
0 9
1 9
1 7
0 8
1 11
1 6
1 4
1 5
1 1
0 15
0 18
1 13
0 14
0 15
0 15
0 10
1 15
1 12
1 16
0 15
1 14
1 17
1 10
0 17
1 19
0 16
1 20
0 18
1 21
0 16
0 18
0 18
0 9
1 22
0 16
0 14
1 27
1 24
0 11
1 28
1 23
1 25
1 18
0 17
1 29
0 18
0 18
0 14
0 12
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #96:

score: 6
Accepted
time: 5ms
memory: 3620kb

input:

2
5000
0 38
0 37
0 37
1 1
0 38
0 34
0 36
0 39
1 7
0 39
0 40
0 40
0 38
0 40
0 39
1 10
1 9
1 4
0 38
1 6
0 39
1 11
0 39
0 38
0 32
1 16
1 3
0 38
1 19
0 40
1 20
0 35
1 21
0 39
1 22
0 32
0 36
0 40
1 25
1 24
0 39
0 39
0 39
1 27
0 39
1 28
1 29
1 26
1 15
1 18
1 13
0 38
0 39
0 39
0 39
0 40
1 32
0 40
0 38
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 38
0 -1
1 37
1 37
1 37
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #97:

score: 6
Accepted
time: 1ms
memory: 3536kb

input:

2
5000
0 110
0 110
0 109
0 106
0 104
0 110
0 106
0 107
0 109
0 108
1 5
0 106
1 8
1 3
0 109
0 109
0 108
0 105
0 108
1 15
0 108
0 106
0 110
0 110
0 103
0 110
0 98
1 21
1 19
0 110
0 109
1 22
0 109
0 104
0 110
0 109
0 103
1 28
1 16
1 1
0 107
1 31
0 107
0 108
0 110
1 4
0 100
1 35
0 94
1 36
1 25
0 93
0 10...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 110
1 110
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #98:

score: 6
Accepted
time: 1ms
memory: 3632kb

input:

2
5000
0 27
0 26
0 29
1 1
0 30
0 28
1 4
1 3
0 30
0 29
0 30
1 8
1 7
0 30
0 28
1 9
1 10
0 30
0 30
0 30
1 12
1 2
1 5
0 27
0 29
1 14
0 30
1 11
1 13
1 15
0 29
1 17
0 30
1 18
0 27
0 30
1 19
0 27
0 28
0 25
1 21
1 22
0 29
1 23
1 20
0 30
1 25
1 24
0 30
1 26
0 30
1 27
0 30
0 30
0 30
1 29
1 30
1 16
0 29
0 29
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
...

result:

ok both questions correct

Test #99:

score: 6
Accepted
time: 1ms
memory: 3540kb

input:

2
5000
0 3
0 1
0 1
0 2
1 2
0 5
1 5
0 1
0 11
0 3
1 7
0 3
0 13
1 10
1 8
1 6
0 2
1 3
0 18
1 4
1 12
1 9
0 3
0 12
1 14
0 8
0 5
1 16
1 15
1 13
0 5
0 2
0 2
1 17
1 11
1 1
0 1
1 20
0 1
0 5
0 2
0 4
0 1
1 23
0 7
0 3
0 13
0 1
1 22
1 29
1 21
0 2
1 24
1 27
1 26
1 25
1 28
0 10
1 31
1 30
0 6
1 32
0 1
1 33
0 3
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #100:

score: 6
Accepted
time: 5ms
memory: 3624kb

input:

2
5000
0 10
0 3
0 10
1 1
0 1
0 1
1 4
0 2
0 6
1 2
0 3
1 6
1 8
1 3
0 6
0 9
0 3
1 10
1 9
1 5
0 1
1 12
0 3
0 1
1 14
1 11
0 5
0 3
0 1
1 16
1 17
1 15
0 9
0 4
0 1
0 12
1 21
1 20
1 18
0 1
1 19
0 2
1 22
1 23
0 6
0 3
1 24
0 1
1 26
0 3
0 2
1 28
1 27
0 2
1 29
0 1
0 1
1 30
1 7
0 1
1 32
0 2
0 3
1 33
1 34
0 1
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 3
...

result:

ok both questions correct

Test #101:

score: 6
Accepted
time: 4ms
memory: 3580kb

input:

2
5000
0 1
0 4
0 4
0 2
1 1
0 6
0 1
1 5
0 5
0 6
0 2
0 3
1 10
1 9
1 4
1 7
1 3
0 6
0 10
0 5
1 11
1 12
0 4
0 1
1 14
0 11
1 16
1 15
1 2
0 3
1 17
1 13
0 4
1 18
0 5
1 19
0 5
0 2
1 21
0 8
0 1
0 2
0 2
1 22
0 8
1 26
1 23
0 1
0 1
1 28
0 2
1 20
0 1
0 1
1 31
0 2
0 4
1 30
0 1
1 32
0 2
0 3
1 34
1 29
1 35
1 24
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #102:

score: 6
Accepted
time: 3ms
memory: 3620kb

input:

2
5000
0 1
0 15
0 22
1 2
0 6
1 4
0 8
1 5
0 14
0 38
0 5
1 8
0 44
0 19
0 14
1 7
1 11
1 10
0 3
0 57
1 12
0 8
0 13
0 8
1 14
0 16
1 16
0 1
1 18
1 1
1 13
1 9
1 3
0 4
1 19
0 20
1 20
0 37
0 14
0 3
1 21
1 23
0 8
0 10
0 24
1 26
1 25
0 6
0 11
1 28
0 9
1 27
1 29
1 24
0 2
1 30
1 15
1 22
0 37
0 11
1 17
1 32
0 5
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #103:

score: 6
Accepted
time: 5ms
memory: 3580kb

input:

2
5000
0 4
0 4
0 27
0 20
1 2
1 3
0 18
0 34
1 6
1 5
0 3
1 7
0 8
1 4
0 5
0 4
0 1
1 10
0 41
1 12
0 42
0 2
0 3
1 14
1 8
1 13
0 8
1 16
0 8
0 41
0 8
1 18
0 1
1 17
1 20
1 15
1 9
0 8
0 31
0 5
1 23
1 22
0 22
0 18
1 24
0 19
0 13
1 27
0 12
1 28
0 5
0 12
1 30
1 29
1 26
0 38
1 31
0 3
0 33
0 5
1 32
0 18
1 35
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #104:

score: 6
Accepted
time: 1ms
memory: 3684kb

input:

2
5000
0 9
0 28
0 10
0 61
0 11
0 20
0 16
0 10
1 2
1 7
1 4
0 1
1 3
0 15
0 2
0 22
0 3
0 2
0 14
0 1
0 2
0 3
0 12
0 11
1 10
0 4
1 12
0 10
1 11
1 20
1 8
0 10
1 16
1 14
1 13
1 5
1 15
1 19
0 18
1 24
1 18
1 1
1 21
1 17
1 23
0 4
0 21
1 26
0 5
0 4
0 3
0 17
1 28
1 29
1 27
1 25
1 30
0 6
1 31
0 8
0 7
0 25
0 23
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #105:

score: 6
Accepted
time: 1ms
memory: 3604kb

input:

2
5000
0 3
0 4
0 5
1 1
0 7
1 3
0 5
0 2
1 6
0 8
0 8
1 8
0 9
1 9
0 2
1 10
1 2
0 2
0 6
0 6
1 13
0 8
0 7
0 4
0 6
1 17
1 15
1 5
1 16
1 12
0 9
1 18
0 3
0 6
0 9
1 20
0 6
0 7
1 19
1 23
1 21
1 4
1 14
0 1
0 5
1 25
1 22
0 8
1 26
1 7
0 2
1 27
0 5
1 28
0 7
0 7
0 1
0 4
0 7
0 8
1 30
1 31
1 32
0 8
1 35
1 29
1 34
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #106:

score: 6
Accepted
time: 0ms
memory: 3632kb

input:

2
5000
0 19
0 9
0 9
0 10
1 2
0 2
1 4
0 5
0 43
0 3
1 7
1 6
1 8
1 3
0 9
1 9
0 19
1 10
0 4
0 14
1 12
1 11
0 6
1 1
0 19
0 2
0 5
1 16
0 1
1 17
0 36
1 18
0 9
1 19
0 8
1 20
0 31
1 21
1 15
1 5
0 4
1 22
0 2
1 23
0 51
1 24
0 16
0 8
0 29
1 25
1 27
0 9
1 28
0 3
1 29
1 26
0 11
0 6
0 2
1 30
0 22
1 33
0 3
0 24
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 19
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 19
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #107:

score: 6
Accepted
time: 4ms
memory: 3588kb

input:

2
5000
0 31
0 24
0 7
0 13
1 3
1 2
0 2
0 4
0 5
1 4
1 1
1 5
0 32
1 8
0 32
1 9
0 5
0 12
0 4
0 1
0 5
0 1
1 10
0 4
1 13
1 11
1 14
1 16
1 15
0 8
1 12
0 42
1 18
1 7
0 10
1 19
0 14
1 20
0 31
1 21
0 2
1 22
0 2
0 36
0 25
1 25
0 6
0 1
1 27
0 2
1 24
1 28
0 21
0 3
0 16
1 29
0 26
0 26
0 2
0 4
1 34
0 5
0 4
0 78
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #108:

score: 6
Accepted
time: 4ms
memory: 3612kb

input:

2
5000
0 2
0 4
0 7
0 17
1 3
0 4
0 5
0 3
1 6
0 1
0 11
1 1
1 7
1 9
1 5
1 4
0 22
1 10
0 40
1 11
0 3
0 11
1 12
0 3
0 11
1 15
0 2
1 16
1 13
1 14
0 25
0 14
0 2
1 18
0 30
1 20
0 1
0 21
0 51
1 22
0 1
1 19
1 24
0 15
0 23
1 26
0 36
1 27
0 26
0 11
0 23
1 29
1 28
0 6
1 30
1 31
1 17
0 16
1 32
0 3
1 33
0 25
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #109:

score: 6
Accepted
time: 5ms
memory: 3588kb

input:

2
5000
0 4
0 11
0 9
0 11
1 2
0 6
1 5
0 4
1 6
1 3
0 4
1 1
0 6
0 5
1 9
1 8
0 4
0 1
1 10
1 11
0 4
1 12
0 2
0 2
0 17
1 13
0 10
1 15
1 14
1 16
0 2
1 17
0 5
1 18
0 19
1 19
0 8
0 4
0 9
1 21
1 22
0 2
1 23
1 20
0 3
1 24
0 2
1 25
0 3
1 26
0 8
0 12
0 3
1 29
0 19
1 28
1 30
0 8
0 10
1 32
1 31
0 8
1 27
1 33
0 3
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #110:

score: 6
Accepted
time: 1ms
memory: 3704kb

input:

2
5000
0 7
0 2
0 8
1 2
0 8
1 4
0 9
0 4
1 5
1 1
0 2
1 7
0 2
0 2
0 1
1 9
1 3
1 8
0 9
0 6
0 10
1 13
1 11
1 12
0 2
0 26
1 14
0 4
1 16
0 15
0 13
1 17
1 18
1 15
0 1
1 19
0 8
1 20
0 12
0 5
0 9
1 21
0 18
1 22
1 24
0 7
0 1
0 10
0 2
0 4
0 3
0 5
1 25
0 7
0 1
1 27
1 31
1 28
1 29
0 1
1 33
0 2
1 23
1 32
1 30
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #111:

score: 6
Accepted
time: 4ms
memory: 3672kb

input:

2
5000
0 9
0 4
0 1
0 14
0 36
1 5
1 1
1 4
0 12
0 16
1 3
1 6
0 24
1 8
0 4
0 29
0 18
0 16
0 2
0 4
0 3
1 9
1 11
0 8
1 12
0 14
1 17
1 13
1 10
0 7
0 13
1 19
1 14
1 2
0 10
1 20
1 7
1 18
0 11
1 21
0 64
1 22
0 17
1 23
0 23
0 2
0 10
1 25
0 7
0 8
1 28
1 26
1 24
0 3
0 5
1 29
0 1
0 9
0 2
1 31
0 7
0 7
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #112:

score: 6
Accepted
time: 4ms
memory: 3584kb

input:

2
5000
0 15
0 12
0 54
0 19
0 8
0 14
0 39
1 3
1 4
0 3
0 9
1 1
1 5
1 8
1 6
0 13
0 13
1 11
1 10
0 26
0 2
1 12
0 14
1 14
0 5
0 31
1 16
0 25
0 28
0 8
1 18
1 19
0 19
0 9
0 41
1 22
1 17
0 8
1 23
1 21
0 17
0 7
1 25
1 20
1 13
0 8
1 26
1 2
1 15
0 2
0 8
0 1
1 29
0 18
1 30
0 5
1 31
0 4
1 32
1 27
1 9
1 7
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #113:

score: 6
Accepted
time: 4ms
memory: 3588kb

input:

2
5000
0 484
0 472
0 474
1 2
0 496
0 490
0 499
0 496
0 495
1 6
1 4
0 498
1 9
1 8
0 497
1 10
1 3
0 497
0 493
0 498
0 493
1 11
1 13
0 490
1 12
1 14
1 15
0 479
1 16
0 500
0 481
1 18
0 498
1 19
0 500
1 17
0 500
1 21
0 496
1 22
0 492
0 493
0 494
0 494
0 489
1 26
1 23
0 500
0 497
1 27
1 24
0 500
0 493
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 484
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #114:

score: 6
Accepted
time: 5ms
memory: 3624kb

input:

2
5000
0 427
0 497
0 479
1 2
0 491
1 3
0 490
0 482
0 496
1 5
0 498
0 491
0 491
1 8
1 7
1 9
1 6
1 4
0 500
1 11
0 490
1 12
0 494
0 487
1 13
1 1
0 484
1 15
0 492
1 16
0 498
1 17
0 486
1 10
0 500
1 19
0 489
0 481
1 21
0 487
1 20
1 22
0 490
1 23
0 496
1 24
0 496
0 481
0 486
1 26
1 14
1 18
0 493
0 493
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 427
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 491
0 -1
1 491
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 487
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #115:

score: 6
Accepted
time: 2ms
memory: 3704kb

input:

2
5000
0 500
0 497
0 495
1 1
0 495
1 3
0 499
0 495
0 497
0 493
1 7
1 5
0 500
0 497
0 500
0 499
1 10
1 12
0 498
0 497
0 500
0 499
1 13
1 16
1 14
0 500
0 499
0 499
0 496
1 20
1 9
0 499
0 497
1 22
0 500
0 493
0 495
1 24
0 487
1 23
1 21
0 494
1 17
1 25
1 11
0 500
1 28
0 496
0 496
1 30
0 497
1 31
1 6
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
0 -1
0 -1
0 -1
1 495
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #116:

score: 6
Accepted
time: 4ms
memory: 3600kb

input:

2
5000
0 8
0 6
0 2
1 2
0 2
0 3
1 5
1 4
0 9
0 8
1 7
1 6
0 6
1 8
0 3
0 3
1 10
1 1
0 8
0 2
1 11
0 6
0 3
0 1
1 12
1 14
0 9
0 1
0 2
0 7
1 16
1 18
1 13
0 5
0 6
0 5
0 3
1 20
0 5
1 22
1 24
0 9
0 4
1 25
0 3
1 27
0 2
0 5
1 28
1 29
1 23
0 7
0 9
0 4
0 4
0 4
0 3
1 33
0 8
1 35
1 34
0 3
0 9
1 37
0 9
0 2
1 39
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #117:

score: 6
Accepted
time: 4ms
memory: 3600kb

input:

2
5000
0 499
0 500
0 496
1 3
0 497
0 500
1 4
0 497
1 6
1 2
0 499
1 1
0 500
0 500
1 8
1 5
0 497
1 10
0 497
1 11
0 496
1 12
0 500
0 497
0 500
0 500
0 487
1 16
0 499
1 13
1 18
1 15
1 7
1 14
0 499
1 19
0 500
0 499
1 21
0 500
1 22
1 20
0 500
0 500
0 500
1 25
1 23
1 24
0 500
1 26
0 500
0 499
1 28
1 27
0 5...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500...

result:

ok both questions correct

Test #118:

score: 6
Accepted
time: 4ms
memory: 3584kb

input:

2
5000
0 499
0 498
0 498
1 1
0 496
0 497
0 499
1 2
1 4
1 5
0 500
1 7
0 496
0 498
0 500
1 9
0 499
1 11
0 500
1 12
0 500
0 500
1 14
0 497
1 15
1 10
0 496
0 499
0 499
0 500
0 500
0 498
0 500
1 16
1 17
0 489
0 499
1 22
1 19
0 500
1 25
0 497
0 494
1 27
1 18
0 495
1 28
0 498
1 29
1 24
1 21
0 495
1 30
1 23...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 499
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #119:

score: 6
Accepted
time: 4ms
memory: 3628kb

input:

2
5000
0 498
0 500
0 498
0 497
0 500
0 500
1 2
0 499
1 5
1 6
1 4
0 499
0 500
1 9
1 8
1 7
0 498
1 3
0 500
0 500
1 11
0 499
1 13
1 12
0 500
1 14
0 499
1 15
0 499
1 16
0 499
0 493
1 17
0 498
0 500
1 1
1 10
0 498
0 500
1 22
1 21
1 20
0 500
1 23
0 500
1 24
0 499
0 500
1 25
1 26
0 500
0 499
0 500
1 29
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
0 -1
0 -1
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
0 -1
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #120:

score: 6
Accepted
time: 4ms
memory: 3584kb

input:

2
5000
0 5
0 1
0 2
0 7
1 1
0 4
0 1
1 3
1 5
1 4
0 2
0 1
0 1
1 7
1 2
0 2
0 1
0 6
0 1
0 2
1 14
0 1
0 1
1 16
1 12
0 1
1 15
0 1
0 1
0 1
1 10
0 1
1 21
1 11
1 13
1 17
1 9
0 1
1 22
1 18
0 2
1 20
1 23
0 3
0 2
0 1
1 24
1 25
0 2
0 1
1 28
1 27
1 19
1 8
0 1
1 29
0 1
0 5
0 2
1 31
0 1
1 33
1 30
1 32
0 2
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 both questions correct

Test #121:

score: 6
Accepted
time: 4ms
memory: 3620kb

input:

2
5000
0 1
0 3
0 2
0 1
1 3
1 1
0 1
0 2
1 4
0 1
1 2
0 1
0 2
0 3
1 10
0 5
0 1
1 11
1 8
0 1
0 6
1 14
0 2
1 9
1 6
0 2
0 1
1 17
1 16
0 2
1 18
0 2
0 1
0 2
0 1
0 1
1 20
0 1
0 1
1 24
1 25
1 23
1 15
1 21
0 2
1 26
1 12
1 19
0 1
1 27
0 1
0 7
0 1
1 28
0 1
0 2
0 3
0 1
1 32
1 31
0 1
0 3
1 35
0 3
1 33
1 34
1 37
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 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 both questions correct

Test #122:

score: 6
Accepted
time: 5ms
memory: 3668kb

input:

2
5000
0 4999
0 4999
0 4999
0 4999
0 1459
0 780
0 4999
0 4999
0 4999
0 4999
0 4999
0 1646
0 4999
0 4999
0 1909
0 1645
0 4999
0 4999
0 1271
0 49
0 4999
0 1765
0 2471
0 997
0 4999
0 515
0 797
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 1948
0 4999
0 1938
0 4999
0 499...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999...

result:

ok both questions correct

Test #123:

score: 6
Accepted
time: 4ms
memory: 3636kb

input:

2
5000
0 648
1 1
0 2926
1 2
0 1100
1 3
0 3813
1 4
0 3649
1 5
0 935
1 6
0 205
1 7
0 2370
1 8
0 2844
1 9
0 1517
1 10
0 1826
1 11
0 807
1 12
0 722
1 13
0 4953
1 14
0 1821
1 15
0 3989
1 16
0 2453
1 17
0 1279
1 18
0 2650
1 19
0 4708
1 20
0 4677
1 21
0 409
1 22
0 4516
1 23
0 2550
1 24
0 2990
1 25
0 3107
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 648
0 -1
1 2926
0 -1
1 1100
0 -1
1 3813
0 -1
1 3649
0 -1
1 935
0 -1
1 205
0 -1
1 2370
0 -1
1 2844
0 -1
1 1517
0 -1
1 1826
0 -1
1 807
0 -1
1 722
0 -1
1 4953
0 -1
1 1821
0 -1
1 3989
0 -1
1 2453
0 -1
1 1279
0 -1
1 2650
0 -1
1 4708
...

result:

ok both questions correct

Test #124:

score: 6
Accepted
time: 2ms
memory: 3656kb

input:

2
5000
0 2309
0 2174
0 1880
0 2089
0 415
0 1149
0 464
0 2335
0 4999
0 1682
0 2436
0 4999
1 4
1 1
0 4999
0 4999
0 4999
1 10
0 4999
1 2
0 1071
0 2147
1 14
0 4999
0 2384
1 19
0 4999
0 4999
0 395
0 4999
0 150
0 4999
0 4999
0 4999
0 2180
1 24
0 4999
0 8
0 4999
1 31
0 1018
0 4999
0 1628
0 4999
1 33
0 2398...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2309
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4999
0...

result:

ok both questions correct

Test #125:

score: 6
Accepted
time: 0ms
memory: 3660kb

input:

2
5000
0 2
0 4
0 2
0 4
1 2
0 1
1 5
0 1
1 1
0 1
1 6
0 3
0 3
0 2
0 3
1 8
1 9
0 4
1 3
0 3
0 4
1 14
0 1
1 15
0 3
1 16
1 7
1 11
0 1
0 3
0 4
0 3
1 17
0 3
1 21
0 1
0 4
0 2
1 23
1 19
0 1
1 25
0 4
0 3
1 27
0 3
0 1
1 29
1 26
0 4
1 30
0 3
1 31
1 22
1 20
0 2
1 32
1 24
0 2
1 28
0 4
1 34
0 3
0 3
0 1
1 35
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #126:

score: 6
Accepted
time: 4ms
memory: 3596kb

input:

2
5000
0 2
0 1
0 2
0 4
1 1
1 2
0 3
0 3
1 6
1 3
0 2
0 4
1 8
0 1
0 4
0 3
0 2
1 4
0 1
1 7
0 4
1 5
0 1
0 1
1 16
0 1
1 15
1 9
1 12
1 13
1 17
0 4
1 18
0 4
0 1
1 19
1 20
1 14
0 4
1 21
0 1
0 3
0 3
1 22
1 11
0 4
0 4
0 4
1 27
1 26
1 25
1 10
0 4
1 28
0 2
1 29
0 3
1 30
0 2
1 31
0 4
1 32
0 4
0 1
0 2
0 4
1 36
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 4
1 4
1 4
...

result:

ok both questions correct

Test #127:

score: 6
Accepted
time: 5ms
memory: 3668kb

input:

2
5000
0 3
0 7
0 8
1 1
0 1
1 4
0 8
1 5
0 7
1 6
0 8
0 2
1 7
1 8
0 4
1 3
0 7
0 8
1 11
1 10
0 5
0 5
0 2
0 9
1 12
1 9
1 2
1 14
0 1
0 2
0 9
0 6
0 4
1 16
1 20
0 1
0 5
0 7
0 9
0 9
0 7
1 23
0 4
0 7
0 1
1 26
0 1
0 3
0 5
1 21
0 6
1 25
1 29
1 24
0 4
1 34
0 8
0 4
1 36
1 31
1 27
1 22
0 7
1 37
0 8
1 38
1 17
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #128:

score: 6
Accepted
time: 5ms
memory: 3584kb

input:

2
5000
0 6
0 8
0 2
0 8
0 6
1 3
1 2
0 3
0 7
1 7
1 6
0 6
1 8
1 1
0 1
0 3
0 4
0 3
1 9
1 12
0 2
0 2
1 14
1 13
1 10
0 3
1 15
1 5
0 5
0 1
1 16
0 6
0 7
0 5
1 19
0 8
0 4
0 1
0 6
1 22
1 21
0 3
1 23
1 25
1 20
0 3
1 26
1 11
1 24
0 5
0 6
1 27
0 8
1 29
0 8
0 8
1 30
0 6
1 31
1 4
0 3
1 33
0 1
1 34
0 5
0 2
0 5
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #129:

score: 6
Accepted
time: 4ms
memory: 3620kb

input:

2
5000
0 2
0 6
0 6
1 2
0 5
0 7
0 8
1 1
1 4
0 6
0 3
0 5
1 9
0 5
1 5
0 6
1 7
1 8
0 6
1 12
1 6
0 1
1 13
0 6
0 5
0 8
0 2
1 14
1 15
0 1
0 4
0 5
1 17
0 3
1 19
0 8
0 1
1 22
0 6
1 24
1 18
1 16
0 4
0 1
0 8
1 25
0 7
1 27
1 26
1 28
0 5
0 4
0 6
1 30
0 1
0 4
0 6
1 32
1 34
1 33
0 3
0 7
1 36
0 1
0 6
1 37
0 8
1 39
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #130:

score: 6
Accepted
time: 0ms
memory: 3708kb

input:

2
5000
0 30
0 1
0 21
1 2
0 19
1 3
0 29
1 5
0 12
1 6
0 25
0 22
0 19
0 15
1 10
0 27
1 8
0 16
1 12
1 7
0 24
1 1
0 27
0 9
1 14
0 23
1 4
1 16
1 11
0 16
1 9
0 28
1 18
1 15
0 18
0 18
0 32
1 19
0 2
0 18
0 14
0 25
0 20
1 22
0 32
1 23
1 27
0 22
0 22
0 6
1 29
0 3
0 6
1 32
0 5
1 31
1 33
0 25
1 21
0 24
0 9
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #131:

score: 6
Accepted
time: 4ms
memory: 3592kb

input:

2
5000
0 10
0 7
0 9
1 3
0 18
0 31
1 1
0 4
0 31
1 5
1 2
0 3
1 6
1 7
0 16
0 31
1 9
0 27
0 8
0 16
1 10
0 7
1 13
0 30
0 2
1 16
0 9
0 7
0 9
1 17
0 18
1 20
1 19
0 13
1 21
0 16
0 2
0 16
0 20
1 24
0 17
1 25
0 28
1 27
1 23
0 25
0 3
1 22
1 28
1 29
1 8
1 12
1 26
0 7
0 26
1 30
1 31
1 18
1 4
0 1
0 20
0 26
0 31
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #132:

score: 6
Accepted
time: 4ms
memory: 3636kb

input:

2
5000
0 3
0 2
0 3
1 2
0 3
0 4
1 4
0 4
0 1
0 2
0 3
1 6
1 8
0 1
0 3
0 1
1 7
0 4
0 3
0 2
1 12
0 2
1 11
0 2
0 1
1 17
1 10
0 3
1 19
1 13
1 15
0 1
1 20
1 5
1 1
1 14
1 9
1 3
0 1
0 3
0 2
1 22
0 2
1 23
0 3
1 25
0 3
0 4
1 27
0 3
1 24
1 26
1 21
1 28
0 1
1 29
0 3
0 3
0 1
1 31
1 18
1 30
0 2
0 4
0 3
1 35
0 2
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #133:

score: 6
Accepted
time: 0ms
memory: 3532kb

input:

2
5000
0 3
0 4
0 3
1 2
0 3
1 4
0 3
0 2
1 6
0 4
0 1
1 5
1 3
1 1
0 3
1 9
0 4
1 10
0 2
0 1
0 3
0 4
1 11
0 4
1 14
1 12
0 4
0 4
0 4
0 3
0 3
1 16
0 3
1 13
1 19
0 1
1 22
0 1
1 23
1 21
0 4
0 4
1 17
1 18
0 3
1 15
1 25
0 1
0 4
0 1
1 29
1 28
1 27
1 7
1 20
0 2
1 30
0 4
0 3
1 32
1 31
1 24
0 2
0 4
0 2
0 2
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #134:

score: 6
Accepted
time: 4ms
memory: 3596kb

input:

2
5000
0 5
0 6
0 4
0 4
1 4
0 4
0 4
1 6
0 6
0 6
1 5
1 3
1 2
1 7
0 7
0 3
0 6
0 2
1 12
1 9
0 1
0 7
0 7
1 14
1 15
0 4
1 11
1 10
1 13
0 8
1 17
1 8
0 1
0 4
1 18
0 8
0 2
0 5
0 3
1 21
1 22
1 20
0 8
0 5
1 24
0 2
0 6
1 27
1 26
1 25
1 19
1 23
0 5
0 5
1 28
0 4
1 29
1 30
0 7
0 2
1 31
1 32
0 3
1 33
0 5
1 34
0 6
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #135:

score: 6
Accepted
time: 4ms
memory: 3592kb

input:

2
5000
0 1
0 3
0 8
0 4
0 8
0 7
1 2
1 3
0 8
1 6
0 3
0 8
0 6
1 9
1 10
1 1
0 1
1 7
0 7
1 12
0 5
0 1
0 3
1 13
1 4
1 15
1 8
0 5
1 16
1 5
0 4
0 6
0 1
0 1
0 3
0 4
1 17
1 19
1 20
0 1
1 23
1 18
0 2
0 4
0 5
1 24
1 25
1 26
0 8
0 8
0 4
1 27
1 22
1 28
1 29
1 21
0 6
0 2
0 5
0 6
1 32
1 33
1 31
1 30
0 2
0 2
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #136:

score: 6
Accepted
time: 4ms
memory: 3592kb

input:

2
5000
0 28
0 15
0 15
0 1
0 21
0 8
0 24
0 31
1 5
0 12
0 3
1 9
1 1
1 6
0 22
0 10
1 12
0 8
0 15
1 14
1 7
0 12
0 31
1 16
0 17
0 12
1 18
0 23
1 15
0 17
0 19
0 25
0 2
0 2
1 22
1 20
0 18
1 25
0 1
1 26
0 24
1 27
1 11
1 21
1 24
1 8
1 19
1 10
0 24
0 21
0 13
1 30
1 29
1 28
1 3
1 13
1 2
0 19
0 2
1 31
1 32
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 28
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #137:

score: 6
Accepted
time: 1ms
memory: 3632kb

input:

2
5000
0 9
0 21
0 3
1 1
0 10
1 3
0 8
1 5
0 9
0 20
0 18
1 7
1 8
1 2
0 22
0 32
0 4
1 9
0 26
0 1
1 13
1 11
1 12
1 10
0 1
1 14
0 12
1 15
0 15
0 15
1 17
0 12
1 18
1 16
0 14
0 21
0 25
0 5
1 22
1 19
1 20
1 21
0 6
1 23
0 20
0 17
0 18
1 26
0 32
0 2
0 8
1 28
1 25
0 20
1 24
1 30
1 27
0 4
1 29
0 20
1 32
0 14
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #138:

score: 6
Accepted
time: 0ms
memory: 3680kb

input:

2
5000
0 8
0 10
0 6
1 1
0 11
1 2
0 3
1 5
0 15
0 8
0 6
0 4
1 6
1 7
0 9
1 8
1 10
0 1
1 11
0 2
1 12
1 4
0 9
1 13
0 15
0 5
0 2
1 15
0 13
1 14
1 16
0 13
0 3
1 18
1 19
1 9
0 13
1 20
0 1
0 10
0 4
0 10
0 11
1 25
0 6
1 26
1 22
0 13
1 27
1 24
0 10
1 28
0 2
1 29
0 11
0 14
1 30
0 3
1 32
0 12
1 31
1 33
1 21
0 6
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #139:

score: 6
Accepted
time: 4ms
memory: 3592kb

input:

2
5000
0 1
0 2
0 2
1 1
0 4
1 4
0 4
0 1
1 5
0 4
0 4
1 8
0 4
1 9
0 4
0 3
0 4
1 11
1 12
1 10
1 6
0 2
0 3
0 3
1 14
0 3
0 1
1 16
0 1
1 15
1 13
1 7
0 2
0 1
1 19
0 3
1 20
0 3
1 22
0 4
1 23
1 21
0 3
1 24
0 4
1 25
0 3
0 4
1 26
0 3
1 28
1 27
0 4
1 29
0 1
1 30
0 4
1 31
0 1
1 32
1 2
0 2
0 3
1 34
1 33
0 4
0 2
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #140:

score: 6
Accepted
time: 4ms
memory: 3708kb

input:

2
5000
0 2
0 4
0 2
1 2
0 4
1 3
0 1
0 4
0 3
0 2
0 1
1 5
1 6
0 4
0 2
0 2
0 4
0 2
1 14
0 3
1 12
0 1
1 15
0 2
1 7
0 1
1 9
1 11
0 3
0 4
1 19
0 4
0 1
1 21
0 1
1 4
1 18
0 3
1 24
1 23
1 1
1 13
0 3
0 1
0 2
0 1
0 4
1 28
0 1
1 30
0 3
0 1
0 1
1 33
0 3
1 31
1 32
0 2
1 35
0 4
0 4
1 34
1 25
0 1
0 3
1 38
1 36
0 2
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #141:

score: 6
Accepted
time: 0ms
memory: 3700kb

input:

2
5000
0 3
0 2
0 3
0 6
1 4
0 8
1 2
0 15
1 6
0 3
1 7
1 5
0 10
0 12
1 9
0 6
1 10
1 3
0 13
0 5
0 11
1 12
0 13
0 13
1 14
1 15
1 1
1 8
0 11
0 2
0 9
1 18
1 17
1 16
0 14
1 19
0 12
0 10
1 20
0 5
1 21
1 22
0 4
1 23
0 13
0 7
1 24
0 7
1 26
0 13
0 1
0 8
1 28
0 5
1 30
1 25
0 13
0 3
1 32
0 12
1 33
0 5
0 11
0 11
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #142:

score: 6
Accepted
time: 4ms
memory: 3600kb

input:

2
5000
0 13
0 1
0 2
0 11
0 9
0 10
1 3
1 2
0 2
0 9
0 3
0 8
0 13
0 7
0 9
1 11
1 13
1 7
1 12
1 4
0 3
0 10
0 8
0 5
0 4
1 17
0 13
0 1
0 8
0 8
0 12
1 19
0 15
0 1
0 3
1 24
0 15
1 26
0 9
1 27
0 14
0 15
1 21
1 22
1 16
0 8
1 31
0 13
1 32
1 28
1 15
1 23
1 25
0 3
1 33
0 15
0 7
0 2
0 1
1 37
1 36
1 35
0 11
1 38
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Subtask #3:

score: 18
Accepted

Test #143:

score: 18
Accepted
time: 20ms
memory: 3736kb

input:

3
50000
0 2
0 1
0 1
1 1
0 4
1 2
0 1
1 4
0 3
1 6
0 4
1 7
0 1
0 4
1 3
1 8
0 3
0 1
0 2
0 3
1 10
1 13
0 3
0 2
0 1
0 2
1 14
1 17
0 4
0 1
1 18
1 15
1 16
0 4
0 1
1 20
1 21
1 19
1 11
1 5
0 1
0 4
1 23
1 9
0 1
1 24
0 3
0 1
1 25
1 26
0 3
0 3
1 27
1 28
0 1
1 29
0 4
0 4
0 1
1 31
1 30
0 1
1 33
1 32
0 4
0 4
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0...

result:

ok both questions correct

Test #144:

score: 18
Accepted
time: 17ms
memory: 3740kb

input:

3
50000
0 2
0 1
0 2
1 1
0 2
1 3
0 1
1 5
0 1
1 6
0 1
1 7
0 1
1 8
0 1
0 2
0 1
0 1
1 9
1 12
0 2
1 13
1 2
0 1
0 1
0 2
1 15
1 4
1 14
1 16
0 2
0 1
1 17
1 18
0 2
1 19
0 1
1 20
0 1
1 21
0 1
0 1
0 1
1 22
0 1
0 2
0 2
0 1
1 28
0 1
1 26
1 24
1 25
1 27
0 2
1 30
1 23
1 29
0 1
1 31
0 1
1 10
0 2
0 2
1 33
0 2
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1...

result:

ok both questions correct

Test #145:

score: 18
Accepted
time: 26ms
memory: 3784kb

input:

3
50000
0 4
0 2
0 2
0 2
0 1
0 1
0 1
0 1
0 1
0 2
1 10
1 1
1 3
0 1
0 3
1 2
1 4
1 6
0 1
1 11
1 13
0 1
1 8
0 1
0 1
0 3
0 4
0 1
1 15
1 17
0 3
1 20
0 1
1 21
1 14
1 12
0 2
0 3
1 22
1 23
1 5
0 1
1 19
1 7
1 9
0 1
1 25
0 1
1 26
1 24
0 1
0 3
0 1
0 1
1 29
0 1
0 2
1 31
1 32
1 30
0 1
0 2
1 34
0 1
0 1
0 3
1 33
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1...

result:

ok both questions correct

Test #146:

score: 18
Accepted
time: 26ms
memory: 3700kb

input:

3
50000
0 3
0 2
0 4
0 3
1 3
0 1
1 1
1 4
0 3
0 2
1 7
0 1
0 3
0 2
1 10
0 1
1 9
0 1
1 12
1 6
0 3
0 4
1 2
0 1
0 2
1 16
0 1
0 1
1 17
0 3
1 13
1 14
1 19
0 1
1 20
1 18
0 1
0 2
0 2
1 21
1 22
0 2
1 24
0 2
0 2
1 25
0 1
1 26
0 4
0 1
1 27
1 29
0 1
1 23
1 30
1 28
1 8
1 5
0 2
1 11
0 1
1 32
0 1
0 1
0 1
1 34
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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 both questions correct

Test #147:

score: 18
Accepted
time: 29ms
memory: 3784kb

input:

3
50000
0 2
0 1
0 3
1 3
0 1
1 2
0 1
1 5
0 3
1 6
0 6
1 1
0 2
0 3
1 9
1 7
0 2
1 4
0 1
1 11
0 7
1 12
0 2
1 13
0 1
1 14
0 8
1 15
0 8
0 2
1 17
1 16
0 1
1 18
0 7
1 19
0 5
1 20
0 1
1 21
0 4
0 7
0 1
1 24
1 23
1 22
0 4
1 25
0 1
1 26
0 7
1 27
0 3
0 4
0 9
1 30
1 28
0 1
0 4
1 31
1 29
0 3
0 3
1 34
1 32
0 1
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 ...

result:

ok both questions correct

Test #148:

score: 18
Accepted
time: 27ms
memory: 3728kb

input:

3
50000
0 5
0 3
0 3
0 5
1 1
0 5
0 3
0 3
0 1
1 7
1 4
1 8
1 2
0 4
0 2
0 7
1 9
0 1
0 2
1 12
1 11
1 13
1 6
1 5
0 2
1 14
0 2
0 1
1 16
0 3
0 8
1 18
0 5
1 19
1 3
1 17
0 2
0 6
1 20
1 21
0 5
1 22
0 1
0 3
1 24
0 1
0 1
1 25
0 7
1 27
0 1
0 9
1 26
0 5
1 30
0 4
1 31
0 4
1 32
1 29
1 23
0 1
0 1
0 1
0 5
0 5
0 2
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
1 1...

result:

ok both questions correct

Test #149:

score: 18
Accepted
time: 30ms
memory: 3700kb

input:

3
50000
0 11
0 7
0 4
0 6
1 3
0 5
0 2
0 5
1 5
1 7
0 3
1 8
0 11
1 9
1 1
1 6
0 3
0 13
0 13
0 11
1 12
0 5
1 11
1 13
0 6
0 3
1 15
1 10
1 16
1 14
0 4
0 2
0 1
0 1
0 6
0 6
1 17
0 8
1 19
1 21
0 1
1 24
1 20
0 3
1 25
0 8
1 22
0 8
0 9
1 27
0 6
1 29
0 1
1 30
1 28
1 23
0 8
1 18
1 4
0 7
0 4
0 9
0 9
1 34
0 9
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #150:

score: 18
Accepted
time: 25ms
memory: 3776kb

input:

3
50000
0 2
0 9
0 2
0 12
1 1
1 2
0 4
1 5
0 3
1 6
0 8
1 7
0 1
1 4
0 10
0 10
1 10
1 9
0 9
0 2
0 12
0 9
1 13
1 12
1 14
0 3
1 15
0 3
0 1
1 17
0 11
0 4
1 16
1 18
0 10
1 20
0 12
1 21
1 19
0 5
0 8
0 2
1 23
0 8
0 4
1 25
1 26
1 22
1 11
1 8
0 3
1 27
0 2
0 3
0 4
1 29
1 30
0 10
0 7
0 9
1 32
0 3
0 2
0 13
1 31
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #151:

score: 18
Accepted
time: 28ms
memory: 3696kb

input:

3
50000
0 9
0 25
0 5
0 25
0 14
0 25
0 3
0 3
0 17
0 11
0 9
1 7
1 4
0 12
0 24
0 20
1 14
0 23
1 6
1 3
1 2
1 1
1 12
1 9
0 3
0 7
0 5
1 18
1 17
1 5
0 19
0 2
1 20
1 19
1 15
1 10
0 14
0 5
0 2
0 17
1 23
1 21
0 15
1 25
0 4
0 18
0 6
0 10
0 2
1 30
1 27
1 29
1 28
0 1
1 24
0 2
1 31
0 10
0 22
1 34
1 32
0 22
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #152:

score: 18
Accepted
time: 30ms
memory: 3816kb

input:

3
50000
0 21
0 13
0 6
0 12
0 5
1 1
0 16
1 3
0 8
0 4
1 7
1 2
1 4
0 1
1 8
0 2
1 5
1 9
0 17
0 8
0 6
0 2
1 12
1 13
0 2
1 15
0 11
1 16
1 14
0 4
0 8
1 18
1 17
0 5
0 20
1 20
0 29
0 10
1 21
1 11
1 22
0 4
1 6
0 29
0 8
1 25
1 24
0 8
1 26
1 19
0 17
1 27
0 21
1 28
0 14
1 29
0 12
0 3
0 2
1 32
0 6
0 3
1 30
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 21
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #153:

score: 18
Accepted
time: 26ms
memory: 3720kb

input:

3
50000
0 3
0 4
0 4
0 2
1 1
1 2
0 4
1 5
0 4
0 4
0 4
0 2
0 4
0 3
0 4
0 3
1 8
0 4
1 9
1 11
1 3
0 3
0 4
0 4
1 15
0 4
0 2
1 19
1 16
1 18
1 17
0 3
1 20
1 13
0 2
0 3
1 22
1 10
0 4
1 23
0 4
1 6
1 14
0 2
1 25
1 4
0 3
1 26
0 4
0 3
1 28
1 27
1 21
0 4
0 3
0 4
0 4
1 32
0 2
0 2
0 3
0 2
1 29
0 4
0 3
0 4
1 39
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1...

result:

ok both questions correct

Test #154:

score: 18
Accepted
time: 26ms
memory: 3728kb

input:

3
50000
0 3
0 2
0 1
1 3
0 3
1 4
0 2
1 5
0 3
1 6
0 3
1 7
0 2
1 8
0 1
0 2
0 2
1 10
1 11
1 9
0 2
1 12
0 2
0 4
0 2
0 2
0 2
0 4
0 2
1 18
1 17
1 13
0 1
0 2
0 3
1 22
0 2
0 3
1 16
1 15
1 19
1 23
1 14
0 1
1 21
1 2
1 20
1 25
0 4
1 26
0 2
0 2
0 4
1 27
1 29
1 28
0 1
1 30
0 1
1 31
0 4
0 1
1 32
1 33
0 2
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 3
0 -1
1 3
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1...

result:

ok both questions correct

Test #155:

score: 18
Accepted
time: 26ms
memory: 3652kb

input:

3
50000
0 4
0 4
0 4
1 3
0 4
1 1
0 3
0 4
0 3
1 5
0 4
0 4
0 1
0 2
0 4
1 9
0 4
0 4
0 4
1 14
1 11
1 4
0 4
1 16
1 13
1 2
1 7
1 15
1 10
0 3
1 17
1 8
0 3
0 4
1 19
1 18
0 3
1 20
0 3
0 3
1 22
0 4
1 21
0 4
1 24
0 4
0 4
1 25
1 26
0 3
1 27
1 23
0 3
0 3
0 4
1 29
0 4
0 4
1 28
1 32
1 30
0 4
0 4
0 4
0 2
1 35
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
...

result:

ok both questions correct

Test #156:

score: 18
Accepted
time: 29ms
memory: 3736kb

input:

3
50000
0 7
0 6
0 8
1 3
0 9
1 4
0 6
0 6
0 8
1 1
1 5
0 8
0 8
1 9
0 6
1 10
1 6
0 8
0 8
0 8
0 8
0 9
1 15
1 11
0 9
1 12
1 14
0 8
0 9
1 18
0 8
0 9
1 19
1 16
0 9
1 17
0 8
0 6
0 8
0 8
1 24
1 23
1 13
0 9
1 26
0 9
0 8
1 27
1 28
1 20
0 4
1 29
0 6
1 30
0 2
0 9
1 32
0 4
0 6
1 31
0 9
1 34
0 4
0 4
1 36
0 9
1 37
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 8
0 -1
1 6
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 ...

result:

ok both questions correct

Test #157:

score: 18
Accepted
time: 18ms
memory: 3780kb

input:

3
50000
0 7
0 8
0 8
0 9
0 9
1 2
1 5
0 9
1 1
0 6
1 7
0 9
1 8
0 7
0 3
1 10
1 6
1 4
0 8
1 11
0 5
1 12
0 9
1 13
0 8
1 3
0 5
0 4
0 8
1 15
0 8
1 18
0 8
0 5
1 19
1 16
0 9
0 9
0 8
0 7
0 7
1 24
0 5
0 9
1 27
0 7
0 9
1 28
1 23
1 22
0 8
1 30
0 9
1 29
0 7
0 7
1 33
0 8
0 7
0 7
0 9
0 8
1 34
1 32
0 8
0 8
1 39
1 40
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #158:

score: 18
Accepted
time: 26ms
memory: 3692kb

input:

3
50000
0 12
0 13
0 11
0 4
0 15
0 12
0 14
0 9
1 4
1 5
1 7
0 10
0 13
1 8
0 11
0 13
1 11
1 12
1 9
1 1
0 6
0 12
0 14
0 11
1 16
0 13
1 14
0 14
0 14
0 7
0 15
1 19
0 13
1 18
0 13
0 8
0 11
1 23
1 24
1 20
1 15
1 13
1 22
0 8
0 14
1 27
0 12
0 13
0 8
1 28
0 14
1 30
0 11
0 10
1 33
1 26
1 29
1 32
0 10
1 34
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #159:

score: 18
Accepted
time: 26ms
memory: 3700kb

input:

3
50000
0 14
0 12
0 13
1 3
0 7
0 5
1 2
0 7
0 15
1 7
0 15
1 5
1 1
0 15
1 9
0 15
1 4
1 6
0 4
1 11
0 15
0 14
0 15
0 5
0 14
1 13
0 8
0 15
1 16
1 17
1 15
0 13
0 10
0 12
0 15
0 13
0 11
0 11
0 14
1 19
1 25
0 10
1 27
0 10
1 28
1 20
1 22
0 9
1 29
1 26
0 12
0 13
0 15
1 31
0 14
1 30
1 32
0 14
1 34
0 12
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 ...

result:

ok both questions correct

Test #160:

score: 18
Accepted
time: 27ms
memory: 3700kb

input:

3
50000
0 23
0 25
0 29
0 11
0 22
1 5
0 24
1 1
0 23
1 7
0 26
1 4
0 23
1 2
0 14
1 3
1 6
0 9
1 11
0 24
0 30
1 13
0 30
1 12
0 24
0 29
0 23
0 18
0 21
1 19
0 21
1 20
1 17
0 28
0 25
1 21
0 29
0 28
0 25
1 25
1 16
0 21
0 27
1 26
1 27
1 15
0 13
1 14
1 18
1 22
0 19
1 29
1 23
1 9
0 14
1 30
1 24
1 8
0 26
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #161:

score: 18
Accepted
time: 28ms
memory: 3812kb

input:

3
50000
0 30
0 30
0 25
1 3
0 23
0 5
1 2
1 1
0 30
0 26
0 21
1 7
1 8
0 29
0 16
0 11
0 21
1 11
0 27
0 28
0 17
0 29
0 25
1 16
0 17
0 18
0 20
1 17
0 29
0 26
0 29
1 14
0 30
0 30
1 13
0 20
0 27
1 26
1 27
1 25
0 18
0 23
0 25
0 15
1 28
1 31
0 12
1 32
0 21
0 27
1 30
1 12
0 25
0 17
1 36
0 26
0 26
0 28
0 30
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 30
1 30
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #162:

score: 18
Accepted
time: 22ms
memory: 3644kb

input:

3
50000
0 41
0 40
0 33
0 40
0 30
1 3
0 39
0 42
1 5
1 4
0 39
0 44
1 9
1 2
1 8
0 38
1 6
1 1
0 46
0 39
0 22
1 13
1 11
1 12
0 33
1 14
0 37
1 15
0 27
1 16
0 21
0 47
1 17
0 27
1 19
0 28
1 20
1 18
0 49
1 21
0 50
1 22
0 20
0 46
1 23
0 20
0 47
1 25
0 44
1 27
0 46
1 28
1 26
1 24
0 42
0 41
0 40
0 44
1 32
0 48
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 41
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #163:

score: 18
Accepted
time: 30ms
memory: 3696kb

input:

3
50000
0 44
0 47
0 49
1 3
0 41
0 15
1 4
0 38
1 5
1 1
0 29
0 32
1 6
0 41
1 7
1 2
0 43
0 48
0 45
1 10
1 12
0 47
1 11
1 13
0 44
0 32
0 27
0 35
1 14
1 16
1 15
0 30
0 45
0 37
1 18
1 17
1 19
1 20
0 50
0 50
0 43
0 47
0 47
1 23
0 43
0 33
1 27
0 37
1 28
0 36
0 32
0 49
0 27
0 41
1 33
0 50
0 48
1 34
1 30
0 36...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 44
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #164:

score: 18
Accepted
time: 28ms
memory: 3772kb

input:

3
50000
0 8
0 6
0 10
1 3
0 10
1 1
0 9
0 7
0 5
0 10
1 8
0 10
1 9
0 9
0 9
0 5
1 12
1 5
0 10
1 13
1 6
1 11
1 7
1 10
0 7
0 10
1 15
0 9
0 9
1 17
1 14
0 10
1 18
0 10
0 8
1 20
1 19
0 9
1 21
0 6
1 22
1 16
0 9
1 23
0 9
1 24
0 7
0 10
1 25
0 7
1 27
1 26
0 9
0 8
0 8
1 28
1 29
1 30
0 10
1 31
0 10
0 9
1 32
0 10
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #165:

score: 18
Accepted
time: 28ms
memory: 3772kb

input:

3
50000
0 3
0 4
0 1
0 3
1 4
0 3
1 1
1 2
0 4
1 6
0 2
0 4
0 4
0 1
1 8
1 7
1 5
0 4
0 3
1 12
1 3
0 1
0 4
1 13
1 14
1 10
0 2
0 4
0 1
0 2
0 2
1 17
1 15
1 19
1 16
0 2
0 2
1 20
1 21
1 18
0 1
0 4
0 3
1 22
1 24
0 1
1 25
1 11
0 1
1 26
0 1
0 1
1 27
0 1
0 1
0 3
0 1
1 31
1 29
0 2
0 1
1 33
1 30
0 4
0 3
1 36
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 2
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 ...

result:

ok both questions correct

Test #166:

score: 18
Accepted
time: 29ms
memory: 3772kb

input:

3
50000
0 16
0 16
0 18
1 3
0 18
0 16
0 14
0 17
1 2
0 17
1 1
0 17
1 4
1 5
1 7
0 17
0 14
0 17
1 11
0 15
0 16
1 10
0 15
1 15
1 12
0 13
0 18
1 16
1 17
1 6
0 13
0 17
0 12
1 19
1 20
0 15
0 16
0 16
1 22
0 17
1 24
0 18
0 9
1 23
0 12
1 25
1 26
1 21
1 27
0 18
0 18
0 14
0 16
1 28
1 30
0 15
0 17
0 12
1 32
0 17
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 16
1 16
1 16
1 16
1 16
1 16
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #167:

score: 18
Accepted
time: 15ms
memory: 3796kb

input:

3
50000
0 36
0 40
0 35
1 1
0 40
1 3
0 40
1 5
0 31
0 35
0 40
1 6
1 7
1 8
0 39
1 9
0 40
0 37
0 38
0 40
0 40
1 11
1 14
0 40
1 12
0 39
1 13
1 10
0 39
0 40
0 39
0 40
0 39
0 38
0 40
0 40
0 39
0 39
1 25
0 38
0 39
1 24
0 39
1 29
1 17
1 27
1 26
1 28
0 37
0 36
1 30
1 31
1 23
0 39
1 32
1 18
0 36
0 36
1 34
1 22...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 36
0 -1
0 -1
0 -1
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #168:

score: 18
Accepted
time: 32ms
memory: 3728kb

input:

3
50000
0 110
0 94
0 103
1 3
0 107
0 102
1 2
1 1
0 96
0 110
1 7
1 5
0 105
1 8
0 109
1 9
0 110
0 106
0 106
1 11
1 12
0 109
0 108
1 4
0 110
1 6
1 10
0 109
1 15
1 16
0 109
1 17
0 103
0 106
0 106
1 19
0 101
0 109
0 107
1 22
0 106
0 107
1 23
0 107
1 26
1 18
0 103
1 21
0 105
0 107
0 106
1 29
0 109
1 28
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 109
0 -1
1 109
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #169:

score: 18
Accepted
time: 22ms
memory: 3812kb

input:

3
50000
0 26
0 30
0 26
0 29
1 4
0 28
0 28
0 29
0 27
1 5
0 29
0 29
1 1
1 7
0 30
1 11
0 29
1 2
1 6
1 9
1 3
1 12
0 30
0 30
0 28
1 15
1 13
0 30
1 14
1 10
0 29
1 17
0 28
0 30
0 27
0 30
1 19
1 20
0 30
0 30
0 29
0 30
0 30
1 23
0 30
1 27
0 30
1 22
1 18
0 28
1 29
1 28
0 30
1 30
1 26
1 24
0 28
0 25
0 30
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 26
0 -1
1 26
0 -1
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 29
0 -1
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
...

result:

ok both questions correct

Test #170:

score: 18
Accepted
time: 27ms
memory: 3724kb

input:

3
50000
0 2
0 6
0 1
0 5
1 4
1 3
0 1
0 1
1 6
1 5
0 11
0 1
0 4
0 17
1 8
1 10
1 9
0 12
0 11
1 11
1 12
0 6
0 2
0 3
0 4
0 3
1 17
0 1
0 4
0 1
0 2
0 4
1 22
1 20
0 1
0 8
1 21
1 16
0 8
1 13
0 4
0 2
0 3
0 3
0 1
0 8
0 2
1 32
0 3
1 30
1 33
0 2
1 14
0 7
1 34
0 13
0 4
1 36
0 2
1 38
1 27
1 31
1 23
1 15
1 35
1 26
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #171:

score: 18
Accepted
time: 30ms
memory: 3728kb

input:

3
50000
0 2
0 12
0 6
0 1
1 4
0 1
1 1
1 2
0 5
0 1
1 7
1 6
0 2
0 3
1 5
0 1
0 2
0 5
1 11
1 12
0 2
1 13
0 1
0 7
1 15
0 3
1 3
0 1
0 10
0 3
0 5
1 17
0 1
0 2
0 1
1 21
0 1
1 18
0 4
0 5
1 24
0 1
1 20
0 2
0 3
1 29
1 22
0 4
0 12
1 30
1 25
0 6
1 32
0 3
0 2
1 33
0 3
0 6
0 6
0 3
0 2
1 36
0 1
0 4
0 1
1 41
0 2
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #172:

score: 18
Accepted
time: 20ms
memory: 3732kb

input:

3
50000
0 6
0 3
0 7
1 2
0 1
1 4
0 1
1 5
0 3
0 1
0 3
0 3
1 7
1 6
1 9
0 2
1 10
1 8
0 3
0 4
1 12
1 11
0 4
0 4
1 14
0 3
0 3
0 4
0 3
1 17
0 1
0 3
1 20
0 2
1 18
1 16
0 4
1 22
0 6
0 1
0 1
1 24
1 15
0 3
0 4
0 3
0 2
1 26
0 2
1 19
0 8
1 27
1 23
0 1
0 4
0 2
1 32
1 33
1 34
1 25
0 10
1 35
0 5
0 1
0 2
1 38
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #173:

score: 18
Accepted
time: 26ms
memory: 3720kb

input:

3
50000
0 10
0 19
0 6
0 13
1 4
1 2
0 34
1 1
0 21
1 3
0 3
1 7
0 3
1 8
0 13
0 22
1 10
0 1
0 13
0 52
1 13
1 12
1 11
1 9
0 23
0 19
0 18
0 4
0 1
1 17
1 15
1 14
1 18
1 16
0 33
0 25
0 11
1 20
0 4
1 21
1 22
0 47
1 23
0 5
0 8
1 24
0 21
0 25
1 27
1 26
0 2
0 32
0 10
1 30
1 28
0 45
0 13
0 11
0 15
1 32
1 33
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #174:

score: 18
Accepted
time: 24ms
memory: 3796kb

input:

3
50000
0 7
0 6
0 10
1 3
0 1
0 15
0 32
0 2
0 65
0 73
0 20
0 3
0 19
1 6
1 11
0 18
1 4
0 1
0 13
1 15
0 6
1 16
0 12
1 1
0 3
1 14
0 5
0 28
0 23
0 1
0 17
0 14
1 22
0 23
0 27
1 24
1 8
1 17
0 15
0 89
1 27
1 28
1 19
0 6
1 10
1 13
0 26
1 30
0 1
1 26
1 18
1 7
0 38
0 2
0 11
0 29
1 34
1 35
1 32
1 21
0 18
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #175:

score: 18
Accepted
time: 31ms
memory: 3708kb

input:

3
50000
0 1
0 14
0 1
0 8
0 4
0 5
1 3
0 15
0 17
0 16
1 7
1 5
1 6
0 23
0 3
1 10
1 11
0 6
1 4
0 19
0 27
1 13
1 9
1 12
1 14
0 5
0 25
0 11
0 17
1 16
0 4
0 11
1 18
0 20
1 19
1 21
1 15
0 13
0 18
0 7
0 33
0 45
1 25
1 23
0 1
1 27
0 5
0 2
0 18
0 5
1 28
1 22
0 14
0 1
1 32
1 20
1 17
1 26
0 6
1 34
1 31
1 33
0 41...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #176:

score: 18
Accepted
time: 33ms
memory: 3812kb

input:

3
50000
0 6
0 9
0 8
1 3
0 1
1 4
0 8
0 3
0 3
0 6
0 6
1 9
1 7
0 6
1 10
1 6
1 2
1 1
0 5
0 7
0 6
1 13
1 11
0 5
0 8
0 8
0 6
1 15
0 5
0 7
1 18
0 5
1 16
0 7
0 8
1 22
0 1
1 23
1 21
0 2
0 1
1 25
0 1
1 26
1 12
0 5
0 2
1 28
0 8
1 27
1 29
0 6
0 1
0 2
0 5
1 31
0 6
1 33
1 30
0 1
1 35
0 9
0 6
0 4
1 38
1 37
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #177:

score: 18
Accepted
time: 22ms
memory: 3740kb

input:

3
50000
0 6
0 4
0 68
0 34
1 3
1 4
0 12
0 30
1 5
0 16
0 23
0 4
1 2
0 21
0 22
0 3
0 19
0 5
1 10
1 13
1 14
0 43
1 15
1 11
1 8
1 6
0 14
0 5
0 14
0 10
0 13
0 43
1 16
1 17
0 6
0 4
1 21
1 23
0 5
1 24
1 20
0 34
1 25
1 22
0 1
0 12
0 25
0 13
1 29
1 26
1 18
0 19
1 30
0 20
1 31
0 1
1 32
1 19
1 12
1 1
0 18
0 8
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #178:

score: 18
Accepted
time: 22ms
memory: 3724kb

input:

3
50000
0 9
0 12
0 37
0 1
1 4
0 34
1 2
0 25
0 9
0 13
1 6
1 8
1 3
1 5
0 45
1 9
0 6
1 10
0 8
0 5
0 5
1 11
1 12
1 7
0 8
1 14
0 27
0 7
0 16
1 17
0 4
1 15
1 16
0 19
0 19
0 3
0 8
1 19
1 22
1 20
1 1
0 5
1 23
1 18
0 2
0 13
1 25
1 24
0 15
1 26
0 15
0 2
1 27
1 28
0 27
1 29
0 8
1 30
0 6
1 31
0 53
1 32
0 5
0 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #179:

score: 18
Accepted
time: 31ms
memory: 3816kb

input:

3
50000
0 14
0 48
0 30
0 3
0 16
1 5
1 3
0 22
0 21
1 7
0 7
1 8
1 4
0 2
1 9
1 1
0 26
0 5
1 11
1 2
0 2
1 6
0 9
1 13
0 2
0 1
0 8
0 4
1 16
1 15
0 35
1 18
0 4
1 19
1 17
1 14
0 1
1 20
0 23
1 21
0 18
0 45
1 22
1 23
0 33
1 24
0 3
1 25
0 4
1 26
0 4
0 14
0 18
0 5
1 28
0 5
0 18
0 19
0 8
1 31
0 17
0 12
0 7
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #180:

score: 18
Accepted
time: 22ms
memory: 3740kb

input:

3
50000
0 1
0 6
0 3
0 2
1 1
1 2
0 2
1 3
0 1
1 6
0 2
1 7
0 9
0 3
0 4
1 9
1 8
0 7
0 6
0 3
0 5
1 13
1 14
1 11
0 10
1 15
1 10
0 2
0 6
1 17
0 9
0 1
1 18
0 9
0 1
0 22
1 20
0 5
0 14
1 21
1 23
0 11
0 2
1 22
0 2
0 7
0 1
1 28
0 14
1 27
1 24
0 2
0 6
0 4
0 29
1 33
1 31
1 32
0 32
1 35
0 4
1 36
0 10
1 37
1 26
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #181:

score: 18
Accepted
time: 31ms
memory: 3720kb

input:

3
50000
0 2
0 18
0 2
1 1
0 6
1 2
0 33
0 1
0 8
1 7
1 3
0 5
0 10
0 1
1 9
0 7
1 11
0 4
0 2
0 8
1 12
0 5
1 14
1 13
1 15
1 8
1 4
1 10
0 2
0 11
1 17
0 3
1 18
1 16
0 4
1 19
0 1
1 20
0 4
0 7
1 21
0 15
1 23
0 8
1 22
1 5
0 2
0 20
1 26
1 25
0 6
1 27
0 2
1 28
0 20
1 29
0 9
0 1
0 2
1 30
1 31
1 32
0 3
1 33
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #182:

score: 18
Accepted
time: 31ms
memory: 3772kb

input:

3
50000
0 1
0 48
0 11
0 1
1 4
1 3
0 10
1 2
0 3
0 5
1 6
1 1
0 1
1 8
0 5
0 39
1 9
1 10
0 24
1 11
0 1
1 12
0 24
1 5
0 19
1 14
0 8
0 2
1 16
1 15
0 23
0 50
0 18
0 5
0 1
1 21
1 18
0 16
0 19
1 19
0 22
0 6
0 27
1 26
0 22
1 25
1 17
0 5
0 7
1 24
1 22
0 18
0 9
1 30
1 31
0 2
1 32
1 23
1 27
0 31
1 33
1 28
0 5
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #183:

score: 18
Accepted
time: 22ms
memory: 3788kb

input:

3
50000
0 4
0 6
0 10
0 3
1 1
0 7
0 4
1 3
0 35
1 7
0 17
1 8
1 2
0 28
1 6
0 15
1 10
0 25
0 2
1 11
1 9
0 27
0 31
1 14
0 3
0 5
1 15
1 16
1 13
1 4
0 56
1 17
0 2
0 3
0 28
0 3
0 9
0 13
0 17
1 18
0 18
0 14
1 26
1 22
0 30
1 25
0 2
0 13
0 11
1 29
0 10
1 31
1 30
1 24
1 28
1 19
0 37
1 32
1 20
0 44
1 33
1 23
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #184:

score: 18
Accepted
time: 25ms
memory: 3700kb

input:

3
50000
0 496
0 488
0 494
1 1
0 497
1 2
0 499
1 5
0 481
0 484
1 6
0 453
0 494
1 8
0 490
0 470
1 10
1 11
0 495
0 478
0 487
0 490
1 15
0 495
1 16
0 496
0 496
0 489
0 499
0 493
1 19
0 486
0 495
0 499
0 494
0 494
1 25
1 23
0 486
0 493
0 442
1 29
1 17
0 500
1 21
0 500
0 489
0 481
1 28
0 489
1 26
0 497
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #185:

score: 18
Accepted
time: 32ms
memory: 3772kb

input:

3
50000
0 493
0 500
0 495
1 2
0 494
0 493
1 5
0 494
1 6
1 1
0 500
0 473
0 491
0 492
1 8
0 482
1 9
0 453
0 491
0 500
0 479
0 499
1 14
1 15
0 492
1 17
1 12
1 7
1 16
0 494
1 18
1 10
1 3
0 481
0 496
0 484
0 498
0 475
0 450
0 485
0 491
1 22
0 489
0 500
0 488
0 497
0 500
1 29
0 488
0 483
0 490
0 500
0 488...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 493
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #186:

score: 18
Accepted
time: 22ms
memory: 3812kb

input:

3
50000
0 497
0 499
0 499
1 3
0 497
0 500
0 496
0 500
1 4
1 1
1 2
0 494
0 497
0 495
0 500
1 9
1 11
1 10
0 500
1 12
1 8
1 7
0 497
0 500
0 499
0 496
0 495
0 500
1 18
1 14
0 500
0 500
1 20
1 16
1 15
1 5
0 498
1 21
0 500
1 22
1 19
0 496
1 23
0 489
1 24
0 493
1 25
1 6
0 500
0 494
0 489
1 27
1 26
1 28
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 497
0 -1
1 499
0 -1
1 497
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #187:

score: 18
Accepted
time: 26ms
memory: 3700kb

input:

3
50000
0 3
0 2
0 9
1 1
0 8
1 2
0 1
0 5
0 4
0 2
1 6
0 1
1 7
1 9
1 5
1 8
0 8
0 9
0 8
1 11
1 10
0 5
1 13
1 12
0 7
0 4
1 15
0 9
0 6
0 2
1 16
1 18
0 4
0 6
0 8
0 4
1 19
0 1
0 4
1 23
0 2
1 24
1 21
0 2
1 26
1 20
1 17
1 22
1 25
0 2
1 27
1 4
0 5
1 28
0 6
1 29
0 9
1 30
0 9
0 1
0 7
0 8
1 32
0 3
0 3
1 35
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
1 8
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #188:

score: 18
Accepted
time: 20ms
memory: 3704kb

input:

3
50000
0 500
0 500
0 499
1 2
0 498
0 499
0 499
1 6
0 500
0 496
0 499
0 494
1 10
1 3
0 497
0 497
0 495
1 12
1 5
0 496
1 9
1 13
1 1
1 4
0 500
0 498
0 493
0 495
1 18
0 496
1 16
1 19
1 14
1 8
0 499
1 20
1 7
0 492
0 497
1 22
0 499
1 21
1 23
0 500
0 500
0 500
1 24
0 496
0 498
0 499
0 500
0 486
0 499
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
1 500
1 500
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
...

result:

ok both questions correct

Test #189:

score: 18
Accepted
time: 26ms
memory: 3744kb

input:

3
50000
0 500
0 499
0 500
1 2
0 498
1 3
0 500
0 500
1 4
0 500
0 500
0 498
0 498
1 7
1 9
0 491
1 11
1 10
1 1
0 500
0 490
0 495
0 499
1 15
1 14
1 12
0 500
1 16
1 5
0 496
0 500
0 495
0 496
1 18
1 19
1 20
1 17
1 13
0 499
0 499
1 21
0 498
0 499
0 497
1 25
0 499
1 24
1 22
1 23
1 8
0 500
0 500
1 27
0 499
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1...

result:

ok both questions correct

Test #190:

score: 18
Accepted
time: 26ms
memory: 3704kb

input:

3
50000
0 500
0 497
0 500
0 500
1 1
0 499
1 2
0 500
1 6
1 4
0 498
0 499
0 492
1 7
1 9
1 8
0 497
0 497
1 10
0 499
1 12
1 11
0 500
0 500
0 497
1 13
0 500
1 16
0 500
1 17
1 15
1 14
0 500
1 18
0 500
1 19
0 499
0 500
1 20
1 21
0 500
0 500
0 498
0 499
0 497
0 499
0 498
0 497
0 497
1 29
0 500
1 30
0 497
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
0 -1
1 500
1 500
...

result:

ok both questions correct

Test #191:

score: 18
Accepted
time: 23ms
memory: 3788kb

input:

3
50000
0 2
0 1
0 1
0 1
1 3
1 1
0 4
0 1
0 1
1 5
0 2
1 2
1 7
1 4
0 2
0 2
1 9
1 10
0 2
1 11
0 1
1 12
0 1
1 13
0 4
0 2
1 14
1 8
0 4
0 6
1 16
0 4
1 17
1 18
0 1
1 19
0 1
1 20
0 1
1 21
0 1
0 1
1 23
1 22
0 1
0 2
0 4
1 24
1 25
1 26
0 1
0 1
0 1
1 29
0 1
0 4
0 3
1 31
1 32
1 28
0 1
0 2
1 33
0 1
0 2
1 36
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 ...

result:

ok both questions correct

Test #192:

score: 18
Accepted
time: 24ms
memory: 3780kb

input:

3
50000
0 2
0 2
0 1
0 2
1 1
1 2
0 2
0 1
0 1
1 6
1 7
1 4
0 1
1 5
0 1
0 1
1 10
0 6
1 11
1 8
0 1
0 1
1 13
0 1
1 12
0 2
0 5
0 1
1 17
0 1
1 18
1 15
0 4
0 3
1 19
0 5
0 2
1 20
0 7
0 2
1 21
1 24
1 23
1 22
1 9
1 14
0 1
1 25
0 1
1 26
0 2
0 2
1 27
0 4
0 2
1 30
0 1
1 31
0 1
1 29
0 2
0 1
1 33
0 2
1 35
0 1
1 36
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #193:

score: 18
Accepted
time: 38ms
memory: 4944kb

input:

3
50000
0 49999
0 49999
0 799
0 2127
0 14760
0 6976
0 17347
0 6179
0 1624
0 49999
0 3073
0 49999
0 19709
0 576
0 49999
0 15593
0 21710
0 14767
0 23349
0 9833
0 1984
0 49999
0 8258
0 6246
0 49999
0 49999
0 18681
0 49999
0 9742
0 49999
0 49999
0 12955
0 49999
0 6443
0 49999
0 49999
0 5410
0 21429
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #194:

score: 18
Accepted
time: 29ms
memory: 4012kb

input:

3
50000
0 23879
1 1
0 15105
1 2
0 35221
1 3
0 48114
1 4
0 26978
1 5
0 48216
1 6
0 22637
1 7
0 19339
1 8
0 36016
1 9
0 43771
1 10
0 3568
1 11
0 42361
1 12
0 16390
1 13
0 45304
1 14
0 33407
1 15
0 40884
1 16
0 34015
1 17
0 40625
1 18
0 6827
1 19
0 36151
1 20
0 38231
1 21
0 48190
1 22
0 1854
1 23
0 329...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 23879
0 -1
1 15105
0 -1
1 35221
0 -1
1 48114
0 -1
1 26978
0 -1
1 48216
0 -1
1 22637
0 -1
1 19339
0 -1
1 36016
0 -1
1 43771
0 -1
1 3568
0 -1
1 42361
0 -1
1 16390
0 -1
1 45304
0 -1
1 33407
0 -1
1 40884
0 -1
1 34015
0 -1
1 40625
0 ...

result:

ok both questions correct

Test #195:

score: 18
Accepted
time: 36ms
memory: 4316kb

input:

3
50000
0 49999
0 49999
0 17184
0 2975
0 49999
0 3851
0 49999
0 49999
0 18774
0 21659
0 23661
0 8205
1 1
0 16557
1 12
0 9314
0 1337
0 49999
0 6457
0 49999
0 49999
0 49999
0 49999
0 8690
0 49999
1 16
0 6169
0 49999
1 21
1 23
0 49999
0 49999
0 49999
0 49999
0 5637
1 28
0 2085
0 49999
1 22
0 49999
0 75...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 49999
1 49999
1 49999
0 -1
1 49999
0 -1
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #196:

score: 18
Accepted
time: 20ms
memory: 3724kb

input:

3
50000
0 3
0 4
0 4
1 3
0 1
1 4
0 4
0 4
1 5
1 6
0 3
0 4
0 3
0 4
1 8
1 7
0 4
0 2
1 11
1 10
1 12
0 1
1 13
1 2
0 4
1 14
0 1
0 1
0 1
1 17
0 4
1 18
1 1
1 9
0 4
1 19
0 4
1 20
0 4
1 21
0 4
0 4
0 4
0 2
0 1
0 1
1 22
0 4
1 28
1 27
0 3
1 29
0 4
0 4
0 2
0 4
0 3
1 32
0 2
1 30
1 34
0 1
1 35
1 36
1 31
0 4
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #197:

score: 18
Accepted
time: 12ms
memory: 3644kb

input:

3
50000
0 3
0 2
0 4
1 2
0 4
0 4
1 4
0 2
0 3
0 2
0 4
0 1
1 7
0 4
0 3
1 11
0 4
1 13
1 12
0 1
1 8
1 14
0 4
0 1
0 4
0 4
0 3
1 19
0 4
1 16
1 18
1 17
0 4
1 21
0 3
1 22
0 4
1 23
1 1
0 4
0 3
1 24
0 1
0 1
0 1
1 27
0 2
1 29
1 25
1 15
1 28
0 2
1 30
1 26
1 20
0 4
0 4
1 32
0 1
0 3
1 31
0 2
0 4
0 1
1 36
1 37
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0...

result:

ok both questions correct

Test #198:

score: 18
Accepted
time: 30ms
memory: 3768kb

input:

3
50000
0 7
0 6
0 1
0 8
1 1
0 9
0 7
0 9
0 6
0 7
0 3
1 5
0 8
1 2
0 2
0 6
1 13
0 1
0 9
1 10
1 12
1 15
1 9
0 9
1 16
1 4
0 2
1 17
0 5
1 6
0 2
0 1
0 4
0 3
1 20
0 9
0 7
0 4
0 7
0 7
0 7
0 3
0 9
1 24
1 19
1 23
0 4
1 28
0 7
0 1
1 29
0 5
0 4
0 3
0 2
0 8
1 37
0 1
1 35
1 39
0 3
1 40
0 2
0 8
1 25
0 6
1 42
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #199:

score: 18
Accepted
time: 24ms
memory: 3700kb

input:

3
50000
0 7
0 8
0 8
0 6
0 3
1 1
1 3
1 2
0 4
1 6
0 7
0 7
1 8
1 7
0 3
1 9
0 8
1 10
0 3
0 8
1 11
0 3
1 5
1 13
0 7
0 3
0 3
0 5
1 16
1 15
1 17
0 2
1 18
1 14
0 1
1 19
0 5
0 6
1 21
1 20
0 4
0 1
1 22
0 3
1 24
1 23
0 4
0 6
0 3
0 3
1 25
1 28
1 27
0 1
1 29
0 6
1 30
0 8
1 31
0 5
1 32
1 26
0 3
0 2
0 7
0 7
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #200:

score: 18
Accepted
time: 28ms
memory: 3788kb

input:

3
50000
0 3
0 6
0 4
0 6
0 4
0 8
1 4
0 2
1 2
1 7
0 5
0 4
0 1
1 8
0 8
0 2
1 5
1 12
0 7
1 13
0 4
0 8
0 2
1 14
1 16
1 9
1 11
1 10
1 3
1 15
0 4
0 3
0 5
0 3
0 3
1 21
0 8
0 4
0 3
0 6
0 2
1 26
0 2
1 27
1 24
1 23
1 25
1 22
0 8
0 7
0 3
1 28
1 30
1 29
1 19
1 20
1 18
1 17
0 7
0 3
1 31
1 32
0 3
0 7
0 6
1 35
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #201:

score: 18
Accepted
time: 28ms
memory: 3652kb

input:

3
50000
0 15
0 32
0 13
1 1
0 13
1 4
0 11
1 2
0 10
1 6
0 20
0 3
0 5
0 1
0 11
1 10
0 12
0 23
1 12
1 9
0 13
0 31
0 18
0 20
1 16
1 14
0 3
1 3
0 8
1 18
1 7
0 1
1 20
1 5
0 2
1 21
0 3
1 15
0 25
0 26
0 23
0 28
1 24
1 22
0 9
1 27
0 5
0 24
0 15
1 11
1 23
1 17
1 30
0 9
1 31
0 7
1 32
1 19
0 2
1 33
1 25
0 30
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #202:

score: 18
Accepted
time: 24ms
memory: 3704kb

input:

3
50000
0 27
0 5
0 1
1 2
0 13
0 10
0 22
1 4
1 3
1 5
0 3
1 7
0 19
0 18
1 8
1 9
0 19
0 9
0 25
1 12
0 9
0 8
1 14
0 2
0 31
0 11
0 28
0 6
0 6
1 19
1 15
1 11
0 31
1 18
1 16
0 6
1 17
1 21
0 16
0 14
0 18
0 28
0 12
1 25
1 27
1 23
1 24
0 6
1 28
0 7
0 14
0 11
0 15
1 30
1 31
1 1
0 30
1 33
1 10
1 13
1 6
0 32
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #203:

score: 18
Accepted
time: 24ms
memory: 3816kb

input:

3
50000
0 4
0 3
0 1
0 2
0 1
1 1
1 2
0 3
1 6
1 5
0 1
1 7
0 2
1 3
0 3
1 4
0 1
0 2
0 3
0 1
0 2
1 11
1 14
1 12
1 13
0 2
1 15
1 10
0 3
0 3
0 1
1 18
0 1
1 16
0 2
1 20
0 3
0 3
0 1
0 4
0 2
1 23
1 25
1 21
1 24
1 22
0 2
0 3
0 3
1 26
1 28
1 27
0 4
1 19
1 9
1 29
0 3
0 4
1 31
1 30
0 1
0 4
0 3
0 1
1 32
1 34
1 33
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3...

result:

ok both questions correct

Test #204:

score: 18
Accepted
time: 23ms
memory: 3808kb

input:

3
50000
0 4
0 4
0 1
1 2
0 4
0 4
1 1
0 1
1 6
1 4
0 1
0 3
1 8
1 7
0 1
1 3
0 1
1 10
0 4
0 3
1 11
0 4
1 5
1 13
0 4
1 14
0 4
0 4
1 15
1 16
0 3
1 17
0 1
0 1
1 18
1 19
0 4
1 20
0 1
0 2
1 21
0 4
0 1
1 23
0 1
0 1
0 3
0 2
1 27
1 26
0 3
0 3
1 28
1 25
0 4
1 31
1 22
0 2
0 3
0 4
0 1
1 35
0 4
0 3
0 2
1 36
0 2
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0...

result:

ok both questions correct

Test #205:

score: 18
Accepted
time: 28ms
memory: 3816kb

input:

3
50000
0 6
0 6
0 2
1 3
0 6
1 1
0 3
0 1
0 5
1 4
0 5
0 8
0 1
1 10
0 7
1 8
0 7
0 8
0 8
1 13
1 14
1 9
0 2
1 11
1 12
1 15
0 7
1 16
0 7
0 6
0 8
0 3
0 2
0 6
1 18
0 5
1 21
1 20
0 6
0 2
1 17
1 19
1 24
0 4
1 26
0 8
0 5
1 28
1 27
0 7
0 8
0 8
0 1
0 6
1 30
1 32
1 31
1 33
0 1
1 34
0 4
1 35
1 7
1 29
0 4
0 1
0 3
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #206:

score: 18
Accepted
time: 26ms
memory: 3720kb

input:

3
50000
0 2
0 3
0 6
0 2
0 5
0 3
0 1
0 4
1 6
1 2
1 7
1 5
1 8
1 1
0 8
1 9
0 7
0 7
1 10
1 4
0 5
1 12
0 4
0 3
0 1
1 14
1 13
1 11
0 6
1 15
0 7
1 17
0 4
0 8
1 18
1 19
0 4
1 20
0 7
1 21
0 2
0 6
0 6
0 1
0 5
1 25
1 24
1 23
1 26
0 6
1 27
0 2
1 28
0 1
1 29
1 22
0 6
1 30
0 5
0 6
0 3
0 5
0 3
0 1
1 36
1 33
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 ...

result:

ok both questions correct

Test #207:

score: 18
Accepted
time: 28ms
memory: 3728kb

input:

3
50000
0 14
0 13
0 7
1 2
0 5
0 23
0 27
1 1
0 5
1 7
1 4
1 5
0 4
1 8
0 7
0 20
1 10
0 24
1 3
1 9
0 32
0 23
0 2
1 12
0 25
0 14
0 31
0 8
1 16
0 22
0 21
0 11
1 21
1 13
0 14
1 22
1 17
1 18
0 7
0 3
1 23
0 27
1 15
1 19
1 20
1 14
0 23
1 24
0 23
0 22
1 28
1 27
0 11
1 29
1 25
0 2
1 30
0 29
0 29
0 13
1 31
1 32
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #208:

score: 18
Accepted
time: 25ms
memory: 3812kb

input:

3
50000
0 26
0 19
0 27
1 2
0 5
1 4
0 21
0 6
1 3
0 30
0 14
0 17
0 6
0 17
1 9
1 8
1 11
1 10
0 11
1 12
1 5
0 18
0 21
1 13
0 29
1 15
0 3
0 28
1 16
1 14
0 18
1 18
1 6
0 2
1 19
0 28
0 5
1 20
0 7
0 15
0 3
1 22
0 22
0 19
0 26
1 27
1 24
0 13
0 32
0 4
1 30
0 24
1 26
0 10
1 32
1 21
1 23
1 28
1 7
0 29
1 33
0 12...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #209:

score: 18
Accepted
time: 30ms
memory: 3772kb

input:

3
50000
0 4
0 14
0 9
0 11
0 14
1 4
1 1
0 14
1 2
1 5
0 10
1 7
0 4
0 1
0 4
1 9
0 4
1 8
1 11
0 4
0 10
1 13
1 12
1 10
0 3
0 10
0 6
1 15
1 14
1 16
0 6
1 17
0 14
0 7
0 11
1 19
0 15
0 11
0 8
1 23
1 20
1 22
1 21
0 5
1 24
1 6
0 10
1 25
0 2
1 26
0 5
1 27
0 6
1 28
0 6
0 15
0 10
1 29
0 11
1 32
0 14
0 14
1 33
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
1 14
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 14
0 -1
0 ...

result:

ok both questions correct

Test #210:

score: 18
Accepted
time: 28ms
memory: 3696kb

input:

3
50000
0 2
0 3
0 4
0 4
1 3
0 4
0 1
0 1
1 7
1 5
0 2
1 6
0 4
1 8
0 3
0 3
0 2
1 12
1 11
0 2
1 13
1 10
1 2
0 2
0 2
1 15
1 4
0 3
1 16
0 2
1 17
1 1
0 1
1 18
0 3
1 19
0 4
1 20
0 1
1 21
0 3
0 4
0 3
1 24
1 23
0 2
0 1
1 25
1 26
0 3
1 27
1 22
0 3
1 28
0 1
0 4
1 29
0 2
0 4
0 3
0 4
0 1
1 32
1 31
0 3
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #211:

score: 18
Accepted
time: 24ms
memory: 3696kb

input:

3
50000
0 3
0 4
0 4
0 4
1 4
1 2
0 3
0 3
0 2
0 4
1 7
0 3
0 1
0 2
1 11
0 3
0 2
0 3
0 4
1 12
1 10
1 5
1 8
1 14
1 13
1 9
0 2
0 1
0 1
0 2
0 4
0 4
0 2
0 2
0 4
1 18
1 24
0 4
0 1
1 16
0 2
0 3
0 4
0 4
1 22
1 21
0 2
0 3
1 31
0 4
1 17
1 20
0 2
0 2
0 2
1 36
0 1
0 3
0 4
1 35
0 3
0 3
0 2
1 41
1 42
0 4
1 43
1 40
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #212:

score: 18
Accepted
time: 36ms
memory: 3732kb

input:

3
50000
0 15
0 13
0 7
0 1
1 2
1 1
0 11
0 6
0 2
1 7
0 3
0 12
1 8
1 5
1 6
0 15
0 10
1 10
0 3
1 12
0 8
1 13
1 11
0 14
1 14
0 6
1 15
1 3
0 3
0 9
1 16
0 11
1 18
0 7
1 19
0 9
0 7
0 8
0 3
1 22
1 23
0 7
0 4
0 1
0 13
0 13
1 26
0 12
1 29
0 14
1 24
1 21
0 13
0 6
0 13
1 32
1 30
1 20
0 8
1 34
0 3
0 12
0 6
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #213:

score: 18
Accepted
time: 31ms
memory: 3736kb

input:

3
50000
0 9
0 5
0 5
0 5
1 1
0 5
0 6
0 12
1 5
0 9
1 2
0 15
1 3
1 7
0 8
0 5
1 10
0 13
1 4
1 8
1 12
1 11
0 10
0 11
1 14
0 2
0 2
1 15
1 13
1 16
0 7
1 6
0 6
0 14
1 18
1 19
0 12
1 20
0 6
1 21
0 6
1 22
0 11
0 12
1 23
1 24
0 13
0 12
1 25
1 26
0 14
1 9
0 12
0 11
0 2
1 28
1 30
1 29
0 15
1 31
0 5
0 7
0 1
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
1 5
1 5
1 5
1 5
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Subtask #4:

score: 15
Acceptable Answer

Test #214:

score: 15
Acceptable Answer
time: 45ms
memory: 4312kb

input:

4
100000
0 3
0 3
0 3
0 4
0 2
1 4
0 2
0 2
0 3
0 2
0 1
0 2
0 3
0 1
1 7
1 5
1 12
0 2
0 2
1 1
1 10
0 2
1 14
0 3
1 17
0 2
1 8
0 1
0 1
0 4
1 20
1 11
1 6
0 1
1 9
1 21
1 19
1 18
1 22
1 3
1 15
1 16
0 1
0 2
0 2
1 23
0 2
0 2
1 26
0 4
0 4
1 29
1 25
0 4
0 1
0 3
0 2
1 31
1 32
1 24
0 4
1 34
1 27
0 4
0 2
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #215:

score: 15
Acceptable Answer
time: 44ms
memory: 4324kb

input:

4
100000
0 1
0 1
0 2
1 1
0 1
0 2
1 4
1 3
0 1
1 6
0 1
0 2
0 2
0 2
0 1
0 1
0 1
0 2
1 10
0 1
0 1
0 2
1 15
0 2
0 2
1 18
0 2
1 12
1 16
1 7
0 1
0 1
1 13
1 19
1 21
0 1
1 23
1 9
1 2
1 11
1 8
0 1
0 1
1 24
1 25
1 5
0 1
0 1
0 1
0 2
1 29
0 2
0 2
1 28
0 1
1 31
1 30
1 26
1 32
1 27
1 20
1 22
0 2
0 1
1 34
0 1
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #216:

score: 15
Acceptable Answer
time: 40ms
memory: 4332kb

input:

4
100000
0 1
0 1
0 2
1 3
0 1
1 1
0 4
1 5
0 2
1 6
0 1
0 1
0 1
0 1
1 8
1 7
1 4
1 2
0 1
0 3
1 12
0 1
0 1
1 11
0 1
1 13
0 2
0 1
1 16
0 1
1 18
1 15
1 17
1 10
0 1
0 2
0 3
1 21
0 1
1 19
0 2
1 23
1 14
1 9
0 2
1 22
0 2
1 25
0 1
1 26
0 1
0 3
1 28
1 27
0 2
1 29
0 1
1 30
0 4
1 31
0 3
0 1
0 1
0 2
1 34
0 1
1 32
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #217:

score: 15
Acceptable Answer
time: 47ms
memory: 4368kb

input:

4
100000
0 2
0 3
0 2
1 2
0 4
1 1
0 1
1 4
0 2
1 6
0 1
0 1
0 2
0 4
0 1
0 2
0 1
0 3
0 2
1 8
1 12
1 11
1 15
0 3
1 16
1 7
1 9
0 1
0 2
1 18
0 2
1 10
0 2
0 1
0 2
1 22
1 20
0 1
1 23
0 1
1 24
0 1
1 25
0 1
0 4
1 26
1 21
1 27
1 13
0 1
0 2
0 1
1 28
0 2
0 3
1 31
0 3
1 29
1 32
0 2
1 34
0 1
0 1
0 1
0 2
1 14
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #218:

score: 15
Acceptable Answer
time: 48ms
memory: 4340kb

input:

4
100000
0 6
0 4
0 1
0 7
0 7
1 1
1 4
1 2
0 4
0 7
1 7
0 3
0 4
1 8
0 2
1 9
0 2
1 11
0 1
0 5
1 6
0 3
0 4
1 15
0 1
0 4
0 5
0 5
1 17
0 3
0 5
1 21
1 16
0 3
1 22
1 19
1 13
0 3
0 4
0 3
1 24
1 25
0 2
0 3
1 27
1 23
1 26
1 3
0 1
0 3
1 28
1 29
1 10
0 3
1 20
0 4
1 31
0 2
1 32
1 5
0 2
0 2
0 4
0 3
1 36
0 2
1 37
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #219:

score: 15
Acceptable Answer
time: 53ms
memory: 4316kb

input:

4
100000
0 2
0 8
0 1
0 1
1 2
1 4
0 4
1 5
0 1
1 6
0 3
1 3
0 3
1 8
0 7
1 9
0 6
0 3
1 10
1 7
0 8
0 3
0 3
1 14
0 2
1 15
0 4
0 3
0 6
1 16
0 6
0 7
0 2
0 3
0 5
1 19
0 4
0 6
1 24
1 23
1 17
1 22
1 18
1 20
0 5
0 6
0 4
0 3
0 8
0 4
0 7
1 28
1 29
1 30
1 26
0 8
1 33
1 25
0 1
1 34
0 5
0 1
0 1
1 36
0 1
1 35
0 5
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #220:

score: 15
Acceptable Answer
time: 45ms
memory: 4320kb

input:

4
100000
0 5
0 7
0 5
1 1
0 9
0 12
0 9
0 1
1 5
0 5
1 4
1 6
0 2
1 7
1 2
0 9
0 11
1 10
0 1
1 9
0 11
0 5
1 13
0 11
1 15
0 8
1 14
0 7
0 11
1 12
1 17
0 8
1 8
0 3
0 1
0 1
1 21
1 22
1 20
0 2
1 23
1 3
1 19
1 18
0 9
0 11
1 25
0 2
0 11
1 26
0 9
0 13
0 1
0 11
0 10
1 29
0 1
1 33
1 30
1 31
0 2
0 11
1 35
0 1
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #221:

score: 15
Acceptable Answer
time: 51ms
memory: 4324kb

input:

4
100000
0 5
0 9
0 7
1 3
0 4
1 2
0 1
0 2
1 6
1 5
0 4
0 4
0 1
1 8
0 4
1 10
0 8
0 12
0 5
1 12
1 11
0 1
1 14
0 1
1 15
0 1
0 4
1 13
0 1
1 18
0 3
1 19
0 1
0 3
1 17
1 7
1 21
1 9
0 12
0 2
1 22
1 23
1 1
0 8
0 3
1 24
0 12
1 26
0 3
0 2
0 3
1 27
0 3
1 30
0 4
1 28
0 7
0 1
0 9
1 33
1 34
1 32
1 29
0 1
1 4
0 1
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #222:

score: 15
Acceptable Answer
time: 37ms
memory: 4340kb

input:

4
100000
0 8
0 11
0 2
1 2
0 20
0 11
0 15
1 3
1 1
0 9
1 4
1 7
0 18
0 11
1 9
0 16
1 8
0 8
0 3
1 12
0 5
0 6
1 14
0 8
0 20
0 6
0 10
1 16
1 15
0 6
0 2
0 1
1 21
1 17
1 10
0 9
1 22
1 19
1 18
1 5
0 9
1 23
0 14
0 4
1 25
0 7
0 6
0 9
0 18
0 8
1 26
1 28
0 11
0 8
1 32
0 3
1 27
0 19
1 34
0 5
0 16
0 16
0 3
1 36
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #223:

score: 15
Acceptable Answer
time: 61ms
memory: 4316kb

input:

4
100000
0 13
0 13
0 25
1 2
0 10
1 4
0 9
0 15
0 5
1 7
0 10
1 6
1 8
0 13
0 15
1 10
1 9
1 5
0 1
1 11
0 3
0 10
0 22
1 14
1 13
1 1
0 18
1 15
0 16
1 16
0 12
0 24
0 6
1 17
1 18
0 6
1 20
1 19
0 14
1 21
0 25
1 22
0 29
0 11
1 23
1 24
0 9
0 8
0 7
1 25
0 3
1 28
0 9
0 5
1 30
1 27
1 26
1 29
0 23
0 3
0 10
0 4
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
1 13
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #224:

score: 15
Acceptable Answer
time: 45ms
memory: 4300kb

input:

4
100000
0 3
0 2
0 3
0 3
1 1
0 2
0 3
1 5
0 3
0 4
0 4
1 7
1 8
1 2
0 4
0 4
1 11
1 10
0 4
0 4
0 3
1 14
0 3
1 15
1 12
0 4
0 4
1 13
0 4
0 4
1 19
0 2
0 3
1 20
1 21
1 18
0 3
0 4
0 3
0 4
0 4
1 22
1 23
1 24
1 26
0 2
0 4
1 28
1 25
1 17
0 4
1 29
1 6
0 4
1 30
1 3
0 4
0 3
0 4
1 32
0 4
0 4
0 4
1 35
0 3
0 3
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #225:

score: 15
Acceptable Answer
time: 50ms
memory: 4412kb

input:

4
100000
0 3
0 1
0 3
0 4
1 3
1 2
0 1
1 5
0 4
0 4
0 3
1 6
0 4
1 9
0 2
0 2
0 2
0 3
0 2
1 14
0 1
0 4
1 16
0 2
0 1
1 17
0 4
1 15
0 4
0 1
0 2
0 1
0 2
0 2
1 11
1 20
0 3
1 26
1 25
1 24
1 21
0 4
0 2
0 3
0 2
1 27
0 3
0 2
1 30
1 29
0 2
1 33
0 1
1 34
1 32
1 28
0 2
0 3
1 36
1 35
1 13
0 2
0 2
1 37
1 19
1 12
1 18...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #226:

score: 15
Acceptable Answer
time: 43ms
memory: 4328kb

input:

4
100000
0 4
0 4
0 2
0 2
1 2
0 4
1 1
0 4
0 4
0 3
0 4
1 5
0 1
0 4
1 11
1 10
0 3
1 4
1 6
1 3
0 3
0 3
0 4
0 3
1 14
1 13
1 16
0 3
1 17
0 3
1 18
0 3
0 3
1 19
0 4
0 3
1 21
1 22
1 9
1 12
0 4
0 2
1 24
0 3
1 23
1 20
0 2
0 4
0 3
1 26
0 4
1 29
1 27
1 28
1 8
0 4
0 4
0 4
0 4
0 4
1 32
0 3
0 4
0 4
0 2
0 3
1 34
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
1 4
1 4
0 -1
1 2
0 -1
1 2
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #227:

score: 15
Acceptable Answer
time: 44ms
memory: 4308kb

input:

4
100000
0 8
0 5
0 7
0 9
0 6
1 4
0 5
0 5
1 7
1 1
1 2
1 5
0 8
1 8
0 9
0 6
0 8
0 7
1 12
0 8
0 8
1 14
0 2
1 15
1 13
1 10
1 6
0 6
0 9
1 3
0 4
1 18
1 16
0 9
0 8
0 9
1 19
1 9
1 20
0 9
0 9
0 6
1 24
0 9
1 25
0 9
1 26
1 21
0 7
1 17
1 23
0 7
1 28
0 7
0 9
0 4
1 31
1 30
0 6
0 9
1 32
1 29
1 33
1 27
0 8
0 9
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #228:

score: 15
Acceptable Answer
time: 50ms
memory: 4364kb

input:

4
100000
0 5
0 8
0 9
1 3
0 9
0 9
1 4
0 8
0 7
1 5
1 6
0 5
0 6
1 9
1 8
0 5
1 1
0 9
0 8
1 12
1 10
0 9
0 6
0 7
1 15
1 13
0 8
0 6
0 8
0 7
0 7
0 9
1 20
1 18
1 21
0 6
1 17
0 9
1 14
0 9
0 4
0 9
1 26
1 25
1 2
1 22
0 9
1 27
0 9
1 11
0 7
0 5
0 9
1 29
0 9
1 31
0 8
1 30
0 9
1 34
0 7
0 8
1 36
1 7
1 35
0 6
1 37
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #229:

score: 15
Acceptable Answer
time: 51ms
memory: 4324kb

input:

4
100000
0 13
0 9
0 12
1 2
0 9
1 4
0 3
0 13
1 5
1 6
0 9
0 8
1 7
0 12
1 8
0 9
0 13
1 11
0 15
0 14
1 10
0 15
1 12
0 6
1 14
0 14
1 9
1 13
0 14
0 11
0 15
0 12
1 17
1 18
1 20
0 4
1 21
0 15
0 15
1 23
1 22
0 14
0 15
0 15
1 26
0 6
1 27
0 12
0 13
1 28
0 8
0 13
0 15
1 32
0 11
1 24
1 25
0 12
0 13
1 34
1 35
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #230:

score: 15
Acceptable Answer
time: 47ms
memory: 4372kb

input:

4
100000
0 12
0 13
0 8
0 10
1 3
0 14
1 5
0 14
1 4
0 13
0 6
0 15
0 14
1 2
0 14
1 10
1 6
0 14
1 12
1 1
0 15
0 13
0 14
1 13
0 9
1 16
0 14
0 6
1 18
1 15
0 15
1 19
1 9
1 17
0 6
0 11
1 21
1 20
1 11
1 8
0 15
0 13
0 14
0 5
1 25
1 24
1 23
0 14
0 14
1 27
0 14
0 15
0 10
0 15
1 30
0 13
0 11
1 33
0 13
0 13
0 15
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
1 13
1 13
1 13
1 13
0 -1
1 13
1 13
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #231:

score: 15
Acceptable Answer
time: 53ms
memory: 4296kb

input:

4
100000
0 22
0 30
0 30
1 3
0 25
1 1
0 21
1 4
0 26
0 29
0 23
0 20
0 15
0 29
0 12
1 11
0 27
0 14
1 8
0 25
0 18
0 26
0 17
1 15
1 17
0 20
0 25
0 21
0 15
0 15
1 20
1 23
0 29
0 26
1 6
1 14
1 10
1 21
0 30
0 9
1 27
0 28
1 9
1 24
0 18
0 23
1 29
1 30
1 13
1 7
0 29
0 28
1 19
1 31
0 20
0 23
1 34
1 33
1 18
1 12...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 22
0 -1
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #232:

score: 15
Acceptable Answer
time: 58ms
memory: 4308kb

input:

4
100000
0 28
0 26
0 22
0 22
0 29
0 25
0 17
1 7
1 1
0 29
0 29
1 9
0 23
1 2
1 8
0 12
0 25
1 12
1 10
0 23
1 13
1 4
1 5
1 6
0 28
0 26
1 15
1 14
0 12
1 16
0 23
0 27
1 17
0 23
1 18
1 3
0 28
0 30
0 26
1 20
0 26
1 23
0 29
0 22
1 24
1 25
0 27
1 26
1 21
0 23
1 27
1 22
0 14
0 21
1 28
0 28
0 28
1 30
0 23
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #233:

score: 15
Acceptable Answer
time: 56ms
memory: 4320kb

input:

4
100000
0 31
0 35
0 29
0 20
1 4
1 2
0 49
1 3
0 48
1 6
0 48
1 1
0 35
1 5
0 45
1 9
0 44
0 48
1 11
1 7
0 43
1 12
0 28
0 43
1 13
1 14
0 39
0 28
1 15
0 37
0 25
1 17
0 8
0 46
1 18
0 40
1 21
0 35
1 22
0 36
0 43
0 48
1 25
1 23
0 47
0 32
0 43
0 40
0 40
0 43
1 27
0 42
1 26
0 43
1 24
0 33
1 28
0 38
0 45
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #234:

score: 15
Acceptable Answer
time: 59ms
memory: 4340kb

input:

4
100000
0 43
0 42
0 40
1 1
0 41
0 43
0 48
0 46
0 38
1 5
0 27
1 8
1 7
0 23
1 10
1 4
1 9
1 3
0 25
0 42
0 50
1 12
0 39
0 50
0 38
1 15
0 28
0 46
0 50
0 16
0 42
1 17
0 45
1 18
0 31
1 21
0 43
1 16
0 41
1 25
0 11
1 20
1 22
0 41
1 27
1 24
1 23
0 29
1 28
0 37
0 36
1 13
1 30
0 47
0 46
0 42
0 23
1 34
1 33
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 43
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #235:

score: 15
Acceptable Answer
time: 46ms
memory: 4348kb

input:

4
100000
0 9
0 7
0 10
1 1
0 10
1 3
0 7
1 5
0 9
1 6
0 10
0 9
0 10
1 8
1 7
0 5
1 9
1 10
0 9
1 11
0 4
0 10
0 7
0 10
0 7
0 10
0 10
1 12
1 18
0 7
1 19
1 13
1 17
1 14
1 15
0 4
1 16
1 20
0 9
0 9
0 10
0 9
0 10
0 8
0 9
0 10
0 8
1 24
0 10
0 8
0 8
1 22
0 6
0 10
0 7
0 9
1 35
1 36
1 25
0 8
1 28
0 10
1 29
0 10
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
1 10
0 -1
1 7
0 -1
0 -1
0 -1
1 10
0 -1
1 10
1 10
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 10
1 10
1 10
0 -1
1 10
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #236:

score: 15
Acceptable Answer
time: 52ms
memory: 4424kb

input:

4
100000
0 3
0 2
0 3
0 3
1 3
0 1
1 2
1 4
0 4
0 2
1 7
1 6
0 1
1 8
0 2
1 1
0 3
1 10
0 1
0 4
1 12
1 11
0 2
0 4
0 1
1 15
0 4
1 16
1 5
0 4
1 17
1 14
0 4
0 2
1 19
1 18
0 1
0 2
0 1
1 20
0 3
1 22
1 21
1 23
0 2
1 13
0 2
0 4
0 3
0 1
1 27
1 26
1 28
0 1
1 29
1 25
0 3
1 30
0 4
0 2
0 4
0 2
1 31
1 33
1 34
1 32
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #237:

score: 15
Acceptable Answer
time: 53ms
memory: 4372kb

input:

4
100000
0 8
0 17
0 16
1 1
0 16
1 4
0 9
1 2
0 17
0 14
0 17
1 7
1 5
0 17
0 17
0 14
0 14
1 11
1 12
0 15
1 10
1 8
1 6
1 9
0 15
1 14
0 16
0 7
0 18
0 17
0 11
0 8
0 15
0 18
0 5
1 17
0 18
1 22
1 19
0 15
1 25
1 18
1 23
1 20
1 16
0 17
0 12
0 16
0 17
0 8
0 10
0 15
1 29
0 8
0 15
1 34
1 32
0 18
1 26
0 13
0 15
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
0 -1
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
0 -1
0 -1
0 -1
1 15
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #238:

score: 15
Acceptable Answer
time: 48ms
memory: 4332kb

input:

4
100000
0 38
0 40
0 38
0 34
0 35
0 39
0 40
0 39
1 7
0 40
1 2
1 5
0 38
1 10
0 39
1 6
1 3
1 8
0 38
1 9
1 4
0 39
0 40
1 14
0 38
0 40
1 15
1 13
1 11
1 1
0 30
1 17
0 30
1 18
0 34
0 40
1 19
1 20
0 40
1 21
0 39
1 12
0 39
0 37
1 23
0 40
1 25
1 24
0 39
0 38
0 38
0 39
1 29
0 40
0 39
0 40
0 40
1 31
0 39
0 40
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 38
0 -1
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 40
0 -1
1 40
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #239:

score: 15
Acceptable Answer
time: 58ms
memory: 4416kb

input:

4
100000
0 103
0 103
0 106
0 110
0 109
1 5
1 3
0 109
1 6
0 110
0 105
1 2
0 101
0 98
0 107
0 104
0 102
1 11
1 9
0 105
1 14
1 13
1 4
0 101
1 15
0 99
1 16
0 107
1 10
0 110
1 18
0 108
0 104
0 108
0 103
1 20
0 110
0 92
0 104
1 24
0 109
1 25
0 108
0 105
1 28
1 17
1 23
0 110
1 29
1 7
1 1
1 21
1 8
0 107
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 103
1 103
1 103
0 -1
0 -1
0 -1
1 103
0 -1
1 103
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #240:

score: 15
Acceptable Answer
time: 53ms
memory: 4328kb

input:

4
100000
0 29
0 29
0 28
1 1
0 30
1 2
0 28
0 30
1 3
1 5
0 30
1 7
0 30
1 8
0 29
0 28
0 30
1 10
1 11
0 28
0 28
1 4
1 13
0 26
0 28
1 15
1 12
1 6
0 28
0 30
1 14
1 16
0 29
1 18
0 30
1 17
0 30
0 30
0 30
1 21
1 20
0 30
0 30
0 30
1 25
0 30
1 24
1 26
0 29
0 29
0 30
1 28
0 28
0 29
1 31
0 26
1 32
1 30
1 22
0 30...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 29
1 29
1 29
0 -1
0 -1
0 -1
1 28
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 29
0 -1
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #241:

score: 15
Acceptable Answer
time: 48ms
memory: 4364kb

input:

4
100000
0 26
0 4
0 4
0 16
1 4
0 6
0 19
0 12
0 5
1 8
0 6
1 5
0 10
0 1
1 11
1 9
1 3
1 6
0 9
0 1
0 4
1 12
0 1
0 2
1 16
0 1
1 15
0 3
1 18
1 14
1 13
1 10
1 1
1 17
0 2
0 6
0 2
0 9
0 4
0 19
0 19
1 23
1 22
1 25
1 20
1 21
1 2
0 2
0 10
1 27
1 26
0 1
1 28
1 19
0 1
0 15
1 30
0 7
0 2
1 32
1 31
1 29
0 17
0 28
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 26
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #242:

score: 15
Acceptable Answer
time: 50ms
memory: 4332kb

input:

4
100000
0 1
0 1
0 3
1 3
0 5
0 1
1 5
1 4
0 9
0 3
1 2
0 2
1 8
1 7
0 1
0 3
1 10
0 9
0 1
0 4
0 1
0 4
1 12
0 2
0 3
0 1
0 4
0 2
0 4
0 2
0 1
1 14
1 21
0 2
1 22
0 7
0 1
1 25
0 1
1 11
0 4
1 24
1 28
1 27
1 19
0 2
0 1
1 29
0 1
1 31
1 1
1 26
1 23
0 7
1 32
1 30
1 9
1 13
0 6
1 33
0 2
0 1
1 35
0 4
1 36
0 4
0 2
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #243:

score: 15
Acceptable Answer
time: 43ms
memory: 4324kb

input:

4
100000
0 2
0 3
0 8
0 11
1 2
0 4
0 4
0 1
1 6
0 1
0 1
0 16
0 4
1 11
0 3
0 3
1 13
0 7
1 10
1 9
1 12
1 5
1 8
0 6
1 7
1 15
1 4
0 3
0 2
0 4
0 5
0 2
0 5
1 19
0 1
1 18
1 22
0 9
0 1
1 23
0 1
0 2
0 1
0 1
0 1
1 29
0 2
0 1
0 4
0 5
0 5
1 25
1 26
1 27
1 32
1 30
0 1
1 28
1 17
1 33
1 35
0 1
0 1
0 1
1 36
1 31
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #244:

score: 15
Acceptable Answer
time: 47ms
memory: 4348kb

input:

4
100000
0 5
0 1
0 15
1 3
0 1
0 51
0 15
1 6
0 22
1 5
0 10
1 4
1 8
1 2
0 29
1 9
0 5
1 1
0 19
0 29
1 12
0 5
1 13
0 4
0 27
1 14
0 16
0 1
0 24
0 12
1 17
1 19
1 18
0 7
1 20
1 7
0 27
0 9
1 22
1 15
1 16
0 44
1 23
1 10
0 3
1 24
0 18
1 25
0 2
0 11
1 26
0 16
1 27
1 28
0 11
0 14
1 29
1 21
0 12
1 31
0 60
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #245:

score: 15
Acceptable Answer
time: 51ms
memory: 4336kb

input:

4
100000
0 56
0 22
0 4
0 13
0 31
0 24
0 69
1 2
1 4
1 3
0 1
1 1
1 8
0 13
0 9
1 10
0 23
1 11
0 24
1 7
1 5
1 6
0 8
0 39
1 14
1 13
0 7
1 9
0 12
0 30
1 16
0 23
0 8
1 19
1 17
0 4
1 20
0 4
1 18
1 21
0 14
1 22
0 14
0 20
1 23
1 24
0 30
0 39
0 4
0 3
1 27
0 1
0 10
0 15
0 8
0 5
0 25
1 33
1 28
1 31
0 4
1 35
1 26...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 56
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 24
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #246:

score: 15
Acceptable Answer
time: 62ms
memory: 4384kb

input:

4
100000
0 27
0 10
0 9
1 1
0 13
0 51
0 13
0 12
1 5
1 2
1 3
1 4
0 2
1 7
0 49
0 3
0 27
0 11
0 1
1 13
1 10
1 6
0 17
1 14
0 22
1 15
0 18
1 16
1 11
0 28
1 17
1 8
0 3
1 9
0 6
1 19
0 2
0 3
0 11
0 2
0 7
1 21
0 14
0 28
1 26
1 20
0 12
1 27
0 37
1 23
1 25
1 24
1 22
1 18
0 10
1 29
0 12
1 30
0 8
0 7
1 31
1 32
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #247:

score: 15
Acceptable Answer
time: 45ms
memory: 4388kb

input:

4
100000
0 1
0 6
0 5
0 1
1 3
1 2
0 2
0 6
0 9
0 7
1 6
0 7
1 7
1 9
1 8
0 7
0 2
1 11
0 6
1 10
1 5
1 12
0 3
1 1
0 5
0 1
0 8
1 14
0 7
0 7
0 7
1 18
0 4
1 20
0 2
0 9
0 3
1 22
0 6
1 24
1 17
0 1
1 25
0 3
0 4
0 5
0 2
0 8
1 30
0 4
0 6
1 32
1 31
1 26
1 27
0 3
0 8
1 33
0 9
0 1
1 34
0 3
1 37
1 29
1 16
0 3
0 3
0 8...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #248:

score: 15
Acceptable Answer
time: 56ms
memory: 4312kb

input:

4
100000
0 3
0 2
0 9
1 2
0 8
0 7
0 5
0 56
1 3
0 19
0 40
0 2
0 39
1 11
1 10
0 13
1 6
1 4
1 1
0 39
0 22
0 18
0 7
0 27
0 9
1 15
0 13
0 15
0 18
1 18
1 21
1 14
1 13
0 1
0 4
0 2
1 22
1 9
1 5
0 2
0 18
0 2
1 25
1 27
0 15
0 6
0 1
0 15
0 27
0 29
1 28
1 33
0 24
1 34
1 31
1 29
0 3
1 35
0 17
0 52
1 36
0 22
1 38
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #249:

score: 15
Acceptable Answer
time: 54ms
memory: 4324kb

input:

4
100000
0 5
0 8
0 7
1 3
0 14
0 39
1 1
1 4
0 8
1 6
0 33
0 42
0 51
1 8
1 9
0 15
1 10
1 2
0 12
0 23
1 12
1 7
0 19
1 13
0 1
0 12
1 15
0 1
0 3
1 17
1 16
0 6
1 18
0 33
0 1
0 22
1 19
1 20
0 33
0 4
1 23
1 22
0 14
0 20
0 4
1 24
0 4
0 4
1 28
0 3
0 2
0 14
0 7
1 31
1 27
0 20
1 33
0 1
0 9
1 34
0 14
0 32
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #250:

score: 15
Acceptable Answer
time: 60ms
memory: 4308kb

input:

4
100000
0 9
0 23
0 6
1 2
0 26
1 3
0 7
1 5
0 20
0 1
1 7
1 6
0 4
1 4
0 1
0 7
1 10
1 9
0 42
0 2
0 16
0 4
0 16
1 13
0 46
1 15
0 2
1 16
0 30
1 18
1 14
0 1
0 26
1 19
0 9
1 21
0 49
0 8
0 17
1 24
1 23
0 8
1 25
0 8
1 22
0 9
1 27
0 2
1 28
0 17
1 29
0 12
0 9
1 30
1 31
0 27
1 32
0 1
1 33
0 1
0 1
0 47
1 34
1 17...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #251:

score: 15
Acceptable Answer
time: 53ms
memory: 4316kb

input:

4
100000
0 12
0 4
0 9
0 3
0 11
0 1
1 4
0 8
0 2
0 1
1 9
0 6
0 2
1 11
1 3
1 7
0 4
1 6
1 12
1 10
1 2
0 3
1 13
1 8
0 2
0 2
1 14
1 15
0 8
1 16
0 3
0 10
0 1
1 17
0 10
0 7
1 21
0 6
0 11
0 8
0 6
1 24
1 23
1 25
0 2
0 2
0 4
1 27
1 22
0 1
1 29
1 18
1 28
1 20
1 26
0 6
1 30
0 19
0 2
1 32
1 19
0 2
0 8
1 33
0 3
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #252:

score: 15
Acceptable Answer
time: 54ms
memory: 4332kb

input:

4
100000
0 1
0 11
0 8
0 4
0 3
1 4
1 5
1 3
0 6
0 14
0 2
0 10
1 6
1 9
1 8
0 3
1 10
0 1
0 2
0 4
0 8
0 2
0 1
0 3
0 1
0 2
0 15
1 15
1 18
0 6
1 12
0 14
1 20
0 2
1 14
1 19
0 8
0 3
1 24
1 11
1 25
1 22
0 1
0 6
0 8
0 3
1 26
0 6
1 30
0 2
1 28
1 16
1 13
0 2
0 3
1 32
1 33
0 2
0 5
1 35
0 1
1 36
0 1
0 6
1 38
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #253:

score: 15
Acceptable Answer
time: 60ms
memory: 4260kb

input:

4
100000
0 29
0 23
0 1
1 2
0 11
0 24
0 2
1 6
0 36
1 3
1 7
0 15
0 12
1 9
1 8
0 20
1 10
1 4
0 1
1 11
0 26
1 12
0 2
1 13
0 6
0 24
0 18
1 16
0 15
0 2
1 15
1 18
0 30
1 17
0 7
0 53
1 20
1 21
1 19
1 14
0 19
1 22
0 12
1 23
0 12
0 21
0 15
0 2
0 5
1 28
1 27
1 26
0 1
1 29
1 25
0 10
0 12
0 5
1 30
1 31
1 32
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #254:

score: 15
Acceptable Answer
time: 55ms
memory: 4328kb

input:

4
100000
0 1
0 3
0 49
0 5
1 4
0 7
1 3
0 26
0 4
1 1
0 1
1 8
1 7
1 6
0 7
1 9
0 9
0 5
1 11
1 10
0 17
1 12
0 1
0 5
1 13
0 37
0 14
1 14
1 16
0 5
1 17
1 2
0 2
0 6
0 3
0 21
0 13
1 19
1 18
1 21
1 20
1 22
0 11
1 23
0 8
1 5
0 3
1 25
0 1
1 26
0 21
1 27
0 1
0 3
1 29
1 28
0 5
1 30
0 24
0 1
1 32
1 31
0 20
1 33
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #255:

score: 15
Acceptable Answer
time: 58ms
memory: 4368kb

input:

4
100000
0 498
0 492
0 475
0 495
1 1
1 4
0 497
0 484
1 6
1 5
0 497
0 492
1 7
1 3
0 483
1 8
0 500
1 10
0 488
1 11
0 492
0 489
0 488
0 493
0 490
1 15
0 500
0 497
0 477
1 17
0 493
1 14
1 16
1 19
1 12
0 491
1 21
1 20
0 499
1 22
1 13
1 9
0 493
0 479
0 491
0 493
1 25
0 489
0 497
1 27
0 497
0 492
1 29
1 30...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 492
1 492
1 492
0 -1
0 -1
0 -1
0 -1
0 -1
1 492
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #256:

score: 15
Acceptable Answer
time: 57ms
memory: 4316kb

input:

4
100000
0 496
0 474
0 480
0 493
0 490
1 5
1 1
1 4
0 495
1 6
0 500
1 7
0 495
1 2
0 497
1 8
0 492
1 10
0 500
0 496
1 11
0 485
0 498
0 478
0 484
0 491
1 16
1 17
0 498
0 498
1 19
0 500
0 491
0 495
0 496
1 22
1 23
0 491
1 20
1 18
0 491
1 13
1 14
1 25
1 15
0 477
1 21
0 500
1 27
0 491
1 28
0 477
1 29
1 26...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #257:

score: 15
Acceptable Answer
time: 48ms
memory: 4332kb

input:

4
100000
0 498
0 499
0 495
0 497
0 500
0 497
1 2
0 500
0 495
1 7
0 500
0 500
1 6
0 498
0 500
1 11
1 5
0 498
0 494
0 500
0 500
1 15
0 491
1 8
0 497
0 499
0 499
0 494
0 499
1 21
0 498
0 497
0 497
0 490
0 499
1 23
1 27
0 497
0 494
0 499
1 28
1 30
0 499
1 20
0 495
0 498
0 498
1 34
0 499
1 35
0 499
0 493...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #258:

score: 15
Acceptable Answer
time: 57ms
memory: 4412kb

input:

4
100000
0 5
0 7
0 1
0 2
1 3
1 2
0 9
0 4
1 6
0 1
1 5
1 4
0 1
1 1
0 5
1 7
0 1
1 10
0 4
1 11
0 4
0 8
1 12
0 2
0 1
1 15
0 7
1 13
1 16
0 1
1 14
0 7
1 9
1 8
0 1
1 19
0 4
1 20
0 1
1 21
0 8
0 6
1 22
1 23
0 1
1 24
0 4
0 6
1 25
1 26
0 2
0 6
0 5
1 29
0 5
0 6
1 31
0 6
0 8
0 9
0 1
0 3
1 35
0 3
0 3
0 6
0 2
0 9
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #259:

score: 15
Acceptable Answer
time: 50ms
memory: 4344kb

input:

4
100000
0 495
0 494
0 496
0 500
1 4
1 2
0 497
0 497
1 6
1 5
0 500
0 500
1 8
0 500
0 499
1 10
0 498
1 9
1 11
1 1
0 498
0 499
0 495
1 13
1 12
0 495
1 15
1 14
0 496
0 500
0 500
1 17
1 18
0 500
0 497
1 16
1 20
1 7
0 499
1 19
0 498
1 22
0 500
1 23
0 500
0 497
0 498
1 26
0 500
0 498
0 496
0 486
0 497
0 5...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 495
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 496
0 -1
1 500
0 -1
1 496
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #260:

score: 15
Acceptable Answer
time: 53ms
memory: 4312kb

input:

4
100000
0 500
0 500
0 498
1 2
0 499
0 500
1 4
1 3
0 498
1 6
0 500
1 1
0 499
0 497
0 499
0 490
1 11
1 5
0 499
1 12
1 9
0 499
0 500
0 498
1 14
0 500
1 15
1 10
1 8
0 500
1 17
1 16
0 500
0 499
1 18
1 19
0 496
0 500
0 500
0 500
1 20
1 22
1 23
0 498
1 24
1 21
0 495
0 499
1 25
0 499
0 495
1 28
0 499
0 498...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
1 500
1 500
0 -1
0 -1
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
1 499
1 499
1 499
0 -1
1 499
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
1 500
0 -1
1 499
0 -1
0 -1
0 -1
1 500
1 500
1 500
1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #261:

score: 15
Acceptable Answer
time: 75ms
memory: 4320kb

input:

4
100000
0 500
0 498
0 498
1 2
0 498
0 498
1 3
1 4
0 500
1 6
0 497
1 5
0 500
0 499
1 9
0 497
1 10
1 1
0 500
0 500
0 499
1 12
0 497
0 500
0 499
1 16
0 499
1 13
0 498
1 18
1 11
0 498
0 494
1 19
1 20
0 495
0 500
0 500
0 496
1 24
0 500
1 22
0 493
1 23
0 498
1 27
0 497
0 500
0 500
1 28
1 30
1 21
0 490
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 500
0 -1
1 498
0 -1
1 498
1 498
1 498
0 -1
1 500
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #262:

score: 15
Acceptable Answer
time: 48ms
memory: 4336kb

input:

4
100000
0 1
0 1
0 2
1 3
0 4
1 4
0 1
1 5
0 2
0 2
0 7
1 8
0 1
0 5
1 10
0 3
0 3
0 1
1 13
1 7
1 12
1 6
0 1
0 1
0 2
0 1
0 1
0 2
0 1
1 9
1 11
0 3
0 4
0 2
1 21
0 2
1 24
1 23
1 18
0 1
1 25
1 14
1 22
1 2
0 1
1 26
1 19
0 2
0 1
0 1
1 28
0 1
0 2
1 30
1 31
0 1
0 6
0 1
0 2
0 1
0 2
1 33
1 34
0 3
1 38
0 1
1 39
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 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:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #263:

score: 15
Acceptable Answer
time: 46ms
memory: 6444kb

input:

4
100000
0 2
0 1
0 2
1 3
0 1
0 3
0 1
0 1
1 7
0 2
0 1
1 8
1 6
1 5
1 1
1 4
0 4
1 10
0 1
1 11
0 5
0 5
1 12
0 1
1 14
1 9
0 3
1 15
0 1
1 16
0 6
1 17
0 1
1 18
0 1
0 5
0 1
1 19
1 13
0 2
0 1
0 1
1 24
0 4
1 25
1 22
1 21
0 1
0 1
0 4
1 28
0 3
0 2
1 29
0 1
1 31
0 1
0 2
0 1
1 32
1 34
1 30
1 26
0 7
0 4
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #264:

score: 15
Acceptable Answer
time: 74ms
memory: 8700kb

input:

4
100000
0 38496
0 28657
0 99999
0 3492
0 37198
0 99999
0 9121
0 99999
0 14736
0 99999
0 99999
0 3806
0 12056
0 4064
0 17327
0 99999
0 99999
0 99999
0 32226
0 42793
0 19296
0 4359
0 99999
0 99999
0 99999
0 6376
0 99999
0 845
0 7497
0 99999
0 2775
0 27387
0 99999
0 26311
0 21134
0 21357
0 99999
0 999...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 38496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #265:

score: 15
Acceptable Answer
time: 44ms
memory: 6760kb

input:

4
100000
0 42066
1 1
0 70896
1 2
0 12882
1 3
0 14262
1 4
0 33777
1 5
0 29602
1 6
0 6156
1 7
0 97129
1 8
0 46108
1 9
0 38209
1 10
0 65262
1 11
0 76272
1 12
0 29427
1 13
0 7461
1 14
0 56340
1 15
0 28588
1 16
0 5737
1 17
0 80668
1 18
0 60075
1 19
0 90068
1 20
0 94055
1 21
0 18278
1 22
0 7892
1 23
0 467...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 42066
0 -1
1 70896
0 -1
1 12882
0 -1
1 14262
0 -1
1 33777
0 -1
1 29602
0 -1
1 6156
0 -1
1 97129
0 -1
1 46108
0 -1
1 38209
0 -1
1 65262
0 -1
1 76272
0 -1
1 29427
0 -1
1 7461
0 -1
1 56340
0 -1
1 28588
0 -1
1 5737
0 -1
1 80668
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #266:

score: 15
Acceptable Answer
time: 74ms
memory: 7756kb

input:

4
100000
0 99999
0 4542
0 36620
0 99999
0 45255
0 99999
0 22573
0 99999
0 36366
0 99999
0 99999
0 99999
1 7
0 43042
1 1
0 4122
0 99999
1 13
0 99999
0 45038
0 99999
0 35784
0 99999
0 99999
0 43824
1 22
1 18
0 16366
0 4955
0 4381
0 99999
0 41981
0 43593
0 11497
0 23367
0 2774
0 99999
1 32
0 99999
0 99...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 99999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 99999
1 99999
1 99999
1 99999
1 99999
0 -1
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
1 99999
0 -1
1 99999
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #267:

score: 15
Acceptable Answer
time: 44ms
memory: 6476kb

input:

4
100000
0 3
0 2
0 1
0 1
0 2
0 1
0 2
0 3
1 7
0 1
1 6
1 1
1 5
1 4
0 4
1 2
1 9
0 2
1 3
0 2
1 11
1 12
0 1
1 13
0 3
1 14
0 4
0 3
1 16
0 3
0 3
0 4
0 1
1 20
0 4
1 19
1 17
0 1
1 22
0 4
1 8
0 3
0 4
0 3
0 3
1 25
1 26
0 4
0 2
1 28
0 1
1 30
0 2
1 31
1 29
0 1
1 32
1 24
0 2
0 3
1 34
1 33
1 10
1 23
1 21
0 1
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #268:

score: 15
Acceptable Answer
time: 55ms
memory: 6412kb

input:

4
100000
0 3
0 4
0 1
1 1
0 4
0 3
0 2
0 3
1 5
0 3
1 2
0 2
1 7
0 2
0 2
1 11
0 1
1 12
0 4
1 13
1 3
0 3
1 14
0 3
0 2
1 4
1 9
0 4
1 17
0 3
1 18
0 3
1 10
0 1
0 3
0 3
1 20
0 3
0 4
1 24
1 22
1 23
1 16
1 8
1 19
1 21
0 4
0 1
1 25
0 2
1 27
1 26
0 3
1 28
0 3
1 29
0 1
0 2
0 3
1 30
1 31
0 3
1 33
0 3
1 34
1 6
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #269:

score: 15
Acceptable Answer
time: 52ms
memory: 6376kb

input:

4
100000
0 9
0 8
0 7
0 6
1 4
0 5
0 8
0 7
0 2
1 7
0 3
1 9
1 6
0 9
1 10
1 1
1 5
0 2
0 3
0 3
0 1
1 11
0 2
1 12
0 3
0 2
0 4
1 18
1 17
1 15
0 1
1 19
0 2
0 6
0 8
1 22
1 21
1 20
0 5
0 8
0 4
1 25
1 24
0 9
0 6
0 3
0 3
0 9
1 27
0 3
0 9
1 31
0 5
1 32
0 9
1 34
0 6
0 1
1 36
0 2
0 9
0 9
1 37
1 39
0 4
0 5
1 40
0 8...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #270:

score: 15
Acceptable Answer
time: 46ms
memory: 6364kb

input:

4
100000
0 7
0 2
0 1
1 2
0 2
0 7
0 4
0 4
1 5
1 6
1 3
0 4
1 8
0 5
0 4
1 9
0 3
1 11
0 3
0 4
0 4
1 12
0 2
0 5
1 16
0 7
1 15
0 1
0 3
0 7
0 6
1 18
1 21
1 13
0 5
1 14
0 2
1 23
0 6
1 17
1 24
1 10
1 19
1 1
0 1
0 3
1 26
0 1
1 25
1 27
0 4
0 1
0 5
1 30
0 5
1 31
0 7
0 2
1 32
1 33
0 4
0 3
1 34
0 8
0 4
0 4
1 37
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #271:

score: 15
Acceptable Answer
time: 42ms
memory: 8400kb

input:

4
100000
0 4
0 8
0 5
1 3
0 1
1 2
0 6
1 1
0 6
0 7
0 7
1 4
0 1
1 6
1 7
1 5
0 2
0 6
0 6
0 1
0 8
0 6
1 14
0 5
1 16
1 15
1 13
1 9
1 10
1 8
0 2
1 17
0 1
0 6
1 18
1 12
0 4
1 20
0 2
1 21
0 4
1 22
0 2
0 8
1 24
1 23
0 7
0 2
0 8
0 5
1 25
1 26
1 27
0 5
0 7
1 29
0 7
1 30
0 2
1 31
1 32
0 1
0 1
0 1
1 34
0 8
1 36
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #272:

score: 15
Acceptable Answer
time: 40ms
memory: 6380kb

input:

4
100000
0 29
0 30
0 26
1 1
0 8
1 3
0 3
0 26
0 3
1 5
1 7
0 17
1 8
1 2
0 21
0 7
0 13
1 9
0 23
1 11
1 12
0 17
0 23
0 25
1 13
0 24
0 19
0 30
1 15
0 14
1 19
0 6
0 29
1 21
1 18
0 27
1 17
1 10
1 14
0 5
1 23
1 22
1 20
1 4
0 30
0 15
0 22
1 26
1 24
1 16
0 6
1 27
0 15
1 28
0 31
0 32
1 30
0 7
1 31
1 29
0 8
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #273:

score: 15
Acceptable Answer
time: 44ms
memory: 6364kb

input:

4
100000
0 9
0 3
0 14
1 3
0 8
0 25
1 4
0 29
0 5
0 25
1 7
1 1
1 2
1 6
0 19
0 4
1 10
1 9
0 15
1 11
0 32
0 13
0 10
0 14
0 27
0 32
1 13
1 12
1 16
0 1
0 1
0 11
1 19
1 18
1 17
0 8
1 21
1 15
0 30
0 4
0 18
0 32
0 30
0 23
0 26
1 28
1 23
0 8
1 27
1 29
0 28
1 26
1 24
0 4
1 31
0 24
1 32
0 32
0 19
0 8
0 20
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 25
1 25
1 25
0 -1
1 25
1 25
1 25
1 25
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #274:

score: 15
Acceptable Answer
time: 53ms
memory: 6360kb

input:

4
100000
0 4
0 1
0 3
0 4
0 3
0 3
0 4
0 4
1 1
1 5
1 3
0 4
0 2
1 10
1 7
1 4
1 6
1 2
0 3
1 8
0 1
0 2
0 2
0 3
1 12
0 2
0 1
0 4
0 4
0 2
1 20
1 16
0 3
0 1
1 21
1 17
0 4
1 23
1 13
1 19
0 4
0 1
0 2
1 26
0 2
1 27
1 24
0 2
0 1
0 2
1 28
1 30
1 25
1 9
1 15
0 3
0 3
0 2
0 2
1 34
0 1
0 4
0 2
1 37
0 3
1 35
1 38
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #275:

score: 15
Acceptable Answer
time: 44ms
memory: 6352kb

input:

4
100000
0 4
0 2
0 3
0 4
0 1
1 5
0 2
0 3
1 7
0 3
0 2
0 1
0 2
1 3
1 10
0 3
0 3
1 2
1 11
1 4
1 8
1 12
0 4
0 4
1 14
0 1
1 16
0 4
0 1
0 3
0 3
1 18
0 2
0 1
0 2
1 21
1 23
1 20
0 2
1 24
1 22
0 3
1 25
0 4
0 1
1 27
0 1
1 28
0 3
1 26
0 2
0 4
1 30
1 31
1 29
0 4
1 32
0 3
0 4
0 3
1 33
0 4
0 3
0 4
1 38
0 1
1 39
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #276:

score: 15
Acceptable Answer
time: 48ms
memory: 6472kb

input:

4
100000
0 6
0 8
0 3
1 2
0 2
1 4
0 6
0 8
1 5
1 1
0 6
0 2
1 7
0 6
1 9
1 8
0 1
0 5
1 10
0 1
1 11
0 1
0 4
0 7
0 1
1 16
1 14
1 13
1 12
0 8
1 3
0 1
1 18
0 5
1 19
1 15
0 6
0 3
1 21
0 1
1 20
0 5
0 2
0 7
1 23
1 17
1 24
1 6
0 5
1 26
0 2
1 27
0 4
0 6
1 29
1 28
0 3
1 30
0 5
0 4
0 1
1 33
0 2
1 34
0 6
1 31
0 4
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #277:

score: 15
Acceptable Answer
time: 51ms
memory: 6380kb

input:

4
100000
0 2
0 6
0 7
1 1
0 1
0 2
1 4
0 2
1 6
1 5
0 6
1 7
0 3
0 8
0 4
0 5
1 10
0 3
1 12
0 2
0 8
0 2
1 13
1 3
0 3
0 1
0 2
0 1
1 16
0 1
1 18
1 14
0 6
1 21
1 15
1 8
1 20
1 17
1 9
0 3
0 8
1 23
0 5
0 6
1 22
0 7
1 26
0 3
1 24
0 4
0 3
1 28
0 4
0 6
0 1
1 30
1 31
1 29
1 25
0 1
0 4
1 32
0 4
0 4
1 36
0 3
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #278:

score: 15
Acceptable Answer
time: 44ms
memory: 8108kb

input:

4
100000
0 28
0 11
0 20
1 2
0 32
0 6
0 8
0 32
1 4
0 30
0 24
1 7
0 27
0 8
0 23
1 6
0 9
1 11
0 9
0 31
1 14
1 10
0 18
0 18
1 17
1 15
1 9
1 8
1 13
0 26
1 5
1 18
0 19
0 24
1 20
0 31
0 15
0 20
0 2
1 23
0 18
0 19
0 6
1 25
0 16
1 24
1 16
1 27
1 28
1 1
1 19
1 22
0 25
0 2
0 28
0 29
0 30
1 32
1 33
1 29
1 21
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #279:

score: 15
Acceptable Answer
time: 56ms
memory: 6412kb

input:

4
100000
0 8
0 17
0 8
1 1
0 32
1 4
0 13
1 3
0 22
1 2
0 20
1 7
0 20
1 5
0 25
0 5
0 18
0 6
0 31
1 9
0 21
1 11
0 4
0 2
0 4
1 16
1 14
0 29
0 11
0 28
0 27
1 18
0 19
1 22
1 19
0 16
1 23
1 20
1 12
1 17
1 10
1 13
0 13
0 18
1 21
0 7
0 16
1 26
0 9
1 28
0 29
1 29
0 30
0 29
1 30
0 14
0 24
0 11
1 34
1 27
1 32
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #280:

score: 15
Acceptable Answer
time: 53ms
memory: 6364kb

input:

4
100000
0 9
0 12
0 4
1 3
0 1
0 14
1 4
0 2
0 8
1 2
0 14
0 9
0 5
1 9
0 11
0 8
0 15
0 2
0 8
0 14
0 14
0 9
0 13
1 14
1 7
1 6
1 13
0 6
0 9
1 20
1 5
0 7
0 8
0 7
1 19
0 12
1 12
0 3
0 3
0 2
1 28
0 12
1 17
1 21
0 15
1 18
0 15
1 31
1 27
1 1
0 6
0 8
1 33
0 14
1 34
1 30
1 22
0 9
1 16
1 11
1 10
0 7
0 6
0 7
1 38...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #281:

score: 15
Acceptable Answer
time: 56ms
memory: 8128kb

input:

4
100000
0 3
0 1
0 1
1 3
0 1
0 2
1 4
1 5
0 2
0 2
0 4
1 8
0 1
0 1
1 7
1 10
0 1
0 4
1 11
0 2
1 12
1 6
0 1
0 4
1 15
0 3
1 16
0 1
0 2
0 2
0 2
0 1
1 19
1 17
0 2
1 22
0 1
0 2
0 4
1 23
1 14
1 25
0 3
1 26
0 1
1 27
0 3
0 3
0 1
1 28
1 29
1 30
1 2
0 3
1 31
1 18
0 2
0 4
0 3
0 3
0 1
0 2
1 37
1 35
1 34
0 3
1 38
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #282:

score: 15
Acceptable Answer
time: 56ms
memory: 6412kb

input:

4
100000
0 3
0 2
0 1
1 3
0 1
1 1
0 2
1 2
0 3
0 3
1 4
1 6
0 2
0 1
1 9
0 1
0 4
1 11
0 4
0 3
0 4
1 14
1 12
0 1
1 8
0 2
0 1
1 17
1 16
1 13
1 5
0 3
1 18
1 7
0 3
1 19
0 3
0 3
1 20
1 15
0 3
1 22
0 2
1 23
0 1
1 24
0 4
0 3
1 26
0 4
0 4
1 27
1 25
1 28
0 1
1 29
0 3
0 2
1 31
0 2
1 30
0 3
0 3
0 2
1 35
1 33
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #283:

score: 15
Acceptable Answer
time: 45ms
memory: 6376kb

input:

4
100000
0 3
0 3
0 1
1 2
0 10
1 1
0 6
0 8
0 7
0 12
0 14
0 4
0 12
0 12
1 10
0 2
1 13
0 6
0 13
1 9
0 1
1 7
1 11
0 3
1 14
0 13
1 18
0 4
0 15
1 20
1 19
1 5
0 9
0 12
0 11
0 7
1 23
0 14
1 25
0 10
1 21
1 17
1 15
0 14
0 10
1 27
1 28
1 24
0 11
1 29
1 4
0 8
1 30
1 26
0 13
1 31
0 12
0 12
0 3
1 33
1 32
1 34
0 7...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0

Test #284:

score: 15
Acceptable Answer
time: 59ms
memory: 6372kb

input:

4
100000
0 13
0 2
0 15
1 3
0 5
0 10
0 13
1 5
1 4
1 6
0 10
1 7
0 15
0 15
1 8
1 9
0 4
1 10
0 14
1 11
0 5
0 12
0 3
0 10
1 12
1 13
1 2
0 11
0 7
0 8
1 16
1 17
1 18
1 15
0 9
1 19
0 14
1 20
0 14
0 3
0 12
0 1
1 21
1 23
0 9
0 7
1 25
0 11
1 27
0 2
0 6
1 29
0 10
0 14
0 9
0 8
0 13
0 15
0 13
1 34
0 1
0 12
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
17 0
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

points 0.20270270270 p = 1.00, C = 17, E = 0