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"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
std::vector<int> find_routers(int l, int n, int q)
{
int minimo = 1, maximo = l, x, y;
while (minimo < maximo - 1)
{
int med = (minimo + maximo)/2;
y = (med + 1)/2;
while (2*y <= minimo)
y ++;
while (2*y-1 >= maximo)
y --;
x = use_detector(y);
if (x == 0)
minimo = 2*y;
else
maximo = 2*y - 1;
}
vector<int> ans;
ans.pb (0);
if (minimo%2 == 0)
ans.pb (minimo);
else
ans.pb (maximo);
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... |