Submission #1230088

#TimeUsernameProblemLanguageResultExecution timeMemory
1230088lechaaFinding Routers (IOI20_routers)C++20
0 / 100
0 ms320 KiB
#include "routers.h" #include <vector> using namespace std; std::vector<int> find_routers(int l, int n, int q) { vector<int> pos; pos.push_back(use_detector(0)); for(int i = 1; i < n; i++){ int low = pos[i-1]; int top = n; int ns = -1; while(low <= top){ int mid = (low+top)/2; if(use_detector(mid) == pos[i-1]){ low = mid+1; }else{ ns = mid; top = mid-1; } } pos.push_back(use_detector(ns)); } return pos; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...