| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 971031 | aryanc403 | Finding Routers (IOI20_routers) | C++17 | 1 ms | 604 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 "routers.h"
using namespace std;
std::vector<int> find_routers(int l, int n, int q) {
auto getNextPoint = [&](const int idx)->int{
int low=-1,up=l+1;
while(up-low>1){
const int mid = (low+up)/2;
if(use_detector(mid)>=idx)
up=mid;
else
low=mid;
}
return up;
};
std::vector<int> ans(n);
for (int i = 1; i < n; i++) {
const int mid = getNextPoint(i)-1;
ans[i]=2*mid-ans[i-1];
}
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... | ||||
