제출 #426376

#제출 시각아이디문제언어결과실행 시간메모리
426376Pbezz통행료 (IOI18_highway)C++14
0 / 100
22 ms492 KiB
#include "highway.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back typedef pair<ll,ll> pii; const ll MAXN = 2e5+5; const ll INF = 1e9+7; ll n,M,W; ll find(){ ll lo=0,hi=M-1,mid,i,x; while(hi>lo){ mid = lo + (hi-lo)/2;//cout<<hi<<" "<<lo<<" "<<mid<<" "; std::vector<int> w(M); for(i=0;i<M;i++){w[i] = i<=mid ;} x=ask(w); cout<<x<<endl; if(x>W){ hi=mid; }else{ lo=mid+1; } } return hi; } void find_pair(int N, std::vector<int> U, std::vector<int> V, int A, int B) { M = U.size(); n=N; std::vector<int> w(M); W = ask(w); ll s=find(); // cout<<s<<"\n"; answer(s,s+(W/A)); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...