#include "koala.h"
#include<bits/stdc++.h>
#include "bits/stdc++.h"
using namespace std;
#define fori(i, a, b) for(int i = (int) (a); i <= (int) (b); ++i)
#define ford(i, a, b) for(int i = (int) (a); i >= (int) (b); --i)
#define forIT(it, begin, end) for(__typeof(end) it = (begin) + ((begin) > (end)); it != (end) - ((begin) > (end)); it += 1 - 2 * ((begin) > (end)))
#define b_e(x) begin(x), end(x)
#define sz(x) ((int)(x).size())
#define bitc __builtin_popcountll
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand rng
#define endl '\n'
#define sp ' '
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int maxn = 205;
int r[maxn], b[maxn];
int minValue(int n, int w) {
fill(b, b + n, 1);
playRound(b, r);
fill(b, b + n, 0);
fori(i, 0, n - 1) cout << r[i] << endl;
fori(i, 0, n - 1) {
if(r[i]) {
b[i] = 1;
break;
}
}
fill(r, r + n, 0);
playRound(b, r);
fori(i, 0, n - 1) cout << r[i] << endl;
fori(i, 0, n - 1) {
if(r[i] == 0) return i;
}
}
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) {
// TODO: Implement Subtask 3 solution here.
// You may leave this function unmodified if you are not attempting this
// subtask.
return 0;
}
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.
}
}
Compilation message
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:41:1: warning: control reaches end of non-void function [-Wreturn-type]
41 | }
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
292 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
296 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
296 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
296 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |