제출 #1024372

#제출 시각아이디문제언어결과실행 시간메모리
102437212345678Finding Routers (IOI20_routers)C++17
69.65 / 100
1 ms856 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; const int nx=1e3+5; vector<int> find_routers(int L, int n, int q) { int lst=0; vector<int> res(n); for (int i=1; i<n; i++) { int l=lst+1, r=L; while (l<r) { int md=(l+r)/2; if (use_detector(md)!=i-1) r=md; else l=md+1; } int cnt=l-lst-2; //cout<<"here "<<l<<' '<<cnt<<'\n'; res[i]=l+cnt; lst=res[i]; //cout<<"debug "<<i<<' '<<res[i]<<'\n'; } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...