Submission #1258657

#TimeUsernameProblemLanguageResultExecution timeMemory
1258657tamzidFinding Routers (IOI20_routers)C++20
39 / 100
0 ms328 KiB
#include <bits/stdc++.h>
#include "routers.h"
using namespace std;
using ll = long long;

std::vector<int> find_routers(int l, int n, int q) {
    vector<int> ans;
    ans.push_back(0);
    int low = 1, high = l;
    while(low < high)
    {
      int mid = (low + high) / 2;
      if(use_detector(mid) == 0)
      {
        low = mid + 1;
      }
      else
      {
        high = mid;
      }
    }
    ans.push_back((low - 1) * 2);
    return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...