제출 #777815

#제출 시각아이디문제언어결과실행 시간메모리
777815JoenPoenManFinding Routers (IOI20_routers)C++17
39 / 100
1 ms468 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; std::vector<int> find_routers(int l, int n, int q) { std::vector<int> sna; int curr = n-1; int low = 0, high = l-2, mid; while (curr != 0) { while (low != high) { mid = (low+high+1)/2; if (use_detector(mid) >= curr) high = mid-1; else low = mid; } sna.push_back(low); curr--; } vector<int> ans; ans.push_back(0); for (int i = sna.size()-1; i >= 0; i--) { ans.push_back(ans.back() + 2 * sna[i]); } 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...