제출 #426375

#제출 시각아이디문제언어결과실행 시간메모리
426375Pbezz통행료 (IOI18_highway)C++14
0 / 100
160 ms2484 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; int n,M,W; int find(){ int lo=0,hi=M-1,mid,i; while(hi>lo){ mid = lo + (hi-lo)/2; std::vector<int> w(M); for(i=0;i<M;i++){w[i] = i<=mid ;} if(ask(w)>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); int 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...