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>
#include "routers.h"
using namespace std;
vector<int> find_routers(int l, int n, int q) {
int lo = 0, hi = l, mid, res = 0;
while (lo <= hi) {
mid = lo + (hi-lo) / 2;
if (use_detector(mid) == 0) {
res = mid;
hi = mid-1;
} else {
lo = mid+1;
}
}
vector<int> ans;
if (res == 0) {
ans = {0, 1};
} else {
ans = {0, 2*res};
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |