Submission #71815

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
718152018-08-25 16:21:56team (#119)The Ant Doing Hard Work (FXCUP3_ant)C++17
0 / 100
3 ms248 KiB
#include <bits/stdc++.h>
#include "ant.h"
using namespace std;
int FindK(){
int l=1; int r=1e8-1;
int ct=0;
while(l<r){
int mid=(l+r)/2;
int tmp=DeliverCount(mid);
if(tmp){
r=mid/tmp;
l=max(mid/(tmp+1)+1,l);
}
else l=mid+1;ct++;
if(ct==26) break;
}
return l;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

ant.cpp: In function 'int FindK()':
ant.cpp:14:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
         else l=mid+1;ct++;
         ^~~~
ant.cpp:14:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
         else l=mid+1;ct++;
                      ^~
#Verdict Execution timeMemoryGrader output
Fetching results...