QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#126399#6668. Trokutihxhuoxinghx89.567742 211ms3784kbC++143.3kb2023-07-18 14:41:152023-07-18 14:41:16

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 14:41:16]
  • 评测
  • 测评结果:89.567742
  • 用时:211ms
  • 内存:3784kb
  • [2023-07-18 14:41:15]
  • 提交

answer

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

constexpr int NODECNT = 100;

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));
	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;
				}
			}
		}
		int res = q.ask();
		check(q, res);
		query.push_back({q, res});
		for(pair<Query, int> pqi : query)
		{
			check(pqi.first, pqi.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.5677
Acceptable Answer

Test #1:

score: 100
Accepted
time: 67ms
memory: 3704kb

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:

? 46 67 71
? 12 29 54
? 71 74 82
? 11 90 98
? 5 97 98
? 63 77 95
? 24 77 87
? 54 68 84
? 3 6 13
? 21 60 93
? 18 30 32
? 7 65 92
? 28 51 63
? 7 24 83
? 70 80 83
? 21 42 46
? 17 25 60
? 43 73 78
? 33 40 100
? 4 5 59
? 40 48 89
? 53 65 84
? 24 67 86
? 3 49 92
? 26 78 80
? 22 46 48
? 45 71 90
? 4 15 100...

result:

points 1.0 points  1.0 correct 3022 queries

Test #2:

score: 100
Accepted
time: 83ms
memory: 3768kb

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:

? 46 67 71
? 12 29 54
? 71 74 82
? 11 90 98
? 5 97 98
? 63 77 95
? 24 77 87
? 54 68 84
? 3 6 13
? 21 60 93
? 18 30 32
? 7 65 92
? 28 51 63
? 7 24 83
? 70 80 83
? 21 42 46
? 17 25 60
? 43 73 78
? 33 40 100
? 4 5 59
? 40 48 89
? 53 65 84
? 24 67 86
? 3 49 92
? 26 78 80
? 22 46 48
? 45 71 90
? 4 15 100...

result:

points 1.0 points  1.0 correct 3022 queries

Test #3:

score: 100
Accepted
time: 71ms
memory: 3712kb

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:

? 9 49 97
? 26 54 70
? 14 28 71
? 54 68 72
? 1 42 70
? 17 49 97
? 11 26 47
? 4 35 91
? 42 56 100
? 27 65 84
? 6 76 84
? 9 29 66
? 35 51 74
? 14 27 75
? 68 79 81
? 2 16 28
? 19 38 41
? 65 80 96
? 52 79 89
? 7 53 58
? 10 33 42
? 13 26 75
? 61 63 86
? 60 74 89
? 6 38 56
? 8 17 23
? 26 44 63
? 11 33 42
...

result:

points 1.0 points  1.0 correct 3035 queries

Test #4:

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

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:

? 9 49 97
? 26 54 70
? 14 28 71
? 54 68 72
? 1 42 70
? 17 49 97
? 11 26 47
? 4 35 91
? 42 56 100
? 27 65 84
? 6 76 84
? 9 29 66
? 35 51 74
? 14 27 75
? 68 79 81
? 2 16 28
? 19 38 41
? 65 80 96
? 52 79 89
? 7 53 58
? 10 33 42
? 13 26 75
? 61 63 86
? 60 74 89
? 6 38 56
? 8 17 23
? 26 44 63
? 11 33 42
...

result:

points 1.0 points  1.0 correct 3036 queries

Test #5:

score: 100
Accepted
time: 72ms
memory: 3680kb

input:

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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 14 88 98
? 16 56 86
? 24 44 70
? 31 74 92
? 9 16 27
? 27 83 99
? 41 60 68
? 27 28 68
? 18 70 76
? 24 27 63
? 12 14 76
? 70 89 98
? 56 91 93
? 31 64 76
? 24 43 74
? 1 22 70
? 37 63 83
? 15 90 95
? 32 59 62
? 8 73 90
? 16 83 85
? 23 34 82
? 3 30 78
? 5 60 93
? 34 48 56
? 17 79 86
? 5 20 53
? 14 15 7...

result:

points 1.0 points  1.0 correct 3015 queries

Test #6:

score: 100
Accepted
time: 59ms
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
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
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:

? 14 88 98
? 16 56 86
? 24 44 70
? 31 74 92
? 9 16 27
? 27 83 99
? 41 60 68
? 27 28 68
? 18 70 76
? 24 27 63
? 12 14 76
? 70 89 98
? 56 91 93
? 31 64 76
? 24 43 74
? 1 22 70
? 37 63 83
? 15 90 95
? 32 59 62
? 8 73 90
? 16 83 85
? 23 34 82
? 3 30 78
? 5 60 93
? 34 48 56
? 17 79 86
? 5 20 53
? 14 15 7...

result:

points 1.0 points  1.0 correct 3020 queries

Test #7:

score: 97.9226
Acceptable Answer
time: 140ms
memory: 3772kb

input:

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

output:

? 24 56 74
? 9 19 96
? 5 56 74
? 13 53 59
? 34 40 50
? 20 72 93
? 42 67 83
? 2 16 80
? 28 33 65
? 32 85 99
? 21 24 61
? 28 56 94
? 13 36 50
? 25 60 62
? 10 14 51
? 15 22 81
? 60 63 64
? 26 79 94
? 11 63 80
? 7 94 95
? 7 57 66
? 32 63 93
? 26 27 29
? 3 42 75
? 12 55 86
? 21 36 93
? 56 58 80
? 34 58 7...

result:

points 0.97922580650 points  0.97922580650 correct 3446 queries

Test #8:

score: 93.4516
Acceptable Answer
time: 166ms
memory: 3588kb

input:

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

output:

? 24 56 74
? 9 19 96
? 5 56 74
? 13 53 59
? 34 40 50
? 20 72 93
? 42 67 83
? 2 16 80
? 28 33 65
? 32 85 99
? 21 24 61
? 28 56 94
? 13 36 50
? 25 60 62
? 10 14 51
? 15 22 81
? 60 63 64
? 26 79 94
? 11 63 80
? 7 94 95
? 7 57 66
? 32 63 93
? 26 27 29
? 3 42 75
? 12 55 86
? 21 36 93
? 56 58 80
? 34 58 7...

result:

points 0.9345161290 points  0.9345161290 correct 3545 queries

Test #9:

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

input:

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

output:

? 14 53 79
? 24 54 90
? 1 60 67
? 26 77 99
? 21 24 77
? 53 98 99
? 37 54 59
? 20 22 41
? 17 26 72
? 78 85 96
? 26 31 71
? 36 78 89
? 65 76 95
? 16 20 87
? 8 10 37
? 34 37 60
? 14 41 70
? 85 91 99
? 10 39 60
? 7 40 62
? 22 77 98
? 24 57 66
? 30 51 53
? 16 22 81
? 77 81 96
? 17 32 89
? 18 54 57
? 7 38...

result:

points 1.0 points  1.0 correct 3363 queries

Test #10:

score: 90.1548
Acceptable Answer
time: 156ms
memory: 3604kb

input:

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

output:

? 21 55 80
? 13 75 94
? 10 15 27
? 19 42 94
? 44 64 99
? 44 70 86
? 13 23 54
? 30 59 88
? 85 92 94
? 24 45 87
? 52 55 97
? 9 34 78
? 56 70 79
? 64 74 93
? 27 69 87
? 22 54 85
? 7 54 86
? 16 29 65
? 2 16 61
? 8 48 77
? 2 4 73
? 7 33 87
? 3 65 85
? 9 40 66
? 44 66 95
? 17 34 79
? 2 33 40
? 61 69 98
? ...

result:

points 0.90154838710 points  0.90154838710 correct 3618 queries

Test #11:

score: 91.5548
Acceptable Answer
time: 198ms
memory: 3672kb

input:

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

output:

? 21 55 80
? 13 75 94
? 10 15 27
? 19 42 94
? 44 64 99
? 44 70 86
? 13 23 54
? 30 59 88
? 85 92 94
? 24 45 87
? 52 55 97
? 9 34 78
? 56 70 79
? 64 74 93
? 27 69 87
? 22 54 85
? 7 54 86
? 16 29 65
? 2 16 61
? 8 48 77
? 2 4 73
? 7 33 87
? 3 65 85
? 9 40 66
? 44 66 95
? 17 34 79
? 2 33 40
? 61 69 98
? ...

result:

points 0.91554838710 points  0.91554838710 correct 3587 queries

Test #12:

score: 93.0903
Acceptable Answer
time: 184ms
memory: 3684kb

input:

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

output:

? 19 60 73
? 16 77 90
? 13 43 49
? 9 51 60
? 29 41 52
? 3 25 91
? 52 65 86
? 34 44 64
? 36 76 96
? 31 36 77
? 14 48 56
? 23 32 76
? 24 65 73
? 25 32 85
? 5 35 73
? 27 87 95
? 11 63 78
? 12 26 100
? 21 87 96
? 31 49 70
? 62 66 77
? 45 65 99
? 17 41 63
? 1 39 64
? 43 48 87
? 25 72 89
? 88 98 99
? 24 3...

result:

points 0.93090322580 points  0.93090322580 correct 3553 queries

Test #13:

score: 91.6
Acceptable Answer
time: 187ms
memory: 3520kb

input:

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

output:

? 27 58 71
? 4 6 73
? 11 20 77
? 15 54 82
? 7 86 96
? 25 43 85
? 22 28 85
? 41 86 95
? 71 72 91
? 38 58 98
? 47 68 95
? 25 40 52
? 2 28 80
? 33 68 99
? 29 75 80
? 13 18 51
? 60 86 87
? 72 81 87
? 4 14 27
? 11 49 61
? 30 60 86
? 22 32 84
? 23 64 84
? 14 43 63
? 48 69 94
? 11 19 28
? 22 57 92
? 9 37 7...

result:

points 0.9160 points  0.9160 correct 3586 queries

Test #14:

score: 91.2839
Acceptable Answer
time: 185ms
memory: 3784kb

input:

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

output:

? 27 58 71
? 4 6 73
? 11 20 77
? 15 54 82
? 7 86 96
? 25 43 85
? 22 28 85
? 41 86 95
? 71 72 91
? 38 58 98
? 47 68 95
? 25 40 52
? 2 28 80
? 33 68 99
? 29 75 80
? 13 18 51
? 60 86 87
? 72 81 87
? 4 14 27
? 11 49 61
? 30 60 86
? 22 32 84
? 23 64 84
? 14 43 63
? 48 69 94
? 11 19 28
? 22 57 92
? 9 37 7...

result:

points 0.91283870970 points  0.91283870970 correct 3593 queries

Test #15:

score: 90.7871
Acceptable Answer
time: 189ms
memory: 3596kb

input:

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

output:

? 9 37 68
? 13 24 86
? 58 70 75
? 16 29 91
? 31 35 56
? 10 90 94
? 4 13 26
? 6 69 83
? 40 61 71
? 22 77 100
? 6 8 41
? 26 83 95
? 1 5 7
? 16 43 85
? 29 31 40
? 13 38 85
? 3 50 93
? 13 32 80
? 2 37 52
? 3 78 98
? 19 36 63
? 45 60 82
? 37 49 88
? 33 55 89
? 24 32 85
? 9 12 50
? 4 50 58
? 41 42 83
? 20...

result:

points 0.90787096770 points  0.90787096770 correct 3604 queries

Test #16:

score: 90.0194
Acceptable Answer
time: 211ms
memory: 3608kb

input:

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

output:

? 48 50 57
? 16 61 91
? 29 53 100
? 41 53 78
? 26 46 93
? 2 76 99
? 24 33 94
? 24 64 65
? 16 42 59
? 65 81 98
? 28 33 59
? 39 71 84
? 3 75 77
? 25 72 92
? 26 42 97
? 71 72 75
? 47 50 88
? 11 46 92
? 58 94 99
? 78 80 90
? 54 61 66
? 16 46 48
? 10 22 71
? 2 19 47
? 18 90 95
? 5 69 89
? 2 19 51
? 32 62...

result:

points 0.90019354840 points  0.90019354840 correct 3621 queries

Test #17:

score: 89.5677
Acceptable Answer
time: 190ms
memory: 3528kb

input:

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

output:

? 48 50 57
? 16 61 91
? 29 53 100
? 41 53 78
? 26 46 93
? 2 76 99
? 24 33 94
? 24 64 65
? 16 42 59
? 65 81 98
? 28 33 59
? 39 71 84
? 3 75 77
? 25 72 92
? 26 42 97
? 71 72 75
? 47 50 88
? 11 46 92
? 58 94 99
? 78 80 90
? 54 61 66
? 16 46 48
? 10 22 71
? 2 19 47
? 18 90 95
? 5 69 89
? 2 19 51
? 32 62...

result:

points 0.89567741940 points  0.89567741940 correct 3631 queries

Test #18:

score: 91.329
Acceptable Answer
time: 206ms
memory: 3600kb

input:

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

output:

? 53 78 87
? 34 35 47
? 12 27 46
? 3 80 91
? 7 25 32
? 20 56 93
? 42 57 92
? 1 65 92
? 15 33 78
? 31 51 68
? 8 33 37
? 36 85 95
? 19 21 47
? 16 23 79
? 3 29 58
? 47 90 100
? 45 55 91
? 38 46 91
? 2 58 75
? 5 34 77
? 9 36 65
? 11 25 46
? 16 31 60
? 6 53 83
? 33 41 84
? 30 32 38
? 16 63 90
? 17 25 87
...

result:

points 0.91329032260 points  0.91329032260 correct 3592 queries

Test #19:

score: 92.5032
Acceptable Answer
time: 201ms
memory: 3604kb

input:

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

output:

? 29 67 94
? 42 75 81
? 36 85 100
? 2 22 54
? 61 83 89
? 44 50 54
? 24 38 44
? 40 44 78
? 14 67 80
? 54 65 86
? 48 53 58
? 28 84 85
? 22 36 68
? 10 29 53
? 30 44 97
? 20 73 97
? 12 49 86
? 30 80 81
? 34 46 94
? 32 33 55
? 36 38 60
? 20 57 81
? 7 89 97
? 27 46 94
? 17 42 56
? 8 45 91
? 30 54 72
? 62 ...

result:

points 0.92503225810 points  0.92503225810 correct 3566 queries

Test #20:

score: 91.5548
Acceptable Answer
time: 170ms
memory: 3776kb

input:

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

output:

? 29 67 94
? 42 75 81
? 36 85 100
? 2 22 54
? 61 83 89
? 44 50 54
? 24 38 44
? 40 44 78
? 14 67 80
? 54 65 86
? 48 53 58
? 28 84 85
? 22 36 68
? 10 29 53
? 30 44 97
? 20 73 97
? 12 49 86
? 30 80 81
? 34 46 94
? 32 33 55
? 36 38 60
? 20 57 81
? 7 89 97
? 27 46 94
? 17 42 56
? 8 45 91
? 30 54 72
? 62 ...

result:

points 0.91554838710 points  0.91554838710 correct 3587 queries