QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#126178#6668. Trokutihxhuoxinghx89.296774 108ms3780kbC++143.8kb2023-07-18 11:02:352023-07-18 11:02:38

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-18 11:02:38]
  • 评测
  • 测评结果:89.296774
  • 用时:108ms
  • 内存:3780kb
  • [2023-07-18 11:02:35]
  • 提交

answer

#include <iostream>
#include <vector>
#include <utility>
#include <cstdlib>
#include <ctime>
using namespace std;

constexpr int NODECNT = 100;
constexpr int FIRSTTRY = 2733;
constexpr int QUERYCNT = 3399;

struct Query {
	int a, b, c;
	Query() = default;
	Query(int _a, int _b, int _c) {
		if(_a < _b && _b < _c) a = _a, b = _b, c = _c;
		if(_a < _c && _c < _b) a = _a, b = _c, c = _b;
		if(_b < _a && _a < _c) a = _b, b = _a, c = _c;
		if(_b < _c && _c < _a) a = _b, b = _c, c = _a;
		if(_c < _a && _a < _b) a = _c, b = _a, c = _b;
		if(_c < _b && _b < _a) a = _c, b = _b, c = _a;
	}
	bool operator==(const Query& rhs) const {
		return a == rhs.a && b == rhs.b && c == rhs.c;
	}
	int ask()
	{
		cout << "? " << a + 1 << " " << b + 1 << " " << c + 1 << endl;
		int res;
		cin >> res;
		return res;
	}
};

vector<pair<Query, int> > query;

int ans[NODECNT][NODECNT];

void check(Query q, int res)
{
	if(res == 0)
	{
		ans[q.a][q.b] = ans[q.b][q.a] = ans[q.a][q.c] = ans[q.c][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 0;
	}
	if(res == 3)
	{
		ans[q.a][q.b] = ans[q.b][q.a] = ans[q.a][q.c] = ans[q.c][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 1;
	}
	if(res == 1)
	{
		if(ans[q.a][q.b] == 0 && ans[q.a][q.c] == 0) ans[q.b][q.c] = ans[q.c][q.b] = 1;
		if(ans[q.a][q.b] == 0 && ans[q.b][q.c] == 0) ans[q.a][q.c] = ans[q.c][q.a] = 1;
		if(ans[q.a][q.c] == 0 && ans[q.b][q.c] == 0) ans[q.a][q.b] = ans[q.b][q.a] = 1;
		if(ans[q.a][q.b] == 1) ans[q.a][q.c] = ans[q.c][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 0;
		if(ans[q.a][q.c] == 1) ans[q.a][q.b] = ans[q.b][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 0;
		if(ans[q.b][q.c] == 1) ans[q.a][q.b] = ans[q.b][q.a] = ans[q.a][q.c] = ans[q.c][q.a] = 0;
	}
	if(res == 2)
	{
		if(ans[q.a][q.b] == 1 && ans[q.a][q.c] == 1) ans[q.b][q.c] = ans[q.c][q.b] = 0;
		if(ans[q.a][q.b] == 1 && ans[q.b][q.c] == 1) ans[q.a][q.c] = ans[q.c][q.a] = 0;
		if(ans[q.a][q.c] == 1 && ans[q.b][q.c] == 1) ans[q.a][q.b] = ans[q.b][q.a] = 0;
		if(ans[q.a][q.b] == 0) ans[q.a][q.c] = ans[q.c][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 1;
		if(ans[q.a][q.c] == 0) ans[q.a][q.b] = ans[q.b][q.a] = ans[q.b][q.c] = ans[q.c][q.b] = 1;
		if(ans[q.b][q.c] == 0) ans[q.a][q.b] = ans[q.b][q.a] = ans[q.a][q.c] = ans[q.c][q.a] = 1;
	}
}

int main()
{
	for(int i = 0; i < NODECNT; i++)
	{
		for(int j = 0; j < NODECNT; j++)
		{
			if(i != j) ans[i][j] = -1;
		}
	}
	srand(time(0));
	for(int i = 0; i < FIRSTTRY; i++)
	{
		bool flag = true;
		Query q;
		while(flag)
		{
			q = Query(rand() % NODECNT, rand() % NODECNT, rand() % NODECNT);
			if(q.a == q.b || q.a == q.c || q.b == q.c) continue;
			if(ans[q.a][q.b] != -1 && ans[q.a][q.c] != -1 && ans[q.b][q.c] != -1) continue;
			flag = false;
			for(pair<Query, int> pqi : query)
			{
				if(q == pqi.first)
				{
					flag = true;
					break;
				}
			}
		}
		query.push_back({q, q.ask()});
		for(pair<Query, int> pqi : query)
		{
			check(pqi.first, pqi.second);
		}
	}
	while(true)
	{
		bool flag = true;
		Query q;
		while(flag)
		{
			q = Query(rand() % NODECNT, rand() % NODECNT, rand() % NODECNT);
			if(q.a == q.b || q.a == q.c || q.b == q.c) continue;
			if(ans[q.a][q.b] != -1 && ans[q.a][q.c] != -1 && ans[q.b][q.c] != -1) continue;
			flag = false;
			for(pair<Query, int> pqi : query)
			{
				if(q == pqi.first)
				{
					flag = true;
					break;
				}
			}
		}
		query.push_back({q, q.ask()});
		check(q, query.back().second);
		for(pair<Query, int> pqi : query)
		{
			check(pqi.first, pqi.second);
		}
		flag = true;
		for(int i = 0; flag && i < NODECNT; i++)
		{
			for(int j = 0; flag && j < NODECNT; j++)
			{
				if(ans[i][j] == -1) flag = false;
			}
		}
		if(flag) break;
	}
	cout << "!" << endl;
	for(int i = 0; i < NODECNT; i++)
	{
		for(int j = 0; j < NODECNT; j++)
		{
			cout << ans[i][j];
		}
		cout << endl;
	}
}

詳細信息

Subtask #1:

score: 89.2968
Acceptable Answer

Test #1:

score: 100
Accepted
time: 9ms
memory: 3608kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 69 89 94
? 5 32 47
? 11 18 52
? 23 25 41
? 2 73 85
? 14 24 36
? 46 55 90
? 44 45 79
? 5 46 87
? 36 51 99
? 19 91 100
? 75 89 93
? 40 76 85
? 17 77 94
? 1 16 30
? 17 24 89
? 54 65 71
? 10 49 99
? 35 66 95
? 17 23 40
? 22 42 87
? 15 32 62
? 21 90 98
? 12 27 35
? 3 28 56
? 43 73 81
? 56 95 96
? 21 44...

result:

points 1.0 points  1.0 correct 3048 queries

Test #2:

score: 100
Accepted
time: 45ms
memory: 3756kb

input:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

output:

? 69 89 94
? 5 32 47
? 11 18 52
? 23 25 41
? 2 73 85
? 14 24 36
? 46 55 90
? 44 45 79
? 5 46 87
? 36 51 99
? 19 91 100
? 75 89 93
? 40 76 85
? 17 77 94
? 1 16 30
? 17 24 89
? 54 65 71
? 10 49 99
? 35 66 95
? 17 23 40
? 22 42 87
? 15 32 62
? 21 90 98
? 12 27 35
? 3 28 56
? 43 73 81
? 56 95 96
? 21 44...

result:

points 1.0 points  1.0 correct 3048 queries

Test #3:

score: 100
Accepted
time: 50ms
memory: 3596kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 69 89 94
? 5 32 47
? 11 18 52
? 23 25 41
? 2 73 85
? 14 24 36
? 46 55 90
? 44 45 79
? 5 46 87
? 36 51 99
? 19 91 100
? 75 89 93
? 40 76 85
? 17 77 94
? 1 16 30
? 17 24 89
? 54 65 71
? 10 49 99
? 35 66 95
? 17 23 40
? 22 42 87
? 15 32 62
? 21 90 98
? 12 27 35
? 3 28 56
? 43 73 81
? 56 95 96
? 21 44...

result:

points 1.0 points  1.0 correct 3048 queries

Test #4:

score: 100
Accepted
time: 41ms
memory: 3708kb

input:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

output:

? 25 29 66
? 48 55 89
? 19 28 85
? 49 72 98
? 36 62 74
? 15 16 64
? 1 3 29
? 38 67 70
? 53 82 100
? 7 56 70
? 32 53 87
? 18 21 41
? 17 77 100
? 1 88 97
? 11 36 74
? 26 71 89
? 17 38 78
? 40 47 83
? 29 80 87
? 1 28 94
? 26 54 86
? 23 72 98
? 40 49 65
? 27 41 45
? 7 14 41
? 14 32 37
? 2 61 74
? 59 65 ...

result:

points 1.0 points  1.0 correct 3015 queries

Test #5:

score: 100
Accepted
time: 30ms
memory: 3596kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 25 29 66
? 48 55 89
? 19 28 85
? 49 72 98
? 36 62 74
? 15 16 64
? 1 3 29
? 38 67 70
? 53 82 100
? 7 56 70
? 32 53 87
? 18 21 41
? 17 77 100
? 1 88 97
? 11 36 74
? 26 71 89
? 17 38 78
? 40 47 83
? 29 80 87
? 1 28 94
? 26 54 86
? 23 72 98
? 40 49 65
? 27 41 45
? 7 14 41
? 14 32 37
? 2 61 74
? 59 65 ...

result:

points 1.0 points  1.0 correct 3016 queries

Test #6:

score: 100
Accepted
time: 58ms
memory: 3708kb

input:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

output:

? 11 69 76
? 48 90 93
? 63 85 86
? 1 28 50
? 8 10 37
? 58 59 78
? 8 39 47
? 16 69 99
? 2 8 14
? 9 14 63
? 39 77 95
? 5 19 83
? 4 53 97
? 83 89 98
? 7 89 90
? 26 48 66
? 7 55 64
? 5 31 93
? 44 61 64
? 14 30 53
? 24 29 81
? 19 29 99
? 33 53 54
? 49 73 88
? 14 46 78
? 4 77 91
? 21 45 83
? 39 84 89
? 14...

result:

points 1.0 points  1.0 correct 3022 queries

Test #7:

score: 99.2774
Acceptable Answer
time: 82ms
memory: 3696kb

input:

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

output:

? 11 69 76
? 48 90 93
? 63 85 86
? 1 28 50
? 8 10 37
? 58 59 78
? 8 39 47
? 16 69 99
? 2 8 14
? 9 14 63
? 39 77 95
? 5 19 83
? 4 53 97
? 83 89 98
? 7 89 90
? 26 48 66
? 7 55 64
? 5 31 93
? 44 61 64
? 14 30 53
? 24 29 81
? 19 29 99
? 33 53 54
? 49 73 88
? 14 46 78
? 4 77 91
? 21 45 83
? 39 84 89
? 14...

result:

points 0.99277419350 points  0.99277419350 correct 3416 queries

Test #8:

score: 93.1355
Acceptable Answer
time: 103ms
memory: 3668kb

input:

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

output:

? 19 39 48
? 36 83 93
? 25 65 80
? 32 41 85
? 53 76 79
? 29 63 67
? 56 81 93
? 12 14 79
? 16 62 72
? 34 77 99
? 25 38 97
? 59 67 73
? 4 12 83
? 8 54 92
? 20 21 83
? 28 97 100
? 78 89 93
? 16 53 93
? 14 50 92
? 43 81 98
? 5 19 65
? 9 76 77
? 48 51 60
? 10 35 40
? 12 45 88
? 7 41 91
? 58 82 84
? 34 35...

result:

points 0.93135483870 points  0.93135483870 correct 3552 queries

Test #9:

score: 100
Accepted
time: 52ms
memory: 3724kb

input:

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

output:

? 19 39 48
? 36 83 93
? 25 65 80
? 32 41 85
? 53 76 79
? 29 63 67
? 56 81 93
? 12 14 79
? 16 62 72
? 34 77 99
? 25 38 97
? 59 67 73
? 4 12 83
? 8 54 92
? 20 21 83
? 28 97 100
? 78 89 93
? 16 53 93
? 14 50 92
? 43 81 98
? 5 19 65
? 9 76 77
? 48 51 60
? 10 35 40
? 12 45 88
? 7 41 91
? 58 82 84
? 34 35...

result:

points 1.0 points  1.0 correct 3357 queries

Test #10:

score: 92.0968
Acceptable Answer
time: 106ms
memory: 3716kb

input:

2
2
2
0
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
0
2
0
2
2
2
2
2
0
2
0
2
2
2
2
2
2
0
2
2
2
0
2
2
2
0
2
2
2
2
2
0
0
2
0
2
2
2
2
2
2
0
2
0
2
2
0
2
2
0
2
0
2
0
2
2
2
2
2
0
2
2
0
2
2
2
0
2
2
2
2
2
2
2
2
0
2
2
0
2
2
2
2
2
2
2
0
2
2
2
0
2
0
2
0
2
2
0
2
2
2
2
2
2
2
0
2
2
2
2
2
2
0
2
0
2
2
2
2
2
2
2
2
2
0
2
2
2
...

output:

? 41 53 91
? 14 49 77
? 17 47 82
? 83 89 96
? 39 64 88
? 21 55 67
? 1 47 70
? 14 33 87
? 15 65 84
? 10 61 64
? 6 10 66
? 14 50 71
? 17 79 83
? 23 51 60
? 8 61 67
? 34 47 85
? 1 37 80
? 12 23 75
? 29 36 89
? 19 44 51
? 31 49 60
? 9 72 96
? 62 87 88
? 39 44 99
? 57 58 66
? 4 41 78
? 4 11 77
? 26 42 51...

result:

points 0.92096774190 points  0.92096774190 correct 3575 queries

Test #11:

score: 91.329
Acceptable Answer
time: 108ms
memory: 3664kb

input:

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

output:

? 41 53 91
? 14 49 77
? 17 47 82
? 83 89 96
? 39 64 88
? 21 55 67
? 1 47 70
? 14 33 87
? 15 65 84
? 10 61 64
? 6 10 66
? 14 50 71
? 17 79 83
? 23 51 60
? 8 61 67
? 34 47 85
? 1 37 80
? 12 23 75
? 29 36 89
? 19 44 51
? 31 49 60
? 9 72 96
? 62 87 88
? 39 44 99
? 57 58 66
? 4 41 78
? 4 11 77
? 26 42 51...

result:

points 0.91329032260 points  0.91329032260 correct 3592 queries

Test #12:

score: 90.471
Acceptable Answer
time: 103ms
memory: 3592kb

input:

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

output:

? 27 86 96
? 14 58 81
? 8 34 96
? 14 51 95
? 9 21 54
? 35 69 87
? 5 9 78
? 10 49 57
? 3 71 78
? 35 83 84
? 4 61 73
? 70 86 100
? 17 32 45
? 17 63 95
? 3 16 31
? 3 84 90
? 37 50 89
? 14 50 97
? 27 67 75
? 29 50 61
? 5 64 73
? 36 42 56
? 21 58 87
? 20 56 66
? 12 36 86
? 40 67 71
? 8 11 77
? 7 57 90
? ...

result:

points 0.90470967740 points  0.90470967740 correct 3611 queries

Test #13:

score: 91.2387
Acceptable Answer
time: 105ms
memory: 3608kb

input:

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

output:

? 17 91 96
? 7 43 54
? 24 31 61
? 26 61 100
? 61 68 93
? 25 28 42
? 27 36 97
? 82 86 93
? 5 21 71
? 11 26 55
? 42 45 92
? 3 37 39
? 15 19 44
? 41 68 79
? 53 67 71
? 12 33 86
? 11 62 99
? 3 58 84
? 39 73 88
? 12 50 51
? 42 66 92
? 28 62 80
? 16 24 98
? 30 76 91
? 9 22 46
? 9 27 94
? 7 8 59
? 21 65 91...

result:

points 0.91238709680 points  0.91238709680 correct 3594 queries

Test #14:

score: 92.0968
Acceptable Answer
time: 71ms
memory: 3684kb

input:

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

output:

? 17 91 96
? 7 43 54
? 24 31 61
? 26 61 100
? 61 68 93
? 25 28 42
? 27 36 97
? 82 86 93
? 5 21 71
? 11 26 55
? 42 45 92
? 3 37 39
? 15 19 44
? 41 68 79
? 53 67 71
? 12 33 86
? 11 62 99
? 3 58 84
? 39 73 88
? 12 50 51
? 42 66 92
? 28 62 80
? 16 24 98
? 30 76 91
? 9 22 46
? 9 27 94
? 7 8 59
? 21 65 91...

result:

points 0.92096774190 points  0.92096774190 correct 3575 queries

Test #15:

score: 90.2
Acceptable Answer
time: 106ms
memory: 3696kb

input:

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

output:

? 33 85 93
? 10 39 77
? 36 72 74
? 16 39 54
? 57 63 88
? 44 89 91
? 3 13 55
? 33 34 45
? 11 25 63
? 9 93 96
? 39 85 91
? 19 28 48
? 36 45 66
? 38 60 89
? 28 51 99
? 42 85 91
? 6 46 80
? 31 35 38
? 1 79 93
? 55 86 96
? 15 22 86
? 50 58 86
? 15 21 76
? 4 9 72
? 54 68 82
? 23 47 99
? 63 66 73
? 10 17 1...

result:

points 0.9020 points  0.9020 correct 3617 queries

Test #16:

score: 91.0129
Acceptable Answer
time: 82ms
memory: 3780kb

input:

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

output:

? 33 85 93
? 10 39 77
? 36 72 74
? 16 39 54
? 57 63 88
? 44 89 91
? 3 13 55
? 33 34 45
? 11 25 63
? 9 93 96
? 39 85 91
? 19 28 48
? 36 45 66
? 38 60 89
? 28 51 99
? 42 85 91
? 6 46 80
? 31 35 38
? 1 79 93
? 55 86 96
? 15 22 86
? 50 58 86
? 15 21 76
? 4 9 72
? 54 68 82
? 23 47 99
? 63 66 73
? 10 17 1...

result:

points 0.91012903230 points  0.91012903230 correct 3599 queries

Test #17:

score: 89.2968
Acceptable Answer
time: 83ms
memory: 3592kb

input:

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

output:

? 48 59 87
? 11 61 86
? 20 49 81
? 5 92 98
? 18 41 97
? 41 72 96
? 4 20 79
? 37 44 84
? 35 64 88
? 1 69 95
? 6 13 42
? 5 25 61
? 5 29 37
? 1 46 86
? 24 78 93
? 19 43 48
? 27 49 92
? 78 86 90
? 25 52 92
? 35 44 47
? 8 40 55
? 21 61 96
? 25 32 37
? 17 66 77
? 63 95 100
? 56 65 94
? 13 55 72
? 13 46 50...

result:

points 0.89296774190 points  0.89296774190 correct 3637 queries

Test #18:

score: 91.2387
Acceptable Answer
time: 103ms
memory: 3764kb

input:

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

output:

? 13 33 41
? 27 46 77
? 10 30 63
? 54 67 71
? 53 80 94
? 8 12 63
? 52 75 95
? 21 97 99
? 34 81 86
? 7 24 68
? 17 92 93
? 43 57 68
? 2 52 82
? 6 52 83
? 10 45 49
? 17 60 81
? 6 20 92
? 2 18 41
? 17 21 87
? 54 55 79
? 70 77 99
? 55 90 93
? 8 71 87
? 23 90 91
? 19 48 91
? 57 71 78
? 62 73 84
? 37 44 79...

result:

points 0.91238709680 points  0.91238709680 correct 3594 queries

Test #19:

score: 92.5032
Acceptable Answer
time: 85ms
memory: 3704kb

input:

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

output:

? 13 33 41
? 27 46 77
? 10 30 63
? 54 67 71
? 53 80 94
? 8 12 63
? 52 75 95
? 21 97 99
? 34 81 86
? 7 24 68
? 17 92 93
? 43 57 68
? 2 52 82
? 6 52 83
? 10 45 49
? 17 60 81
? 6 20 92
? 2 18 41
? 17 21 87
? 54 55 79
? 70 77 99
? 55 90 93
? 8 71 87
? 23 90 91
? 19 48 91
? 57 71 78
? 62 73 84
? 37 44 79...

result:

points 0.92503225810 points  0.92503225810 correct 3566 queries

Test #20:

score: 91.7355
Acceptable Answer
time: 83ms
memory: 3668kb

input:

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

output:

? 21 42 51
? 89 95 97
? 47 84 96
? 5 27 56
? 27 55 65
? 2 30 37
? 35 39 55
? 3 10 58
? 30 57 79
? 2 65 99
? 45 67 90
? 41 63 88
? 92 96 98
? 12 47 77
? 55 59 62
? 2 43 47
? 4 53 82
? 11 38 91
? 40 70 93
? 49 86 93
? 35 52 99
? 22 44 66
? 14 16 36
? 12 83 92
? 20 57 100
? 43 56 92
? 64 66 84
? 1 57 8...

result:

points 0.91735483870 points  0.91735483870 correct 3583 queries