This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
# | 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... |