#include "koala.h"
#include<iostream>
#include<vector>
using namespace std;
int b[100];
int r[100];
int minValue(int n, int w)
{
for(int i=0;i<n;i++)
{
b[i]=0;
}
b[0]=1;
playRound(b,r);
int mipos=-1;
for(int i=0;i<n;i++)
{
if(r[i]==0)mipos=i;
}
if(mipos==-1)while(1);
return mipos;
}
int maxValue(int n, int w)
{
for(int i=0;i<n;i++)
{
b[i]=1;
}
while(1)
{
playRound(b,r);
vector<int>v;
for(int i=0;i<n;i++)
{
if(r[i]>b[i] && b[i]!=0)v.push_back(i);
}
if(v.size()==1)return v[0];
int cost=n/(int)(v.size());
for(int i=0;i<n;i++)
{
b[i]=0;
}
for(int i:v)
{
b[i]=cost;
}
}
}
int greaterValue(int n, int w) {
return 0;
}
void allValues(int N, int W, int *P) {
if (W == 2*N) {
} else {
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
336 KB |
Output is correct |
2 |
Correct |
3 ms |
336 KB |
Output is correct |
3 |
Correct |
3 ms |
504 KB |
Output is correct |
4 |
Correct |
3 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
336 KB |
Output is correct |
2 |
Correct |
10 ms |
336 KB |
Output is correct |
3 |
Correct |
10 ms |
336 KB |
Output is correct |
4 |
Correct |
10 ms |
336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |