Submission #382966

#TimeUsernameProblemLanguageResultExecution timeMemory
382966AlmaFinding Routers (IOI20_routers)C++17
0 / 100
2 ms492 KiB
#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}; } 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...