#include<bits/stdc++.h>
#include "koala.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
int minValue(int N,int W){
int B[N],R[N];
fill(B,B+N,0);
B[0]=1;
playRound(B,R);
int ans=0;
for(int i=1;i<N;i++){
if(R[i]==0){
ans=i;
}
}
return ans;
}
int maxValue(int N,int W){
int B[N],R[N],ans=-1;
int V[N];
fill(V,V+N,0);
while(true){
int cur=0;
for(int i=0;i<N;i++){
if(V[i]==0){
ans=i;
cur++;
}
}
if(cur==1){
break;
}
for(int i=0;i<N;i++){
if(V[i]==0){
B[i]=W/cur;
}
else{
B[i]=0;
}
}
playRound(B,R);
for(int i=0;i<N;i++){
if(R[i]<=B[i]){
V[i]=1;
}
}
}
return ans;
}
int greaterValue(int N,int W){
return 0;
}
void allValues(int N,int W,int *P){
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
344 KB |
Output is correct |
2 |
Correct |
3 ms |
344 KB |
Output is correct |
3 |
Correct |
4 ms |
344 KB |
Output is correct |
4 |
Correct |
4 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
344 KB |
Output is correct |
2 |
Correct |
10 ms |
344 KB |
Output is correct |
3 |
Correct |
10 ms |
456 KB |
Output is correct |
4 |
Correct |
10 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |