이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// Why am I so dumb? :c
// chrono::system_clock::now().time_since_epoch().count()
#include<bits/stdc++.h>
#include "koala.h"
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int, int> pii;
//template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int minValue(int N, int W) {
int me[N], you[N];
for (int i = 0; i < N; ++i) {
me[i] = 0;
}
me[0] = 1;
playRound(me, you);
int i = 0;
while (you[i]) {
++i;
}
return i;
}
int maxValue(int N, int W) {
return 0;
}
int greaterValue(int N, int W) {
int me[N], you[N];
for (int i = 0; i < N; ++i) {
me[i] = you[i] = 0;
}
int L = 1, R = min(W / 2, 8);
while (L <= R) {
int x = (L + R) >> 1;
me[0] = me[1] = x;
playRound(me, you);
if (you[0] != you[1]) {
return you[1] > you[0];
}
if (you[0] > 0) {
L = x + 1;
}
else {
R = x - 1;
}
}
}
void allValues(int N, int W, int *P) {
if (W == 2*N) {
}
else {
}
}
컴파일 시 표준 에러 (stderr) 메시지
koala.cpp: In function 'int greaterValue(int, int)':
koala.cpp:71:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |