# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
71778 | 내일_개학이다_ㅠㅠ (#119) | The Ant Doing Hard Work (FXCUP3_ant) | C++98 | 3 ms | 360 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
#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... |