Submission #1225604

#TimeUsernameProblemLanguageResultExecution timeMemory
1225604tamzidFinding Routers (IOI20_routers)C++20
0 / 100
2095 ms320 KiB
#include <bits/stdc++.h> #include "routers.h" using namespace std; vector<int> find_routers(int l, int n, int q) { vector<int> ans; ans.push_back(0); int low = 1; int high = l - 1; while(low <= high) { int m = low + (high - low) / 2; if(m & 1) ++m; if(use_detector(m) == 1) { low = m + 1; ans.push_back(low); } else { high = m - 1; } } return {0,ans.back()}; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...