Submission #110842

#TimeUsernameProblemLanguageResultExecution timeMemory
110842tjd229The Ant Doing Hard Work (FXCUP3_ant)C++14
0 / 100
2 ms384 KiB
#include "ant.h" int FindK() { int l = 1, r = 1e8; --r; int K = 0; int m = (r / 3) << 1; int cnt = DeliverCount(m); if (cnt) { l = m / (0 + cnt); if (!l) ++l; r = l + l; } else l = m + 1; while (l <= r) { m = (l + r) >> 1; if (DeliverCount(m)) r = m - 1; else l = m + 1; } return r+1; }

Compilation message (stderr)

ant.cpp: In function 'int FindK()':
ant.cpp:4:6: warning: unused variable 'K' [-Wunused-variable]
  int K = 0;
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...