# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
71778 | 내일_개학이다_ㅠㅠ (#119) | The Ant Doing Hard Work (FXCUP3_ant) | C++98 | 3 ms | 360 KiB |
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>
int x;
int cnt = 0;
int DeliverCount(int y){
cnt++;
return y / x;
}
int FindK();
int main(){
scanf("%d", &x);
if(FindK() == x){
printf("%d\n", cnt);
}
}
*/
#include "ant.h"
int FindK(){
int rett = DeliverCount(66666666);
int ss = 1, ee = 99999999, ans = 99999999;
if(rett > 0){
ss = 66666666 / (rett+1) + 1;
ee = 66666666 / rett;
ans = ee; ee--;
}else{
ss = 66666667; ee = 99999998;
}
while(ss <= ee){
int mid = (ss+ee)/2;
int ret = DeliverCount(mid);
if(ret > 0){
ans = mid;
ee = mid - 1;
}else{
ss = mid + 1;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |