# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
329267 | seedkin | The Ant Doing Hard Work (FXCUP3_ant) | C11 | 1 ms | 384 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 "ant.h"
#include <stdio.h>
int FindK() {
int low = 1;
int high = 100000000;
int mid = (low + high) / 2;
int arr[3];
while(low != mid) {
int r = DeliverCount(mid);
if(r >= 1) {
if(r == 1) {
arr[1] = mid;
} else {
arr[2] = mid;
}
high = mid;
mid = (low + high) / 2;
} else {
arr[0] = mid;
low = mid;
mid = (low + high) / 2;
}
}
// printf("%d\n",low);
// for(int i =0; i< 3; i++) printf("%d ", arr[i]);
if(arr[2] == 2) return 1;
return arr[1];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |