# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
115428 |
2019-06-07T12:41:18 Z |
김세빈(#2863) |
Koala Game (APIO17_koala) |
C++14 |
|
10 ms |
384 KB |
#include <bits/stdc++.h>
#include "koala.h"
using namespace std;
int minValue(int n, int w)
{
int B[111], R[111];
int i;
for(i=0; i<n; i++){
B[i] = 1;
}
playRound(B, R);
for(i=0; i<n; i++){
if(R[i] == 2) break;
B[i] = 0;
}
B[i] = 1;
for(i++; i<n; i++){
B[i] = 0;
}
playRound(B, R);
for(i=0; i<n; i++){
if(!R[i]) return i;
}
return 0;
}
int maxValue(int n, int w)
{
int B[111], R[111];
int i, s, k;
for(i=0; i<n; i++){
B[i] = 1; R[i] = 2;
}
for(k=1, s=n; s>1; ){
for(i=0; i<n; i++){
B[i] *= k;
}
playRound(B, R);
for(i=0, s=0; i<n; i++){
if(B[i] == k && R[i] > k){
B[i] = 1; s ++;
}
else B[i] = 0;
}
k = n / s;
}
for(i=0; i<n; i++){
if(B[i] == k && R[i] > k) return i;
}
return 0;
}
int greaterValue(int N, int W) { return 0; }
void allValues(int N, int W, int *P) {}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
384 KB |
Output is correct |
2 |
Correct |
9 ms |
384 KB |
Output is correct |
3 |
Correct |
10 ms |
384 KB |
Output is correct |
4 |
Correct |
8 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |