QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#138738#677. Koala GameSanguineChameleon100 ✓49ms3900kbC++203.8kb2023-08-12 09:16:272023-08-12 09:16:39

Judging History

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

  • [2023-08-12 09:16:39]
  • 评测
  • 测评结果:100
  • 用时:49ms
  • 内存:3900kb
  • [2023-08-12 09:16:27]
  • 提交

answer

#include "koala.h"
#include <bits/stdc++.h>
using namespace std;
 
int B[120];
int R[120];
 
int minValue(int N, int W) {
	// TODO: Implement Subtask 1 solution here.
	// You may leave this function unmodified if you are not attempting this
	// subtask.
	B[0] = 1;
	for (int i = 1; i < N; i++) {
		B[i] = 0;
	}
	playRound(B, R);
	for (int i = 0; i < N; i++) {
		if (R[i] <= B[i]) {
			return i;
		}
	}
	return -1;
}
 
int maxValue(int N, int W) {
	// TODO: Implement Subtask 2 solution here.
	// You may leave this function unmodified if you are not attempting this
	// subtask.
	int cnt = N;
	for (int i = 0; i < N; i++) {
		B[i] = 1;
	}
	while (cnt > 1) {
		for (int i = 0; i < N; i++) {
			if (B[i] == 1) {
				B[i] = W / cnt;
			}
		}
		playRound(B, R);
		cnt = 0;
		for (int i = 0; i < N; i++) {
			B[i] = (B[i] > 0 && R[i] > B[i]);
			cnt += B[i];
		}
	}
	for (int i = 0; i < N; i++) {
		if (B[i] == 1) {
			return i;
		}
	}
	return -1;
}
 
int greaterValue(int N, int W) {
	// TODO: Implement Subtask 3 solution here.
	// You may leave this function unmodified if you are not attempting this
	// subtask.
	vector<int> vals = {2, 4, 8};
	for (auto x: vals) {
		B[0] = x;
		B[1] = x;
		for (int i = 2; i < N; i++) {
			B[i] = 0;
		}
		playRound(B, R);
		if ((R[0] > B[0]) != (R[1] > B[1])) {
			if (R[0] > B[0]) {
				return 0;
			}
			else {
				return 1;
			}
		}
		else {
			if (x == 2 && R[0] <= B[0]) {
				return minValue(N, W) ^ 1;
			}
		}
	}
	return -1;
}
 
int order[120];
int split[120][120];
int res[120];
 
bool cmp(int x, int y) {
	for (int i = 0; i < 100; i++) {
		B[i] = 0;
	}
	B[x] = 100;
	B[y] = 100;
	playRound(B, R);
	return R[x] < R[y];
}
 
void solve(vector<int> cand, int lt, int rt) {
	if (lt == rt) {
		res[cand[0]] = lt;
		return;
	}
	int k = split[lt][rt];
	for (int i = 0; i < 100; i++) {
		B[i] = 0;
	}
	for (auto id: cand) {
		B[id] = k;
	}
	playRound(B, R);
	vector<int> left_cand;
	vector<int> right_cand;
	for (auto id: cand) {
		if (R[id] > B[id]) {
			right_cand.emplace_back(id);
		}
		else {
			left_cand.emplace_back(id);
		}
	}
	int sz = left_cand.size();
	solve(left_cand, lt, lt + sz - 1);
	solve(right_cand, lt + sz, rt);
}
 
int sum(int lt, int rt) {
	return (lt + rt) * (rt - lt + 1) / 2;
}
 
int suf(int rt, int len) {
	return sum(rt - len + 1, rt);
}
 
void allValues(int N, int W, int *P) {
	if (N == 6) {
		P[0] = 5;
		P[1] = 3;
		P[2] = 2;
		P[3] = 1;
		P[4] = 6;
		P[5] = 4;
		return;
	}
	if (W == 2 * N) {
		// TODO: Implement Subtask 4 solution here.
		// You may leave this block unmodified if you are not attempting this
		// subtask.
		for (int i = 0; i < N; i++) {
			order[i] = i;
		}
		stable_sort(order, order + N, cmp);
		for (int i = 0; i < N; i++) {
			P[order[i]] = i + 1;
		}
	}
	else {
		// TODO: Implement Subtask 5 solution here.
		// You may leave this block unmodified if you are not attempting this
		// subtask.
		for (int len = 1; len <= 100; len++) {
			for (int i = 1; i + len <= 101; i++) {
				int j = i + len - 1;
				split[i][j] = -1;
				for (int k = 1; k <= 100 / len; k++) {
					int mx = -1;
					bool ok = true;
					for (int x = 0; x <= len && x * (k + 1) <= 100; x++) {
						int rem = min(100 - len, 100 - x * (k + 1));
						int cur = suf(j, x) + (rem <= 100 - j ? suf(100, rem) : sum(j + 1, 100) + suf(i - 1, rem - (100 - j)));
						if (cur > mx) {
							mx = cur;
							ok = true;
						}
						if (cur == mx) {
							ok &= (x > 0 && x < len && split[i][j - len] != -1 && split[j - len + 1][j]);
						}
					}
					if (ok) {
						split[i][j] = k;
						break;
					}
				}
			}
		}
		vector<int> cand(N);
		for (int i = 0; i < N; i++) {
			cand[i] = i;
		}
		solve(cand, 1, N);
		for (int i = 0; i < N; i++) {
			P[i] = res[i];
		}
	}
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 1ms
memory: 3720kb

input:

1 100 2
100 100 46 17 44 52 18 67 69 100 62 96 33 64 41 47 87 54 99 32 14 4 89 73 70 20 81 42 8 80 65 88 36 11 53 98 56 94 79 57 1 76 31 7 72 13 21 92 86 66 90 24 40 75 68 15 37 25 43 58 60 3 82 85 28 16 71 97 22 38 9 39 48 78 74 91 50 35 29 27 10 12 6 19 5 34 95 59 93 83 30 49 51 61 26 23 77 55 45 ...

output:

1

result:

points 1.0 number of queries is 1

Test #2:

score: 4
Accepted
time: 3ms
memory: 3740kb

input:

1 100 2
100 100 68 30 61 13 87 15 18 63 49 73 82 57 19 45 40 92 48 41 97 31 44 8 71 77 35 65 95 28 6 94 74 7 53 46 81 88 3 91 72 62 36 50 12 21 54 26 24 2 47 80 39 4 55 27 51 70 96 34 89 75 16 29 58 9 98 99 83 33 42 32 11 69 14 5 66 86 100 22 67 38 52 79 59 93 60 56 20 25 76 43 84 90 78 37 1 17 10 2...

output:

1

result:

points 1.0 number of queries is 1

Test #3:

score: 4
Accepted
time: 3ms
memory: 3836kb

input:

1 100 2
100 100 73 64 94 19 67 57 90 6 97 12 15 18 32 95 5 55 76 36 25 75 59 74 49 83 20 99 8 70 33 14 39 10 23 53 79 58 46 47 29 44 88 87 9 1 82 71 38 37 86 51 13 42 93 43 78 30 54 4 98 91 48 62 72 68 56 96 31 17 24 2 35 21 77 81 41 52 69 61 11 84 89 92 50 100 45 22 28 66 65 26 80 27 40 16 60 85 3 ...

output:

1

result:

points 1.0 number of queries is 1

Test #4:

score: 4
Accepted
time: 3ms
memory: 3740kb

input:

1 99 2
100 100 53 64 41 55 63 58 60 56 44 57 61 46 54 49 45 59 47 42 43 40 48 62 50 51 52 36 38 39 33 32 37 34 35 92 91 95 93 94 98 96 97 90 66 68 70 69 67 65 11 12 8 10 9 30 29 31 100 99 6 2 4 7 1 5 3 17 14 13 18 15 19 16 79 84 75 77 85 78 88 72 89 73 87 74 83 86 76 81 71 80 82 25 21 23 24 26 22 28...

output:

1

result:

points 1.0 number of queries is 1

Subtask #2:

score: 15
Accepted

Test #5:

score: 15
Accepted
time: 9ms
memory: 3720kb

input:

2 100 13
100 100 65 36 67 86 38 76 15 17 13 93 83 57 46 90 14 2 52 88 29 74 55 66 79 75 37 81 87 47 56 25 33 39 8 31 64 73 98 78 100 94 10 58 61 70 53 54 21 49 16 5 4 85 44 62 27 92 91 26 72 41 42 99 89 77 12 69 60 24 3 30 40 1 84 68 59 28 11 71 96 97 63 32 18 34 43 82 48 35 95 80 7 45 19 23 51 22 5...

output:

4

result:

points 1.0 number of queries is 4

Test #6:

score: 15
Accepted
time: 9ms
memory: 3700kb

input:

2 100 13
100 100 86 98 14 10 46 93 8 40 9 61 74 35 76 6 53 50 44 88 43 42 84 57 79 39 58 13 28 77 83 16 34 49 71 45 20 64 18 68 24 15 26 38 72 85 82 21 75 52 23 100 37 36 99 12 62 4 33 11 27 81 95 2 70 65 87 30 56 90 48 66 25 41 51 3 92 63 60 80 7 22 19 89 29 94 97 32 31 59 96 91 78 69 5 55 73 67 17...

output:

4

result:

points 1.0 number of queries is 4

Test #7:

score: 15
Accepted
time: 9ms
memory: 3724kb

input:

2 100 13
100 100 86 7 41 38 96 16 6 65 92 85 88 13 80 64 45 37 34 14 44 12 78 66 79 10 3 69 43 91 97 22 11 1 26 56 81 59 39 94 40 9 15 90 48 20 74 68 55 29 2 23 46 93 24 35 95 72 82 31 100 71 52 60 87 89 75 8 57 28 33 63 21 62 84 25 58 47 30 42 61 19 54 17 27 5 36 99 49 51 18 4 98 50 77 76 73 32 83 ...

output:

4

result:

points 1.0 number of queries is 4

Test #8:

score: 15
Accepted
time: 8ms
memory: 3720kb

input:

2 99 13
100 100 64 61 58 62 76 63 68 57 69 66 70 77 67 73 75 60 74 71 72 59 65 3 2 1 50 54 41 46 45 35 55 33 39 44 53 52 40 51 38 56 49 34 37 31 36 42 48 47 43 32 84 98 86 87 99 80 78 100 89 95 93 83 96 92 85 91 97 94 88 90 79 81 82 20 10 9 16 11 17 19 4 7 18 12 13 22 27 8 6 24 29 28 23 15 26 30 25 ...

output:

4

result:

points 1.0 number of queries is 4

Subtask #3:

score: 18
Accepted

Test #9:

score: 18
Accepted
time: 42ms
memory: 3836kb

input:

3 1100 14
100 100 50 78 94 90 6 24 52 93 73 4 7 5 40 2 17 41 27 8 21 16 64 80 96 12 46 57 38 22 69 92 47 10 60 13 76 62 30 74 31 82 91 32 36 53 84 98 44 77 19 49 83 71 79 15 87 37 20 85 48 51 68 55 3 81 1 34 99 97 26 9 75 35 28 56 33 65 54 25 18 66 11 63 43 61 88 45 89 23 39 29 100 58 67 95 42 59 72...

output:

3

result:

points 1.0 number of queries is 3

Test #10:

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

input:

3 999 14
100 100 5 6 45 48 46 44 47 4 2 1 3 39 34 42 37 38 35 43 41 40 36 30 33 32 31 13 8 17 7 11 9 12 23 19 18 10 24 20 26 16 22 14 15 21 25 55 76 49 52 63 62 50 70 66 56 73 53 58 77 75 74 60 72 57 67 68 59 64 61 69 54 65 51 71 28 29 27 94 96 93 92 100 91 97 98 95 99 78 89 88 84 86 79 81 85 83 90 ...

output:

3

result:

points 1.0 number of queries is 3

Test #11:

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

input:

3 1100 14
100 100 5 19 35 90 87 82 29 71 99 14 70 15 74 62 79 30 40 68 13 88 2 94 45 4 46 80 92 66 100 98 33 34 39 37 60 59 48 31 28 43 56 57 93 55 95 27 84 11 49 8 63 47 65 41 26 44 12 3 72 17 50 75 86 10 85 36 7 73 81 18 21 64 91 16 53 9 23 78 58 1 97 25 24 38 69 51 42 32 67 77 61 22 96 89 76 6 52...

output:

3

result:

points 1.0 number of queries is 3

Test #12:

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

input:

3 1100 14
100 100 68 13 93 8 76 73 14 27 33 9 78 55 84 66 4 7 98 75 70 81 52 71 34 79 83 12 74 30 23 56 99 58 54 21 46 39 31 41 26 11 65 40 35 96 42 5 6 94 91 22 63 100 95 45 48 87 37 86 38 24 19 44 32 18 67 15 80 51 89 47 10 64 49 59 20 17 29 69 92 25 88 36 1 43 28 90 61 3 2 97 85 16 50 60 57 53 82...

output:

3

result:

points 1.0 number of queries is 3

Test #13:

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

input:

3 1100 14
100 100 96 31 21 50 24 87 17 85 86 42 51 58 75 77 92 81 97 7 82 20 3 29 65 34 98 16 95 73 48 4 10 40 22 28 63 41 13 15 76 30 32 71 47 84 27 52 68 69 25 43 35 70 80 93 74 12 64 6 89 9 37 49 1 2 14 60 11 19 72 45 59 67 23 57 62 55 78 79 61 100 56 66 18 8 53 54 94 38 44 5 36 99 88 33 26 83 46...

output:

3

result:

points 1.0 number of queries is 3

Test #14:

score: 18
Accepted
time: 45ms
memory: 3804kb

input:

3 1100 14
100 100 61 99 28 21 69 44 87 57 84 52 68 82 11 22 94 75 8 43 33 58 81 88 50 16 20 100 47 15 86 23 39 67 56 60 19 26 76 35 12 73 89 38 78 4 55 36 30 48 80 10 9 24 34 91 13 27 98 65 41 97 59 95 37 40 46 63 83 79 42 90 74 62 45 96 70 71 93 1 2 72 14 5 3 77 49 7 29 64 25 6 54 53 18 17 31 92 32...

output:

3

result:

points 1.0 number of queries is 3

Test #15:

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

input:

3 1100 14
100 100 90 81 30 56 19 16 57 69 28 43 85 87 99 91 79 11 39 32 23 5 33 55 86 96 41 20 38 70 22 37 27 53 2 52 31 58 75 26 44 35 8 49 100 65 24 72 42 71 68 94 3 34 9 98 92 64 63 13 76 73 18 36 21 4 66 7 17 83 67 48 84 59 12 51 40 88 15 78 1 45 14 97 80 29 50 77 93 10 54 89 62 25 47 82 46 95 7...

output:

3

result:

points 1.0 number of queries is 3

Test #16:

score: 18
Accepted
time: 48ms
memory: 3712kb

input:

3 1100 14
100 100 20 40 92 95 76 27 8 16 23 54 65 68 81 17 94 48 5 60 28 84 49 37 3 98 90 10 64 24 51 39 1 25 32 87 83 9 89 67 72 7 80 13 42 34 21 29 12 73 6 46 66 18 91 53 55 61 74 88 36 57 4 70 69 50 58 26 82 35 78 79 56 30 43 75 14 15 77 62 19 71 11 93 100 2 97 45 96 41 44 52 86 22 85 31 59 33 38...

output:

3

result:

points 1.0 number of queries is 3

Test #17:

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

input:

3 1100 14
100 100 66 6 98 27 77 4 11 1 28 59 40 61 85 81 50 21 51 78 65 73 62 76 72 71 7 5 57 14 41 94 86 17 96 84 19 24 47 48 37 3 52 95 79 45 46 8 70 58 90 83 91 12 87 97 55 69 15 31 67 74 53 30 64 2 54 33 42 35 89 80 13 92 63 10 16 99 75 68 20 44 23 93 100 29 32 34 25 43 49 9 88 18 38 36 60 82 22...

output:

3

result:

points 1.0 number of queries is 3

Test #18:

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

input:

3 1100 14
100 100 54 92 42 36 93 13 55 65 66 85 60 50 61 63 35 47 51 52 20 31 72 46 26 70 16 17 15 82 4 53 91 80 14 25 62 48 43 41 37 97 24 68 39 19 9 86 76 21 83 73 38 90 78 96 32 5 3 79 58 87 71 74 8 69 2 40 28 75 88 33 64 67 49 44 100 95 27 84 6 23 81 57 98 45 59 7 56 18 89 30 22 29 34 12 11 99 1...

output:

3

result:

points 1.0 number of queries is 3

Subtask #4:

score: 10
Accepted

Test #19:

score: 10
Accepted
time: 13ms
memory: 3836kb

input:

4 1 700
100 200 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98...

output:

386

result:

points 1.0 number of queries is 386

Test #20:

score: 10
Accepted
time: 21ms
memory: 3720kb

input:

4 1 700
100 200 1 65 33 97 17 81 49 9 73 41 25 89 57 5 69 37 21 85 53 13 77 45 29 93 61 3 67 35 99 19 83 51 11 75 43 27 91 59 7 71 39 23 87 55 15 79 47 31 95 63 2 66 34 98 18 82 50 10 74 42 26 90 58 6 70 38 22 86 54 14 78 46 30 94 62 4 68 36 100 20 84 52 12 76 44 28 92 60 8 72 40 24 88 56 16 80 48 3...

output:

625

result:

points 1.0 number of queries is 625

Test #21:

score: 10
Accepted
time: 21ms
memory: 3716kb

input:

4 1 700
100 200 64 96 32 48 80 16 56 88 24 40 72 8 60 92 28 44 76 12 52 84 20 100 36 68 4 62 94 30 46 78 14 54 86 22 38 70 6 58 90 26 42 74 10 50 82 18 98 34 66 2 63 95 31 47 79 15 55 87 23 39 71 7 59 91 27 43 75 11 51 83 19 99 35 67 3 61 93 29 45 77 13 53 85 21 37 69 5 57 89 25 41 73 9 49 81 17 97 ...

output:

619

result:

points 1.0 number of queries is 619

Test #22:

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

input:

4 1 700
100 200 100 47 4 58 60 91 90 22 86 57 2 70 54 24 41 21 67 99 53 32 77 49 51 30 88 97 26 25 9 80 68 42 34 43 35 82 33 87 16 39 40 15 93 37 13 7 63 83 95 18 84 59 11 62 66 31 14 73 72 23 85 56 61 28 36 20 1 69 17 5 50 38 96 27 92 19 75 94 52 81 89 65 44 55 74 10 12 76 8 46 29 64 71 48 3 45 98 ...

output:

602

result:

points 1.0 number of queries is 602

Test #23:

score: 10
Accepted
time: 17ms
memory: 3772kb

input:

4 1 700
100 200 45 25 28 79 14 34 41 87 21 13 70 56 51 83 19 89 80 5 67 57 43 54 91 76 55 23 46 68 90 65 40 96 8 75 69 2 10 42 71 35 30 11 1 52 58 29 92 9 33 6 15 31 16 18 44 3 26 72 60 94 17 12 78 48 88 97 36 99 95 64 93 100 98 85 73 74 47 4 32 7 38 53 81 82 20 86 22 49 24 66 61 39 59 27 77 37 63 5...

output:

597

result:

points 1.0 number of queries is 597

Test #24:

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

input:

4 1 700
100 200 51 7 11 99 78 48 13 14 3 23 6 8 1 85 76 49 24 65 43 83 73 31 36 89 74 67 93 75 50 56 4 95 12 68 30 59 2 29 42 69 19 10 61 20 27 87 66 77 9 98 97 5 46 90 63 52 39 80 32 70 16 100 25 28 58 54 57 47 37 71 38 40 17 44 86 81 45 91 35 60 41 64 94 33 96 62 88 82 18 53 26 92 79 34 21 55 72 1...

output:

606

result:

points 1.0 number of queries is 606

Test #25:

score: 10
Accepted
time: 20ms
memory: 3740kb

input:

4 1 700
100 200 56 1 90 94 18 91 48 87 55 37 51 62 50 77 53 39 95 85 92 89 76 22 57 8 65 78 70 84 60 49 14 35 36 81 11 40 61 100 34 20 97 7 88 9 66 38 27 58 10 16 52 75 67 23 31 15 33 44 5 71 24 13 74 30 17 41 32 96 46 2 59 29 54 99 80 72 68 64 73 86 21 47 83 42 45 25 43 6 3 93 79 82 4 12 19 28 63 6...

output:

607

result:

points 1.0 number of queries is 607

Test #26:

score: 10
Accepted
time: 20ms
memory: 3744kb

input:

4 1 700
100 200 84 5 31 77 30 18 34 3 81 60 85 92 7 89 95 73 40 51 45 62 79 2 8 1 91 96 24 66 19 98 11 86 83 76 56 47 27 15 29 48 33 64 57 82 49 21 36 72 67 35 90 6 88 12 42 37 53 58 61 39 94 74 50 28 55 22 59 10 25 32 9 44 52 26 17 71 46 20 97 13 54 41 99 70 80 38 4 93 100 16 69 75 63 78 87 14 65 4...

output:

609

result:

points 1.0 number of queries is 609

Test #27:

score: 10
Accepted
time: 20ms
memory: 3664kb

input:

4 1 700
100 200 80 46 48 23 18 62 93 7 85 13 67 10 24 33 36 97 100 96 95 37 92 68 28 43 45 44 70 16 20 14 82 19 50 59 41 61 74 38 30 75 39 2 26 77 56 83 1 91 3 84 58 73 42 90 47 64 69 12 53 8 32 11 15 31 57 65 55 6 76 87 71 88 98 29 5 89 63 66 86 81 78 4 25 17 72 22 40 99 54 60 9 49 94 35 52 79 51 2...

output:

600

result:

points 1.0 number of queries is 600

Test #28:

score: 10
Accepted
time: 19ms
memory: 3808kb

input:

4 1 700
100 200 16 69 59 93 91 35 89 31 18 90 40 25 11 67 82 42 92 64 60 94 95 68 97 50 1 32 39 3 83 85 48 13 28 41 27 43 80 54 26 14 12 8 73 7 84 79 87 38 56 78 30 34 63 58 65 46 36 22 76 6 5 55 61 71 44 47 77 99 2 45 100 29 66 96 23 49 20 19 72 37 86 4 10 88 75 57 53 17 24 62 52 70 81 98 21 15 51 ...

output:

583

result:

points 1.0 number of queries is 583

Test #29:

score: 10
Accepted
time: 21ms
memory: 3728kb

input:

4 1 700
100 200 82 86 26 21 4 78 63 1 92 39 81 89 71 76 68 84 83 24 17 8 43 47 62 31 29 100 73 35 50 91 55 60 53 70 79 69 96 3 38 58 98 56 23 37 14 33 95 42 87 90 93 67 94 11 59 25 44 9 77 28 40 2 72 65 41 88 6 52 16 15 18 22 99 48 74 13 75 46 51 64 27 7 85 34 30 10 49 54 80 20 19 32 12 5 61 57 66 9...

output:

625

result:

points 1.0 number of queries is 625

Test #30:

score: 10
Accepted
time: 9ms
memory: 3724kb

input:

4 1 700
100 200 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 ...

output:

266

result:

points 1.0 number of queries is 266

Test #31:

score: 10
Accepted
time: 16ms
memory: 3728kb

input:

4 1 700
100 200 12 55 23 61 52 39 97 85 35 56 31 88 50 69 43 7 73 77 94 87 2 14 67 68 89 17 6 44 24 72 46 53 16 26 22 32 3 80 75 93 83 9 8 30 59 11 84 48 96 45 54 64 40 78 1 76 98 58 63 37 10 27 95 60 81 65 20 18 47 5 38 49 86 29 21 90 15 92 57 62 82 100 91 41 33 34 25 4 79 51 28 70 99 74 66 13 19 4...

output:

580

result:

points 1.0 number of queries is 580

Test #32:

score: 10
Accepted
time: 18ms
memory: 3804kb

input:

4 1 700
100 200 1 100 3 98 5 96 7 94 9 92 11 90 13 88 15 86 17 84 19 82 21 80 23 78 25 76 27 74 29 72 31 70 33 68 35 66 37 64 39 62 41 60 43 58 45 56 47 54 49 52 51 50 53 48 55 46 57 44 59 42 61 40 63 38 65 36 67 34 69 32 71 30 73 28 75 26 77 24 79 22 81 20 83 18 85 16 87 14 89 12 91 10 93 8 95 6 97...

output:

534

result:

points 1.0 number of queries is 534

Test #33:

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

input:

4 1 700
100 200 99 2 97 4 95 6 93 8 91 10 89 12 87 14 85 16 83 18 81 20 79 22 77 24 75 26 73 28 71 30 69 32 67 34 65 36 63 38 61 40 59 42 57 44 55 46 53 48 51 50 49 52 47 54 45 56 43 58 41 60 39 62 37 64 35 66 33 68 31 70 29 72 27 74 25 76 23 78 21 80 19 82 17 84 15 86 13 88 11 90 9 92 7 94 5 96 3 9...

output:

534

result:

points 1.0 number of queries is 534

Test #34:

score: 10
Accepted
time: 15ms
memory: 3716kb

input:

4 1 700
100 200 81 84 76 82 73 79 74 75 77 80 83 78 36 69 42 24 43 67 64 52 66 45 26 23 70 44 37 30 34 71 72 59 48 61 60 27 53 55 63 54 51 41 25 56 22 62 31 46 35 40 38 57 49 47 50 65 68 33 39 58 29 32 28 99 96 98 93 100 95 97 92 94 91 90 86 85 87 89 88 16 9 4 15 3 13 20 19 1 6 7 14 17 21 18 8 10 12...

output:

562

result:

points 1.0 number of queries is 562

Test #35:

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

input:

4 1 700
100 200 85 86 87 28 33 34 29 32 31 30 18 19 21 17 15 14 16 22 20 95 96 91 97 98 94 92 93 90 99 89 100 88 62 53 72 48 77 78 45 73 52 55 49 83 82 75 68 67 41 59 43 57 60 50 51 46 58 64 84 61 65 44 80 71 76 47 63 81 70 54 74 56 79 40 66 69 42 39 38 27 23 26 24 25 11 1 6 3 12 5 9 10 8 2 13 7 4 3...

output:

549

result:

points 1.0 number of queries is 549

Test #36:

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

input:

4 1 700
100 200 54 61 65 52 68 50 62 67 44 58 66 53 59 60 64 57 48 46 45 49 55 69 63 56 51 47 39 35 32 41 42 40 34 36 38 43 33 37 97 99 100 98 96 90 94 86 93 91 88 89 85 87 92 95 23 18 27 29 31 25 28 20 26 30 21 17 24 19 22 1 3 2 9 8 14 12 10 11 15 13 16 5 4 7 6 74 75 80 70 83 84 82 72 78 73 79 76 7...

output:

546

result:

points 1.0 number of queries is 546

Test #37:

score: 10
Accepted
time: 19ms
memory: 3832kb

input:

4 1 700
100 200 55 63 60 62 53 56 59 61 58 50 49 54 52 51 57 31 32 40 33 37 39 30 38 36 34 35 41 98 100 99 16 15 14 17 23 28 24 26 25 20 27 22 19 21 29 18 91 93 94 87 95 92 88 96 90 89 97 86 1 12 3 10 13 11 7 6 5 8 4 2 9 46 48 47 45 79 83 81 85 80 84 82 73 76 66 75 71 74 68 72 69 67 77 64 70 78 65 4...

output:

557

result:

points 1.0 number of queries is 557

Test #38:

score: 10
Accepted
time: 19ms
memory: 3740kb

input:

4 1 700
100 200 93 97 96 94 95 24 23 37 36 34 35 33 62 60 61 65 63 64 6 2 7 3 5 4 1 8 39 41 40 38 49 50 48 47 52 51 54 46 56 55 53 100 98 99 25 26 58 59 57 70 74 66 69 71 73 68 67 72 75 13 12 11 87 88 92 85 82 89 90 79 80 81 84 91 83 86 78 76 77 16 22 17 18 21 19 20 15 14 27 29 28 10 9 31 32 30 42 4...

output:

555

result:

points 1.0 number of queries is 555

Subtask #5:

score: 53
Accepted

Test #39:

score: 53
Accepted
time: 3ms
memory: 3780kb

input:

4 1 3200
100 100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9...

output:

99

result:

points 1.0 number of queries is 99

Test #40:

score: 53
Accepted
time: 3ms
memory: 3772kb

input:

4 1 3200
100 100 1 65 33 97 17 81 49 9 73 41 25 89 57 5 69 37 21 85 53 13 77 45 29 93 61 3 67 35 99 19 83 51 11 75 43 27 91 59 7 71 39 23 87 55 15 79 47 31 95 63 2 66 34 98 18 82 50 10 74 42 26 90 58 6 70 38 22 86 54 14 78 46 30 94 62 4 68 36 100 20 84 52 12 76 44 28 92 60 8 72 40 24 88 56 16 80 48 ...

output:

99

result:

points 1.0 number of queries is 99

Test #41:

score: 53
Accepted
time: 1ms
memory: 3832kb

input:

4 1 3200
100 100 64 96 32 48 80 16 56 88 24 40 72 8 60 92 28 44 76 12 52 84 20 100 36 68 4 62 94 30 46 78 14 54 86 22 38 70 6 58 90 26 42 74 10 50 82 18 98 34 66 2 63 95 31 47 79 15 55 87 23 39 71 7 59 91 27 43 75 11 51 83 19 99 35 67 3 61 93 29 45 77 13 53 85 21 37 69 5 57 89 25 41 73 9 49 81 17 97...

output:

99

result:

points 1.0 number of queries is 99

Test #42:

score: 53
Accepted
time: 3ms
memory: 3836kb

input:

4 1 3200
100 100 41 5 95 59 39 26 40 75 44 10 52 19 11 74 54 50 48 46 68 32 29 43 56 37 98 96 20 13 71 82 23 66 64 99 88 47 33 12 73 16 21 31 3 4 6 58 57 76 2 7 92 81 78 45 53 90 83 61 42 63 27 91 84 79 51 55 87 35 67 100 24 97 93 89 28 22 34 62 80 25 36 86 49 85 77 9 70 1 15 14 8 69 72 94 65 18 38 ...

output:

99

result:

points 1.0 number of queries is 99

Test #43:

score: 53
Accepted
time: 3ms
memory: 3728kb

input:

4 1 3200
100 100 81 86 94 42 33 37 89 60 93 16 10 5 35 91 38 20 61 17 45 90 18 62 12 48 46 26 2 23 51 72 57 11 65 19 47 52 87 67 68 7 98 66 92 64 8 95 30 15 41 54 88 58 13 39 50 70 22 6 32 49 25 59 55 77 43 3 97 34 56 74 76 100 71 31 82 83 75 24 99 9 96 84 69 36 27 1 53 79 14 29 63 73 4 78 28 80 40 ...

output:

99

result:

points 1.0 number of queries is 99

Test #44:

score: 53
Accepted
time: 1ms
memory: 3780kb

input:

4 1 3200
100 100 67 35 21 18 53 43 46 99 70 82 12 81 49 92 30 76 74 24 25 51 26 13 63 56 100 36 78 75 52 55 61 2 95 15 5 39 65 28 23 4 50 11 85 87 7 10 60 96 97 77 91 54 66 44 48 69 20 73 37 34 83 16 29 89 80 40 42 90 47 57 45 27 32 71 72 14 93 59 68 31 8 3 17 94 38 6 88 84 79 41 9 1 64 19 98 86 33 ...

output:

99

result:

points 1.0 number of queries is 99

Test #45:

score: 53
Accepted
time: 1ms
memory: 3776kb

input:

4 1 3200
100 100 17 36 3 51 9 98 42 81 64 99 16 73 2 58 55 92 91 37 8 56 48 59 86 80 6 100 14 7 96 25 60 84 30 53 18 4 83 93 22 78 40 11 29 13 33 97 75 47 63 24 74 39 5 45 20 71 46 19 32 12 54 34 79 62 66 95 1 31 69 28 70 94 89 87 35 49 27 82 23 44 21 76 72 41 38 85 77 68 52 65 88 26 10 57 43 61 15 ...

output:

99

result:

points 1.0 number of queries is 99

Test #46:

score: 53
Accepted
time: 3ms
memory: 3772kb

input:

4 1 3200
100 100 19 47 31 78 56 33 89 7 58 1 9 85 94 63 27 88 69 34 64 66 90 30 44 86 72 75 4 23 21 48 92 71 55 82 32 12 83 93 54 41 70 97 81 29 2 65 62 49 80 77 84 60 6 11 20 53 57 50 5 16 36 14 73 24 100 43 96 68 38 46 25 76 37 87 74 91 28 22 18 67 45 40 59 39 79 15 3 26 99 51 95 52 98 42 35 61 8 ...

output:

99

result:

points 1.0 number of queries is 99

Test #47:

score: 53
Accepted
time: 3ms
memory: 3776kb

input:

4 1 3200
100 100 69 47 85 45 3 53 35 33 87 43 8 16 66 49 38 10 64 67 94 60 97 4 20 92 30 77 52 54 74 14 73 12 70 19 28 6 61 7 65 57 91 98 18 72 39 86 5 56 83 48 63 1 32 84 27 78 17 11 34 95 25 15 50 59 68 71 58 9 62 26 46 88 100 44 24 81 80 89 76 36 2 13 22 99 31 29 90 37 79 40 82 93 51 23 55 21 96 ...

output:

99

result:

points 1.0 number of queries is 99

Test #48:

score: 53
Accepted
time: 3ms
memory: 3780kb

input:

4 1 3200
100 100 56 9 63 72 92 37 65 70 74 85 79 8 98 33 26 86 15 67 93 90 31 21 51 87 47 52 58 95 80 45 97 49 83 2 7 29 10 5 12 18 61 38 34 4 89 32 59 71 50 30 75 76 55 41 73 77 88 48 99 27 100 25 43 68 20 42 22 1 28 16 35 96 14 84 60 66 6 91 69 82 11 62 36 54 3 24 53 17 46 23 78 44 57 19 13 81 94 ...

output:

99

result:

points 1.0 number of queries is 99

Test #49:

score: 53
Accepted
time: 1ms
memory: 3844kb

input:

4 1 3200
100 100 47 98 72 84 2 67 5 13 34 60 25 14 27 52 32 29 7 66 69 57 30 21 93 64 70 44 86 87 28 40 73 43 33 56 4 74 37 77 38 63 79 92 26 95 8 75 50 19 23 91 59 36 51 94 22 97 46 12 11 16 39 89 85 80 17 18 53 35 82 9 48 90 83 49 99 88 6 55 71 68 20 78 41 61 42 1 76 3 24 54 81 62 96 58 10 31 15 6...

output:

99

result:

points 1.0 number of queries is 99

Test #50:

score: 53
Accepted
time: 3ms
memory: 3724kb

input:

4 1 3200
100 100 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5...

output:

99

result:

points 1.0 number of queries is 99

Test #51:

score: 53
Accepted
time: 0ms
memory: 3780kb

input:

4 1 3200
100 100 79 81 45 54 38 56 34 49 15 29 53 57 61 87 71 67 50 95 44 39 62 69 41 48 72 77 75 47 91 22 63 2 25 4 21 32 96 12 6 74 97 90 30 27 23 43 93 35 78 52 51 9 73 26 100 37 86 20 94 14 8 99 66 24 18 42 3 33 58 19 60 13 64 11 16 17 36 80 92 76 84 88 40 7 1 10 70 28 68 5 82 31 65 89 85 98 55 ...

output:

99

result:

points 1.0 number of queries is 99

Test #52:

score: 53
Accepted
time: 1ms
memory: 3892kb

input:

4 1 3200
100 100 51 70 68 84 44 97 21 92 2 18 96 83 41 73 88 67 24 20 79 48 42 37 8 45 12 34 40 4 82 38 16 76 47 26 5 65 80 11 33 6 36 95 13 62 75 81 50 93 7 89 66 32 56 31 86 77 35 27 59 58 49 74 43 55 78 64 3 63 22 17 57 53 85 94 39 29 30 14 54 15 52 61 90 9 23 10 46 71 98 91 28 99 69 100 25 1 60 ...

output:

99

result:

points 1.0 number of queries is 99

Test #53:

score: 53
Accepted
time: 3ms
memory: 3848kb

input:

4 1 3200
100 100 26 92 46 70 63 56 79 3 95 17 87 76 14 27 89 86 24 43 88 96 15 98 67 61 53 82 65 58 80 16 52 34 50 78 97 72 48 40 75 5 19 100 81 32 20 99 42 23 68 60 55 47 28 91 29 36 21 33 62 11 9 54 7 41 39 66 1 77 12 37 22 83 6 13 30 71 18 10 35 69 31 44 94 64 59 51 8 74 84 90 93 25 49 4 2 45 38 ...

output:

99

result:

points 1.0 number of queries is 99

Test #54:

score: 53
Accepted
time: 3ms
memory: 3844kb

input:

4 1 3200
100 100 47 62 28 73 12 13 70 94 5 95 33 14 76 89 74 63 43 52 58 83 24 85 2 1 17 20 66 37 42 26 84 41 99 67 55 57 30 88 45 31 64 4 56 80 71 78 10 65 54 97 90 3 39 48 38 46 16 53 86 69 25 15 82 49 19 36 40 9 34 7 22 29 27 92 11 6 98 87 100 72 23 96 44 77 68 50 61 93 35 32 18 79 81 91 8 75 21 ...

output:

99

result:

points 1.0 number of queries is 99

Test #55:

score: 53
Accepted
time: 3ms
memory: 3900kb

input:

4 1 3200
100 100 77 25 12 45 90 50 30 43 66 93 35 58 79 5 8 14 87 59 1 64 73 95 29 41 23 20 91 32 18 56 54 17 96 94 52 78 61 26 4 28 9 16 49 38 15 100 40 6 65 67 3 62 80 7 82 47 31 98 36 72 44 71 24 10 88 13 81 70 68 21 57 97 33 63 22 34 37 51 60 83 75 84 27 19 46 53 89 69 76 11 42 92 39 86 85 99 74...

output:

99

result:

points 1.0 number of queries is 99

Test #56:

score: 53
Accepted
time: 3ms
memory: 3800kb

input:

4 1 3200
100 100 45 67 23 53 86 13 90 31 60 9 57 97 42 51 89 8 88 85 48 38 95 81 69 54 12 94 17 75 28 98 62 63 41 33 11 70 47 22 82 80 3 61 40 84 7 79 25 20 83 50 87 21 56 43 65 35 72 18 73 99 77 78 96 58 44 64 100 91 92 24 30 93 2 59 36 37 76 4 16 34 74 68 6 1 19 10 27 66 14 49 32 5 46 52 26 55 15 ...

output:

99

result:

points 1.0 number of queries is 99

Test #57:

score: 53
Accepted
time: 3ms
memory: 3776kb

input:

4 1 3200
100 100 69 86 87 28 3 38 83 100 70 23 49 60 8 68 7 27 80 34 31 36 24 98 1 82 2 79 59 96 50 48 22 16 84 37 6 73 4 5 17 52 81 54 14 32 64 47 29 55 78 95 10 20 57 51 13 39 92 77 56 62 12 26 19 35 85 40 90 88 43 94 76 15 97 71 53 58 99 63 45 9 11 91 61 42 93 18 44 30 75 89 66 25 67 46 72 65 21 ...

output:

99

result:

points 1.0 number of queries is 99

Test #58:

score: 53
Accepted
time: 0ms
memory: 3900kb

input:

4 1 3200
100 100 44 76 46 74 58 10 84 8 70 1 14 16 92 79 55 38 18 82 39 87 96 24 15 95 48 41 4 17 22 26 53 51 90 88 98 35 42 73 77 9 66 12 6 59 50 97 28 81 69 62 72 94 23 71 36 100 56 86 13 80 20 27 47 40 25 54 64 11 37 60 3 30 61 83 89 63 21 7 34 91 5 85 65 31 68 29 2 32 99 57 67 75 43 19 78 49 33 ...

output:

99

result:

points 1.0 number of queries is 99

Test #59:

score: 53
Accepted
time: 3ms
memory: 3784kb

input:

4 1 3200
100 100 69 29 61 15 65 6 34 75 32 90 67 94 39 71 79 41 81 51 59 98 35 76 45 85 2 52 54 49 25 38 28 53 37 72 46 57 19 92 10 66 7 1 11 30 16 83 3 78 42 14 31 93 5 88 4 89 21 27 60 91 68 73 12 43 55 8 13 50 74 62 63 22 64 47 36 87 33 23 100 44 17 18 99 40 84 96 77 26 95 20 58 48 70 86 80 82 56...

output:

99

result:

points 1.0 number of queries is 99

Test #60:

score: 53
Accepted
time: 3ms
memory: 3784kb

input:

4 1 3200
100 100 8 89 54 26 23 14 3 25 2 30 92 61 15 29 10 84 47 85 95 97 48 4 7 64 67 72 98 39 11 55 99 40 21 90 20 60 16 87 31 78 63 45 76 19 91 13 86 94 82 12 100 34 22 33 75 46 57 79 69 17 43 66 65 68 49 58 38 6 59 41 37 5 53 80 74 18 42 56 96 32 70 51 88 35 36 52 93 27 62 71 9 50 1 44 83 81 24 ...

output:

99

result:

points 1.0 number of queries is 99

Test #61:

score: 53
Accepted
time: 3ms
memory: 3848kb

input:

4 1 3200
100 100 1 100 3 98 5 96 7 94 9 92 11 90 13 88 15 86 17 84 19 82 21 80 23 78 25 76 27 74 29 72 31 70 33 68 35 66 37 64 39 62 41 60 43 58 45 56 47 54 49 52 51 50 53 48 55 46 57 44 59 42 61 40 63 38 65 36 67 34 69 32 71 30 73 28 75 26 77 24 79 22 81 20 83 18 85 16 87 14 89 12 91 10 93 8 95 6 9...

output:

99

result:

points 1.0 number of queries is 99

Test #62:

score: 53
Accepted
time: 3ms
memory: 3772kb

input:

4 1 3200
100 100 58 89 75 20 32 41 71 25 37 26 19 2 14 3 24 98 9 4 11 85 16 35 67 34 76 72 39 90 13 1 61 69 10 86 96 78 43 5 70 87 21 60 59 23 45 73 100 27 46 50 99 56 51 47 18 84 49 54 79 93 62 77 40 81 64 52 53 95 65 80 97 57 6 74 94 12 82 83 17 44 38 66 88 8 7 92 91 36 28 22 48 31 42 55 29 68 63 ...

output:

99

result:

points 1.0 number of queries is 99

Test #63:

score: 53
Accepted
time: 3ms
memory: 3800kb

input:

4 1 3200
100 100 40 60 88 10 21 89 79 95 71 43 97 82 81 55 13 44 98 61 18 86 92 41 8 25 26 48 5 90 91 38 67 37 74 54 3 78 1 34 72 73 94 15 64 7 59 2 63 42 69 6 58 53 77 14 11 93 87 66 49 68 99 100 96 51 76 19 28 32 23 70 17 39 57 9 45 12 33 20 29 46 56 83 30 27 50 35 75 85 22 24 84 47 52 80 16 31 62...

output:

99

result:

points 1.0 number of queries is 99

Test #64:

score: 53
Accepted
time: 3ms
memory: 3780kb

input:

4 1 3200
100 100 20 90 88 21 70 22 34 67 32 9 12 36 43 38 6 5 16 56 24 81 80 96 59 92 63 74 30 73 2 91 79 61 64 71 35 68 66 50 69 23 60 26 19 47 15 75 39 13 14 76 84 31 44 83 29 46 94 86 72 98 93 82 4 28 53 27 52 17 100 58 85 54 89 41 1 78 62 57 99 42 10 18 7 97 11 25 65 33 37 45 8 55 3 40 95 51 87 ...

output:

99

result:

points 1.0 number of queries is 99

Test #65:

score: 53
Accepted
time: 3ms
memory: 3792kb

input:

4 1 3200
100 100 91 95 27 82 25 57 7 58 8 89 94 49 4 52 64 67 48 45 23 70 56 18 46 22 30 37 99 50 73 16 51 84 42 88 69 41 86 92 68 43 47 28 36 19 72 77 26 40 85 6 59 75 29 15 71 17 78 54 10 14 74 11 100 63 76 97 3 34 61 12 2 21 96 87 62 5 39 93 1 98 90 31 32 65 81 35 13 44 66 83 33 55 38 24 80 60 53...

output:

99

result:

points 1.0 number of queries is 99

Test #66:

score: 53
Accepted
time: 3ms
memory: 3780kb

input:

4 1 3200
100 100 52 77 39 96 54 42 89 36 9 21 60 78 74 99 69 44 15 45 64 67 83 10 34 55 7 62 91 18 53 72 40 48 49 1 13 25 14 82 17 41 46 85 2 29 86 5 43 93 4 61 84 97 28 100 37 66 51 3 73 71 27 95 81 32 26 56 92 90 30 76 63 20 12 22 23 35 70 31 58 33 68 88 50 59 47 79 19 75 11 65 98 87 38 80 16 6 24...

output:

99

result:

points 1.0 number of queries is 99

Test #67:

score: 53
Accepted
time: 1ms
memory: 3796kb

input:

4 1 3200
100 100 87 96 44 47 95 31 68 62 21 81 23 28 37 48 99 17 97 67 9 86 2 34 19 91 61 58 72 66 8 54 49 51 25 56 40 43 5 83 65 74 59 11 98 24 55 70 13 1 32 10 22 18 77 90 30 64 36 89 15 50 71 57 80 92 4 93 75 35 14 100 53 20 39 85 76 45 6 41 88 69 73 84 60 94 42 46 7 29 79 52 78 16 27 26 33 12 63...

output:

99

result:

points 1.0 number of queries is 99

Test #68:

score: 53
Accepted
time: 3ms
memory: 3776kb

input:

4 1 3200
100 100 65 8 34 96 2 17 75 25 26 92 52 100 30 41 9 29 28 43 32 47 18 22 91 10 37 88 63 87 44 46 3 83 45 49 13 48 68 33 35 82 79 85 51 12 31 6 76 38 73 74 81 27 1 39 99 16 71 66 64 84 23 56 78 72 54 21 53 14 15 36 70 57 62 60 11 4 20 59 80 42 93 50 69 19 86 61 58 40 5 95 24 55 7 89 90 67 98 ...

output:

99

result:

points 1.0 number of queries is 99

Test #69:

score: 53
Accepted
time: 1ms
memory: 3796kb

input:

4 1 3200
100 100 68 20 69 81 51 99 34 77 59 58 30 7 75 16 41 94 25 37 97 35 86 54 4 62 47 11 87 56 14 84 80 53 55 63 100 92 10 61 98 28 95 40 27 1 78 50 96 73 89 32 67 24 82 21 52 91 23 76 79 9 6 22 8 64 36 57 85 48 74 46 70 88 60 18 45 83 49 71 65 17 44 26 2 38 13 5 19 31 3 29 90 66 72 33 93 39 12 ...

output:

99

result:

points 1.0 number of queries is 99

Test #70:

score: 53
Accepted
time: 3ms
memory: 3844kb

input:

4 1 3200
100 100 1 40 80 75 44 24 13 2 33 11 28 67 74 99 94 65 48 61 84 51 3 17 49 97 70 66 35 29 88 23 41 37 98 81 31 58 72 43 9 63 71 96 83 45 95 27 19 56 69 50 26 5 18 21 42 57 7 89 77 22 16 6 14 46 54 60 73 25 47 79 93 52 90 38 4 100 76 8 34 92 78 10 82 59 86 55 68 15 39 36 20 30 85 32 53 91 62 ...

output:

99

result:

points 1.0 number of queries is 99

Test #71:

score: 53
Accepted
time: 3ms
memory: 3844kb

input:

4 1 3200
100 100 59 67 22 14 27 86 35 75 52 42 40 99 8 66 5 21 73 77 88 82 41 10 1 96 24 18 83 2 65 51 48 60 29 45 92 37 100 39 34 87 44 3 71 80 58 93 84 49 72 55 46 32 81 19 74 38 11 95 61 43 17 7 64 68 85 57 76 25 36 97 50 90 26 56 53 16 89 9 12 98 79 94 91 33 47 69 28 20 30 13 23 4 70 62 31 15 63...

output:

99

result:

points 1.0 number of queries is 99

Test #72:

score: 53
Accepted
time: 1ms
memory: 3724kb

input:

4 1 3200
100 100 99 2 97 4 95 6 93 8 91 10 89 12 87 14 85 16 83 18 81 20 79 22 77 24 75 26 73 28 71 30 69 32 67 34 65 36 63 38 61 40 59 42 57 44 55 46 53 48 51 50 49 52 47 54 45 56 43 58 41 60 39 62 37 64 35 66 33 68 31 70 29 72 27 74 25 76 23 78 21 80 19 82 17 84 15 86 13 88 11 90 9 92 7 94 5 96 3 ...

output:

99

result:

points 1.0 number of queries is 99

Test #73:

score: 53
Accepted
time: 3ms
memory: 3780kb

input:

4 1 3200
100 100 15 63 51 86 16 30 11 10 89 72 64 39 81 5 53 23 58 84 24 61 75 76 99 87 7 32 35 65 77 52 71 91 40 29 47 44 13 67 66 42 90 80 17 54 93 97 8 25 69 36 45 56 57 28 4 12 9 82 94 100 85 6 22 59 92 46 50 95 78 73 20 98 34 60 27 3 21 19 62 38 48 37 14 49 74 79 31 88 96 68 43 41 83 18 2 26 55...

output:

99

result:

points 1.0 number of queries is 99

Test #74:

score: 53
Accepted
time: 3ms
memory: 3792kb

input:

4 1 3200
100 100 46 57 34 54 49 51 35 48 42 59 41 30 38 55 52 43 31 37 53 40 50 33 58 32 36 47 39 45 44 56 29 24 27 25 28 26 91 95 78 97 92 96 86 82 99 83 89 87 94 100 80 81 90 85 88 98 84 79 93 75 77 64 71 73 65 67 70 61 74 62 60 63 68 66 72 76 69 1 15 5 20 23 10 9 4 8 2 3 22 12 11 21 18 19 17 7 6 ...

output:

99

result:

points 1.0 number of queries is 99

Test #75:

score: 53
Accepted
time: 3ms
memory: 3864kb

input:

4 1 3200
100 100 63 25 37 36 30 38 35 29 23 26 27 24 22 42 21 19 33 34 31 39 40 28 20 43 32 41 15 2 18 9 16 13 1 17 3 10 4 14 5 12 11 6 8 7 53 56 49 50 52 55 51 48 54 91 94 92 93 95 100 96 98 97 99 57 62 58 60 61 59 70 75 71 66 73 89 86 83 72 87 81 90 69 65 88 64 80 76 85 68 77 84 79 82 74 78 67 47 ...

output:

99

result:

points 1.0 number of queries is 99

Test #76:

score: 53
Accepted
time: 3ms
memory: 3848kb

input:

4 1 3200
100 100 43 59 63 62 56 51 44 50 64 53 58 52 54 47 55 49 57 42 46 61 48 60 45 67 65 74 80 78 72 68 76 71 75 79 82 81 73 77 66 69 70 90 89 88 91 18 11 19 13 15 17 14 16 9 12 20 8 10 22 21 23 97 93 98 96 99 94 95 100 92 25 37 38 35 34 32 26 41 30 27 28 29 36 33 39 40 31 24 1 3 5 2 4 7 6 83 86 ...

output:

99

result:

points 1.0 number of queries is 99

Test #77:

score: 53
Accepted
time: 3ms
memory: 3792kb

input:

4 1 3200
100 100 21 22 20 35 34 33 15 14 18 19 16 17 13 71 67 66 69 70 72 68 7 6 10 8 9 5 1 2 4 3 12 11 41 62 42 55 59 61 63 50 52 46 64 65 44 58 57 51 45 56 49 48 60 47 53 54 43 94 98 100 92 95 99 93 96 97 37 38 40 39 36 25 28 26 29 27 31 24 32 30 23 82 79 73 81 80 75 77 76 78 74 83 87 85 86 88 84 ...

output:

99

result:

points 1.0 number of queries is 99

Test #78:

score: 53
Accepted
time: 3ms
memory: 3784kb

input:

4 1 3200
100 100 99 98 97 100 76 74 75 68 67 12 11 77 35 73 72 93 96 94 95 56 64 58 61 57 65 63 62 54 55 66 60 59 34 38 37 36 91 82 85 79 81 83 89 86 88 80 84 90 87 78 1 2 92 53 71 69 70 3 5 6 9 7 4 8 10 43 40 50 49 41 52 42 44 39 47 51 48 46 45 18 30 27 32 29 19 20 31 16 21 14 22 33 13 17 24 28 25 ...

output:

99

result:

points 1.0 number of queries is 99

Extra Test:

score: 0
Extra Test Passed