Submission #71628

#TimeUsernameProblemLanguageResultExecution timeMemory
71628test (#119)The Ant Doing Hard Work (FXCUP3_ant)C++98
90 / 100
3 ms496 KiB
#include "ant.h" int paramin(int s, int e){ // Add more parameters as you need int mid, ans; while(s <= e){ mid = (s+e)/2; // Predicate here bool pred = (DeliverCount(mid) >= 1); // Predicate ends if(pred) e=mid-1, ans=mid; else s=mid+1; } return ans; } int FindK() { return paramin(1, 99999999); }

Compilation message (stderr)

ant.cpp: In function 'int paramin(int, int)':
ant.cpp:13:12: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return ans;
            ^~~
ant.cpp: In function 'int FindK()':
ant.cpp:17:28: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return paramin(1, 99999999);
                            ^
#Verdict Execution timeMemoryGrader output
Fetching results...