제출 #777821

#제출 시각아이디문제언어결과실행 시간메모리
777821JoenPoenManFinding Routers (IOI20_routers)C++17
39 / 100
2 ms340 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); high = low-2; low = 0; curr--; } vector<int> ans; ans.push_back(0); for (int i = sna.size()-1; i >= 0; i--) { ans.push_back(2*sna[i] - ans.back()); } 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...