Submission #904309

#TimeUsernameProblemLanguageResultExecution timeMemory
904309irmuunKoala Game (APIO17_koala)C++17
19 / 100
11 ms456 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...