제출 #433045

#제출 시각아이디문제언어결과실행 시간메모리
433045ACmachineFinding Routers (IOI20_routers)C++17
60.06 / 100
3 ms296 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, l) for(int i = (j); i < (k); i += (l)) #define FORD(i, j, k, l) for(int i = (j); i >= (k); i -= (l)) #define REP(i, n) FOR(i, 0, n, 1) #define REPD(i, n) FORD(i, n, 0, 1) #define pb push_back typedef long long ll; std::vector<int> find_routers(int l, int n, int q) { vector<int> ans; ans.pb(0); const int mx = 19; REP(i, n - 1){ int curr = ans.back(); FORD(j, mx, 0, 1){ int tm = use_detector(min(l, (curr + (1 << j)))); if(tm == i) curr += (1 << j); } ans.pb(curr + (curr - 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...