#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-1};
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
492 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
492 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
492 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
492 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |