QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#126190#6668. Trokutihxhuoxinghx89.477419 124ms3776kbC++143.9kb2023-07-18 11:06:332023-07-18 11:06:37

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:06:37]
  • 评测
  • 测评结果:89.477419
  • 用时:124ms
  • 内存:3776kb
  • [2023-07-18 11:06:33]
  • 提交

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;
			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;
	}
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 89.4774
Acceptable Answer

Test #1:

score: 100
Accepted
time: 39ms
memory: 3584kb

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:

? 19 34 86
? 6 25 51
? 35 41 73
? 14 38 42
? 42 47 63
? 68 70 79
? 9 13 40
? 14 22 53
? 4 58 63
? 16 37 94
? 18 32 86
? 8 51 91
? 2 15 43
? 29 36 94
? 22 31 51
? 29 70 91
? 7 30 78
? 20 35 44
? 47 92 93
? 7 28 62
? 45 53 99
? 48 84 90
? 1 43 56
? 84 85 94
? 6 73 76
? 4 23 48
? 10 30 92
? 64 70 81
? ...

result:

points 1.0 points  1.0 correct 2986 queries

Test #2:

score: 100
Accepted
time: 61ms
memory: 3512kb

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:

? 19 34 86
? 6 25 51
? 35 41 73
? 14 38 42
? 42 47 63
? 68 70 79
? 9 13 40
? 14 22 53
? 4 58 63
? 16 37 94
? 18 32 86
? 8 51 91
? 2 15 43
? 29 36 94
? 22 31 51
? 29 70 91
? 7 30 78
? 20 35 44
? 47 92 93
? 7 28 62
? 45 53 99
? 48 84 90
? 1 43 56
? 84 85 94
? 6 73 76
? 4 23 48
? 10 30 92
? 64 70 81
? ...

result:

points 1.0 points  1.0 correct 2986 queries

Test #3:

score: 100
Accepted
time: 46ms
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:

? 1 12 60
? 7 81 88
? 28 78 87
? 34 44 88
? 32 91 92
? 30 59 88
? 10 43 83
? 2 5 52
? 36 55 90
? 11 48 91
? 62 74 96
? 42 45 83
? 3 62 80
? 24 32 95
? 20 66 86
? 3 47 97
? 47 52 82
? 4 36 37
? 27 91 99
? 38 72 88
? 33 69 81
? 60 68 71
? 35 55 81
? 26 76 100
? 13 28 98
? 61 70 79
? 4 22 60
? 25 48 50...

result:

points 1.0 points  1.0 correct 2989 queries

Test #4:

score: 100
Accepted
time: 39ms
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
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
...

output:

? 1 12 60
? 7 81 88
? 28 78 87
? 34 44 88
? 32 91 92
? 30 59 88
? 10 43 83
? 2 5 52
? 36 55 90
? 11 48 91
? 62 74 96
? 42 45 83
? 3 62 80
? 24 32 95
? 20 66 86
? 3 47 97
? 47 52 82
? 4 36 37
? 27 91 99
? 38 72 88
? 33 69 81
? 60 68 71
? 35 55 81
? 26 76 100
? 13 28 98
? 61 70 79
? 4 22 60
? 25 48 50...

result:

points 1.0 points  1.0 correct 2990 queries

Test #5:

score: 100
Accepted
time: 37ms
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
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
...

output:

? 41 74 89
? 1 52 91
? 18 27 75
? 26 38 87
? 11 12 25
? 23 69 89
? 7 24 80
? 27 30 36
? 11 19 62
? 59 60 100
? 41 52 99
? 3 14 90
? 15 68 77
? 54 66 84
? 30 61 65
? 18 85 86
? 17 60 94
? 18 52 72
? 22 33 47
? 9 21 43
? 14 69 93
? 72 79 82
? 1 45 75
? 3 28 55
? 69 71 89
? 7 26 50
? 19 75 85
? 12 27 5...

result:

points 1.0 points  1.0 correct 3040 queries

Test #6:

score: 100
Accepted
time: 49ms
memory: 3664kb

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
2
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
...

output:

? 41 74 89
? 1 52 91
? 18 27 75
? 26 38 87
? 11 12 25
? 23 69 89
? 7 24 80
? 27 30 36
? 11 19 62
? 59 60 100
? 41 52 99
? 3 14 90
? 15 68 77
? 54 66 84
? 30 61 65
? 18 85 86
? 17 60 94
? 18 52 72
? 22 33 47
? 9 21 43
? 14 69 93
? 72 79 82
? 1 45 75
? 3 28 55
? 69 71 89
? 7 26 50
? 19 75 85
? 12 27 5...

result:

points 1.0 points  1.0 correct 3038 queries

Test #7:

score: 97.4258
Acceptable Answer
time: 89ms
memory: 3696kb

input:

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

output:

? 14 17 49
? 73 89 95
? 6 51 59
? 17 58 70
? 2 74 78
? 7 12 29
? 67 71 99
? 47 49 78
? 2 42 80
? 19 70 79
? 19 61 86
? 31 63 98
? 8 72 99
? 76 77 98
? 39 56 78
? 9 22 59
? 21 57 86
? 39 57 62
? 36 69 83
? 6 20 29
? 24 45 55
? 4 37 75
? 12 51 73
? 23 40 100
? 18 38 72
? 27 28 98
? 1 35 84
? 21 40 73
...

result:

points 0.97425806450 points  0.97425806450 correct 3457 queries

Test #8:

score: 93.9935
Acceptable Answer
time: 86ms
memory: 3704kb

input:

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

output:

? 14 17 49
? 73 89 95
? 6 51 59
? 17 58 70
? 2 74 78
? 7 12 29
? 67 71 99
? 47 49 78
? 2 42 80
? 19 70 79
? 19 61 86
? 31 63 98
? 8 72 99
? 76 77 98
? 39 56 78
? 9 22 59
? 21 57 86
? 39 57 62
? 36 69 83
? 6 20 29
? 24 45 55
? 4 37 75
? 12 51 73
? 23 40 100
? 18 38 72
? 27 28 98
? 1 35 84
? 21 40 73
...

result:

points 0.93993548390 points  0.93993548390 correct 3533 queries

Test #9:

score: 100
Accepted
time: 49ms
memory: 3776kb

input:

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

output:

? 30 38 65
? 16 77 91
? 27 57 79
? 4 29 53
? 18 49 62
? 37 58 93
? 4 57 71
? 49 95 100
? 50 66 87
? 86 92 95
? 16 29 30
? 6 45 93
? 1 22 84
? 12 52 57
? 4 18 60
? 5 6 73
? 30 60 63
? 9 52 59
? 8 52 95
? 18 41 51
? 21 55 80
? 66 70 77
? 27 29 39
? 11 85 90
? 22 45 54
? 18 34 60
? 22 90 99
? 30 49 51
...

result:

points 1.0 points  1.0 correct 3345 queries

Test #10:

score: 90.7419
Acceptable Answer
time: 97ms
memory: 3720kb

input:

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

output:

? 30 38 65
? 16 77 91
? 27 57 79
? 4 29 53
? 18 49 62
? 37 58 93
? 4 57 71
? 49 95 100
? 50 66 87
? 86 92 95
? 16 29 30
? 6 45 93
? 1 22 84
? 12 52 57
? 4 18 60
? 5 6 73
? 30 60 63
? 9 52 59
? 8 52 95
? 18 41 51
? 21 55 80
? 66 70 77
? 27 29 39
? 11 85 90
? 22 45 54
? 18 34 60
? 22 90 99
? 30 49 51
...

result:

points 0.90741935480 points  0.90741935480 correct 3605 queries

Test #11:

score: 91.2387
Acceptable Answer
time: 88ms
memory: 3760kb

input:

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

output:

? 22 23 43
? 53 81 99
? 92 94 97
? 61 72 89
? 14 80 96
? 43 62 92
? 17 75 80
? 19 46 78
? 16 20 86
? 21 46 97
? 4 20 63
? 14 25 52
? 30 43 59
? 19 26 67
? 14 33 98
? 9 24 40
? 20 22 51
? 49 69 91
? 3 83 85
? 38 56 75
? 8 62 90
? 2 3 43
? 20 61 68
? 65 79 86
? 5 11 94
? 68 76 87
? 10 24 37
? 39 44 52...

result:

points 0.91238709680 points  0.91238709680 correct 3594 queries

Test #12:

score: 90.9677
Acceptable Answer
time: 112ms
memory: 3672kb

input:

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

output:

? 22 23 43
? 53 81 99
? 92 94 97
? 61 72 89
? 14 80 96
? 43 62 92
? 17 75 80
? 19 46 78
? 16 20 86
? 21 46 97
? 4 20 63
? 14 25 52
? 30 43 59
? 19 26 67
? 14 33 98
? 9 24 40
? 20 22 51
? 49 69 91
? 3 83 85
? 38 56 75
? 8 62 90
? 2 3 43
? 20 61 68
? 65 79 86
? 5 11 94
? 68 76 87
? 10 24 37
? 39 44 52...

result:

points 0.90967741940 points  0.90967741940 correct 3600 queries

Test #13:

score: 89.4774
Acceptable Answer
time: 124ms
memory: 3696kb

input:

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

output:

? 26 38 59
? 23 49 84
? 65 72 79
? 26 37 44
? 42 43 98
? 28 62 74
? 4 24 28
? 10 74 100
? 15 43 82
? 1 68 81
? 19 45 60
? 8 60 68
? 38 44 91
? 8 28 33
? 25 33 74
? 4 75 88
? 15 27 49
? 14 52 100
? 8 13 66
? 19 40 47
? 10 30 66
? 10 18 89
? 27 29 61
? 20 59 68
? 47 52 85
? 23 27 72
? 26 27 86
? 4 30 ...

result:

points 0.89477419350 points  0.89477419350 correct 3633 queries

Test #14:

score: 92.0968
Acceptable Answer
time: 116ms
memory: 3748kb

input:

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

output:

? 1 8 96
? 55 58 92
? 18 81 88
? 30 32 75
? 28 65 73
? 4 83 93
? 31 57 64
? 9 51 59
? 23 60 76
? 8 66 76
? 17 19 73
? 27 88 97
? 55 66 98
? 36 70 72
? 53 99 100
? 43 78 82
? 33 59 90
? 9 64 99
? 1 85 97
? 69 71 92
? 9 59 95
? 13 56 57
? 27 34 63
? 39 77 98
? 68 71 97
? 29 30 100
? 20 38 63
? 69 70 8...

result:

points 0.92096774190 points  0.92096774190 correct 3575 queries

Test #15:

score: 89.8839
Acceptable Answer
time: 119ms
memory: 3592kb

input:

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

output:

? 1 8 96
? 55 58 92
? 18 81 88
? 30 32 75
? 28 65 73
? 4 83 93
? 31 57 64
? 9 51 59
? 23 60 76
? 8 66 76
? 17 19 73
? 27 88 97
? 55 66 98
? 36 70 72
? 53 99 100
? 43 78 82
? 33 59 90
? 9 64 99
? 1 85 97
? 69 71 92
? 9 59 95
? 13 56 57
? 27 34 63
? 39 77 98
? 68 71 97
? 29 30 100
? 20 38 63
? 69 70 8...

result:

points 0.89883870970 points  0.89883870970 correct 3624 queries

Test #16:

score: 91.7355
Acceptable Answer
time: 89ms
memory: 3776kb

input:

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

output:

? 33 35 41
? 45 61 78
? 25 45 81
? 8 63 86
? 77 80 92
? 23 65 73
? 19 61 63
? 6 52 89
? 12 31 77
? 27 70 94
? 28 67 99
? 24 27 83
? 4 13 21
? 6 18 93
? 13 28 72
? 28 84 100
? 35 68 70
? 17 44 75
? 38 70 86
? 32 36 37
? 11 15 19
? 31 70 87
? 7 23 39
? 64 74 88
? 1 11 12
? 46 52 76
? 21 55 80
? 23 47 ...

result:

points 0.91735483870 points  0.91735483870 correct 3583 queries

Test #17:

score: 91.6
Acceptable Answer
time: 89ms
memory: 3612kb

input:

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

output:

? 33 35 41
? 45 61 78
? 25 45 81
? 8 63 86
? 77 80 92
? 23 65 73
? 19 61 63
? 6 52 89
? 12 31 77
? 27 70 94
? 28 67 99
? 24 27 83
? 4 13 21
? 6 18 93
? 13 28 72
? 28 84 100
? 35 68 70
? 17 44 75
? 38 70 86
? 32 36 37
? 11 15 19
? 31 70 87
? 7 23 39
? 64 74 88
? 1 11 12
? 46 52 76
? 21 55 80
? 23 47 ...

result:

points 0.9160 points  0.9160 correct 3586 queries

Test #18:

score: 91.871
Acceptable Answer
time: 98ms
memory: 3676kb

input:

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

output:

? 45 52 81
? 6 13 40
? 6 98 100
? 85 87 92
? 19 31 62
? 21 34 54
? 1 24 95
? 53 63 84
? 3 37 71
? 3 66 71
? 7 10 78
? 1 10 12
? 18 22 50
? 21 54 94
? 7 55 72
? 88 89 93
? 39 40 94
? 2 18 44
? 1 33 56
? 21 23 55
? 25 32 82
? 31 41 82
? 62 84 95
? 12 34 77
? 17 40 83
? 22 28 40
? 13 22 84
? 23 57 91
?...

result:

points 0.91870967740 points  0.91870967740 correct 3580 queries

Test #19:

score: 91.1484
Acceptable Answer
time: 108ms
memory: 3524kb

input:

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

output:

? 47 73 75
? 71 76 81
? 58 85 96
? 6 9 51
? 13 60 92
? 35 82 91
? 4 63 73
? 2 26 39
? 1 10 31
? 51 74 75
? 23 48 72
? 22 42 55
? 13 26 97
? 18 28 45
? 40 53 77
? 63 82 96
? 26 30 85
? 2 62 64
? 16 45 56
? 19 65 89
? 16 18 60
? 40 53 90
? 45 79 88
? 32 57 58
? 26 36 98
? 31 54 84
? 13 16 17
? 29 42 6...

result:

points 0.9114838710 points  0.9114838710 correct 3596 queries

Test #20:

score: 91.329
Acceptable Answer
time: 93ms
memory: 3516kb

input:

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

output:

? 47 73 75
? 71 76 81
? 58 85 96
? 6 9 51
? 13 60 92
? 35 82 91
? 4 63 73
? 2 26 39
? 1 10 31
? 51 74 75
? 23 48 72
? 22 42 55
? 13 26 97
? 18 28 45
? 40 53 77
? 63 82 96
? 26 30 85
? 2 62 64
? 16 45 56
? 19 65 89
? 16 18 60
? 40 53 90
? 45 79 88
? 32 57 58
? 26 36 98
? 31 54 84
? 13 16 17
? 29 42 6...

result:

points 0.91329032260 points  0.91329032260 correct 3592 queries