#include "koala.h"
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cassert>
#include <string>
#include <set>
#include <map>
#include <random>
#include <bitset>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using ul = unsigned long long;
using ld = long double;
const int N = 100;
int b[N], r[N];
int minValue(int n, int w) {
b[0] = 1;
playRound(b, r);
rep(i, n)
if (r[i] <= b[i])
return i;
return 0;
}
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.
return 0;
}
int greaterValue(int n, int w) {
int l = 1, rr = 15, m;
while (1) {
m = (l + rr) / 2;
b[0] = b[1] = m;
playRound(b, r);
if (r[0] > m && r[1] > m) {
assert(l != rr);
l = m + 1;
}
else if (r[0] <= m && r[1] <= m) {
assert(l != rr);
rr = m - 1;
}
else
return r[0] < r[1];
}
return -1;
}
void allValues(int n, int w, int *p) {
if (w == 2*n) {
// TODO: Implement Subtask 4 solution here.
// You may leave this block unmodified if you are not attempting this
// subtask.
} else {
// TODO: Implement Subtask 5 solution here.
// You may leave this block unmodified if you are not attempting this
// subtask.
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
6 ms |
384 KB |
Output is correct |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
62 ms |
384 KB |
Output is correct |
2 |
Partially correct |
72 ms |
384 KB |
Output is partially correct |
3 |
Correct |
62 ms |
384 KB |
Output is correct |
4 |
Correct |
63 ms |
512 KB |
Output is correct |
5 |
Partially correct |
63 ms |
504 KB |
Output is partially correct |
6 |
Correct |
61 ms |
384 KB |
Output is correct |
7 |
Partially correct |
61 ms |
384 KB |
Output is partially correct |
8 |
Correct |
61 ms |
384 KB |
Output is correct |
9 |
Correct |
63 ms |
384 KB |
Output is correct |
10 |
Correct |
62 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |