Submission #1258656

#TimeUsernameProblemLanguageResultExecution timeMemory
1258656tamzidFinding Routers (IOI20_routers)C++20
0 / 100
1 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 - 1; } } 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...