/*
* Starting with the name of almighty ALLAH
*/
#include "routers.h"
// #include <bits/stdc++.h>
using namespace std;
// #define int long long
vector<int> p = {0,8};
// int use_detector(int x)
// {
// vector<int>::iterator left, right;
// right = upper_bound(p.begin(), p.end(), x);
// left = prev(right);
// if (right == p.end()) {
// return p.size() - 1;
// } else if ((x - *left) <= (*right - x)){
// return std::distance(p.begin(), left);
// } else {
// return std::distance(p.begin(), right);
// }
// }
vector<int> find_routers(int l, int n, int q) {
vector<int> ans;
ans.push_back(0);
for (int i = 1; i <= l; i++)
{
int x = use_detector(i);
if(x == 0) {
int y = (x*2);
ans.push_back(y);
break;
}
}
return ans;
}
// int32_t main() {
// ios::sync_with_stdio(false);
// cin.tie(0);
// int l, n, q;
// cin>>l>>n>>q;
// vector<int> robi = find_routers(l,n,q);
// for (int i = 0; i < robi.size(); ++i)
// {
// cout<<robi[i]<<' ';
// }
// }
# | 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... |