#include "routers.h"
#include <bits/stdc++.h>
using namespace std;
vector <int> find_routers(int lungime , int cantitate , int degeaba)
{
vector <int> rezultat = {0};
for (int indice = 0 ; indice + 1 < cantitate ; indice++)
{
int locatie = rezultat[indice];
for (int putere = (1 << 16) ; putere ; putere >>= 1) {
if (locatie + putere <= lungime && use_detector(locatie + putere) == indice)
{ locatie += putere; }
}
rezultat.push_back(2 * locatie - rezultat[indice]);
}
return rezultat;
}
# | 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... |