QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#126401#6668. Trokutihxhuoxinghx90.109677 216ms3764kbC++143.3kb2023-07-18 14:41:442023-07-18 14:41:49

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:49]
  • 评测
  • 测评结果:90.109677
  • 用时:216ms
  • 内存:3764kb
  • [2023-07-18 14:41:44]
  • 提交

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

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 90.1097
Acceptable Answer

Test #1:

score: 100
Accepted
time: 76ms
memory: 3672kb

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:

? 18 49 80
? 35 67 77
? 7 26 93
? 21 44 62
? 14 38 77
? 26 78 96
? 34 51 57
? 40 53 81
? 29 67 71
? 37 38 58
? 30 64 71
? 2 7 48
? 10 13 19
? 8 47 50
? 21 73 97
? 50 71 91
? 57 92 93
? 9 49 74
? 28 40 54
? 11 16 63
? 27 38 52
? 3 34 46
? 5 46 50
? 25 47 74
? 26 95 96
? 18 52 85
? 13 18 77
? 9 50 92
...

result:

points 1.0 points  1.0 correct 2990 queries

Test #2:

score: 100
Accepted
time: 53ms
memory: 3580kb

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:

? 43 66 78
? 75 77 89
? 30 81 88
? 8 50 66
? 70 83 93
? 28 39 58
? 31 43 96
? 15 21 22
? 17 63 88
? 13 27 44
? 30 73 92
? 19 34 49
? 48 60 82
? 8 47 99
? 39 49 90
? 52 73 79
? 47 72 73
? 2 13 83
? 7 56 67
? 8 42 96
? 1 41 66
? 66 87 100
? 73 77 100
? 14 21 54
? 51 79 83
? 34 76 77
? 15 57 62
? 68 74...

result:

points 1.0 points  1.0 correct 2992 queries

Test #3:

score: 100
Accepted
time: 84ms
memory: 3748kb

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:

? 43 66 78
? 75 77 89
? 30 81 88
? 8 50 66
? 70 83 93
? 28 39 58
? 31 43 96
? 15 21 22
? 17 63 88
? 13 27 44
? 30 73 92
? 19 34 49
? 48 60 82
? 8 47 99
? 39 49 90
? 52 73 79
? 47 72 73
? 2 13 83
? 7 56 67
? 8 42 96
? 1 41 66
? 66 87 100
? 73 77 100
? 14 21 54
? 51 79 83
? 34 76 77
? 15 57 62
? 68 74...

result:

points 1.0 points  1.0 correct 2993 queries

Test #4:

score: 100
Accepted
time: 78ms
memory: 3516kb

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 73 87
? 5 12 60
? 19 46 72
? 3 24 62
? 41 67 88
? 7 26 94
? 11 30 49
? 55 65 90
? 11 54 91
? 36 53 56
? 42 46 81
? 5 18 93
? 16 51 74
? 5 40 45
? 55 83 93
? 31 39 65
? 48 54 68
? 1 22 96
? 51 64 87
? 8 20 80
? 24 46 84
? 63 86 90
? 20 42 95
? 2 38 39
? 77 85 92
? 9 32 44
? 14 17 84
? 10 89 100
...

result:

points 1.0 points  1.0 correct 3036 queries

Test #5:

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

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
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
0
0
0
0
0
0
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 73 87
? 5 12 60
? 19 46 72
? 3 24 62
? 41 67 88
? 7 26 94
? 11 30 49
? 55 65 90
? 11 54 91
? 36 53 56
? 42 46 81
? 5 18 93
? 16 51 74
? 5 40 45
? 55 83 93
? 31 39 65
? 48 54 68
? 1 22 96
? 51 64 87
? 8 20 80
? 24 46 84
? 63 86 90
? 20 42 95
? 2 38 39
? 77 85 92
? 9 32 44
? 14 17 84
? 10 89 100
...

result:

points 1.0 points  1.0 correct 3043 queries

Test #6:

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

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 29 73
? 6 18 74
? 4 81 85
? 51 87 97
? 18 37 86
? 17 40 94
? 20 47 66
? 28 52 91
? 6 70 84
? 15 78 89
? 13 48 53
? 6 31 33
? 6 61 67
? 54 57 86
? 42 88 95
? 10 57 88
? 8 56 96
? 35 50 61
? 19 64 71
? 11 69 85
? 24 37 98
? 6 21 98
? 26 55 72
? 11 15 77
? 18 23 50
? 6 17 27
? 1 5 34
? 14 64 69
? ...

result:

points 1.0 points  1.0 correct 3041 queries

Test #7:

score: 95.3935
Acceptable Answer
time: 170ms
memory: 3568kb

input:

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

output:

? 19 29 73
? 6 18 74
? 4 81 85
? 51 87 97
? 18 37 86
? 17 40 94
? 20 47 66
? 28 52 91
? 6 70 84
? 15 78 89
? 13 48 53
? 6 31 33
? 6 61 67
? 54 57 86
? 42 88 95
? 10 57 88
? 8 56 96
? 35 50 61
? 19 64 71
? 11 69 85
? 24 37 98
? 6 21 98
? 26 55 72
? 11 15 77
? 18 23 50
? 6 17 27
? 1 5 34
? 14 64 69
? ...

result:

points 0.95393548390 points  0.95393548390 correct 3502 queries

Test #8:

score: 93.271
Acceptable Answer
time: 147ms
memory: 3672kb

input:

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

output:

? 36 45 65
? 45 58 98
? 79 85 98
? 8 55 61
? 66 85 93
? 3 30 91
? 19 35 85
? 64 75 87
? 31 87 89
? 41 42 57
? 21 28 69
? 65 72 78
? 62 63 69
? 40 67 99
? 21 69 83
? 5 73 87
? 13 59 68
? 9 45 51
? 8 27 50
? 67 70 80
? 10 34 94
? 17 47 72
? 38 46 85
? 11 36 37
? 57 70 77
? 13 42 97
? 32 83 100
? 47 92...

result:

points 0.93270967740 points  0.93270967740 correct 3549 queries

Test #9:

score: 100
Accepted
time: 117ms
memory: 3588kb

input:

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

output:

? 18 46 71
? 3 19 53
? 2 35 59
? 10 18 88
? 68 90 98
? 40 50 62
? 61 72 82
? 27 48 85
? 13 40 54
? 23 57 58
? 12 41 80
? 32 46 99
? 53 59 85
? 15 19 46
? 13 64 88
? 29 62 77
? 58 69 85
? 6 63 81
? 17 45 75
? 22 54 84
? 33 45 96
? 37 41 64
? 36 46 100
? 60 70 94
? 23 58 91
? 3 38 99
? 9 16 58
? 14 38...

result:

points 1.0 points  1.0 correct 3365 queries

Test #10:

score: 91.9161
Acceptable Answer
time: 133ms
memory: 3724kb

input:

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

output:

? 18 46 71
? 3 19 53
? 2 35 59
? 10 18 88
? 68 90 98
? 40 50 62
? 61 72 82
? 27 48 85
? 13 40 54
? 23 57 58
? 12 41 80
? 32 46 99
? 53 59 85
? 15 19 46
? 13 64 88
? 29 62 77
? 58 69 85
? 6 63 81
? 17 45 75
? 22 54 84
? 33 45 96
? 37 41 64
? 36 46 100
? 60 70 94
? 23 58 91
? 3 38 99
? 9 16 58
? 14 38...

result:

points 0.91916129030 points  0.91916129030 correct 3579 queries

Test #11:

score: 92.0516
Acceptable Answer
time: 179ms
memory: 3592kb

input:

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

output:

? 9 74 94
? 36 58 87
? 33 34 41
? 27 41 50
? 6 94 98
? 34 63 81
? 4 34 64
? 44 47 91
? 7 66 94
? 39 62 84
? 45 53 55
? 78 80 93
? 35 73 78
? 18 19 99
? 4 20 68
? 13 30 84
? 40 47 93
? 32 36 83
? 29 79 94
? 30 67 96
? 57 71 74
? 11 48 53
? 25 34 56
? 4 24 33
? 24 51 79
? 36 63 70
? 34 54 99
? 44 66 8...

result:

points 0.9205161290 points  0.9205161290 correct 3576 queries

Test #12:

score: 91.6903
Acceptable Answer
time: 175ms
memory: 3692kb

input:

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

output:

? 9 74 94
? 36 58 87
? 33 34 41
? 27 41 50
? 6 94 98
? 34 63 81
? 4 34 64
? 44 47 91
? 7 66 94
? 39 62 84
? 45 53 55
? 78 80 93
? 35 73 78
? 18 19 99
? 4 20 68
? 13 30 84
? 40 47 93
? 32 36 83
? 29 79 94
? 30 67 96
? 57 71 74
? 11 48 53
? 25 34 56
? 4 24 33
? 24 51 79
? 36 63 70
? 34 54 99
? 44 66 8...

result:

points 0.91690322580 points  0.91690322580 correct 3584 queries

Test #13:

score: 90.471
Acceptable Answer
time: 191ms
memory: 3680kb

input:

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

output:

? 12 33 91
? 11 79 98
? 14 48 89
? 70 85 86
? 38 39 52
? 4 52 62
? 13 51 94
? 4 5 54
? 52 70 98
? 9 77 84
? 19 33 67
? 21 54 97
? 1 27 34
? 39 55 67
? 7 51 77
? 58 80 88
? 1 4 83
? 39 57 66
? 69 79 90
? 26 55 66
? 10 26 73
? 21 30 44
? 15 50 99
? 50 66 70
? 40 68 76
? 8 16 85
? 8 48 88
? 73 82 97
? ...

result:

points 0.90470967740 points  0.90470967740 correct 3611 queries

Test #14:

score: 90.6065
Acceptable Answer
time: 189ms
memory: 3692kb

input:

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

output:

? 14 39 61
? 14 28 77
? 31 85 91
? 61 89 99
? 5 21 27
? 35 46 56
? 19 36 57
? 1 50 88
? 14 30 92
? 17 67 94
? 16 31 84
? 10 28 60
? 41 92 97
? 52 83 85
? 31 57 82
? 2 38 65
? 72 73 93
? 22 28 73
? 15 64 87
? 80 82 97
? 16 65 97
? 27 47 77
? 17 23 57
? 48 59 100
? 15 33 52
? 68 70 82
? 14 40 98
? 12 ...

result:

points 0.90606451610 points  0.90606451610 correct 3608 queries

Test #15:

score: 91.871
Acceptable Answer
time: 184ms
memory: 3764kb

input:

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

output:

? 14 39 61
? 14 28 77
? 31 85 91
? 61 89 99
? 5 21 27
? 35 46 56
? 19 36 57
? 1 50 88
? 14 30 92
? 17 67 94
? 16 31 84
? 10 28 60
? 41 92 97
? 52 83 85
? 31 57 82
? 2 38 65
? 72 73 93
? 22 28 73
? 15 64 87
? 80 82 97
? 16 65 97
? 27 47 77
? 17 23 57
? 48 59 100
? 15 33 52
? 68 70 82
? 14 40 98
? 12 ...

result:

points 0.91870967740 points  0.91870967740 correct 3580 queries

Test #16:

score: 90.8323
Acceptable Answer
time: 216ms
memory: 3680kb

input:

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

output:

? 6 67 86
? 34 39 41
? 25 77 81
? 20 34 67
? 3 4 17
? 5 21 97
? 13 17 48
? 15 79 90
? 9 56 72
? 27 28 93
? 34 60 85
? 17 24 36
? 54 89 100
? 9 33 91
? 17 50 73
? 14 45 65
? 19 57 64
? 43 87 98
? 3 54 70
? 9 29 49
? 40 53 82
? 27 57 89
? 5 33 56
? 41 89 93
? 36 66 90
? 3 4 10
? 19 69 73
? 16 60 84
? ...

result:

points 0.90832258060 points  0.90832258060 correct 3603 queries

Test #17:

score: 90.1097
Acceptable Answer
time: 176ms
memory: 3700kb

input:

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

output:

? 23 56 72
? 61 72 85
? 12 17 68
? 10 36 54
? 8 14 26
? 31 33 69
? 48 54 56
? 3 8 39
? 46 89 96
? 59 66 100
? 43 61 73
? 10 29 44
? 7 16 90
? 3 41 43
? 71 76 86
? 42 61 84
? 31 50 96
? 36 42 56
? 7 28 53
? 26 38 67
? 21 33 47
? 28 36 94
? 9 22 90
? 13 49 75
? 24 35 61
? 54 95 99
? 1 34 44
? 32 42 64...

result:

points 0.90109677420 points  0.90109677420 correct 3619 queries

Test #18:

score: 91.1032
Acceptable Answer
time: 182ms
memory: 3608kb

input:

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

output:

? 23 56 72
? 61 72 85
? 12 17 68
? 10 36 54
? 8 14 26
? 31 33 69
? 48 54 56
? 3 8 39
? 46 89 96
? 59 66 100
? 43 61 73
? 10 29 44
? 7 16 90
? 3 41 43
? 71 76 86
? 42 61 84
? 31 50 96
? 36 42 56
? 7 28 53
? 26 38 67
? 21 33 47
? 28 36 94
? 9 22 90
? 13 49 75
? 24 35 61
? 54 95 99
? 1 34 44
? 32 42 64...

result:

points 0.91103225810 points  0.91103225810 correct 3597 queries

Test #19:

score: 91.9161
Acceptable Answer
time: 187ms
memory: 3696kb

input:

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

output:

? 34 42 94
? 29 91 99
? 14 69 97
? 31 50 71
? 50 51 95
? 15 22 39
? 58 74 89
? 23 32 96
? 4 16 49
? 6 40 44
? 9 85 91
? 54 65 90
? 10 45 79
? 41 59 61
? 9 10 12
? 1 30 58
? 41 56 73
? 36 39 82
? 37 42 56
? 37 71 76
? 22 29 36
? 38 71 90
? 12 34 68
? 22 26 29
? 38 80 89
? 41 47 90
? 22 31 71
? 18 29 ...

result:

points 0.91916129030 points  0.91916129030 correct 3579 queries

Test #20:

score: 92.1871
Acceptable Answer
time: 193ms
memory: 3588kb

input:

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

output:

? 48 59 62
? 59 67 85
? 24 86 97
? 51 57 95
? 31 45 98
? 31 58 87
? 3 8 57
? 18 20 58
? 30 64 91
? 2 55 75
? 13 50 94
? 49 56 68
? 14 45 53
? 47 53 89
? 44 91 97
? 21 26 35
? 33 78 89
? 2 9 34
? 44 51 84
? 53 58 59
? 13 52 54
? 26 59 73
? 24 25 26
? 12 23 71
? 2 18 75
? 24 74 95
? 10 51 79
? 36 80 9...

result:

points 0.92187096770 points  0.92187096770 correct 3573 queries