#include "routers.h"
using namespace std;
std::vector<int> find_routers(int l, int n, int q) {
int idx = use_detector(0);
std::vector<int> ans;
int low=0,high=l,mid=(low+high)/2;
for(low=0,high=n-1;low<=high;){
mid=(low+high)/2;
if(use_detector(mid)==1){
high=mid-1;
}
else if(use_detector(mid)==0) low=mid+1;
//cout<<mid;
}
ans.push_back(0);
ans.push_back(min(high,low)*2);
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... |