# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
263188 | salma | 통행료 (IOI18_highway) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "highway.h"
#include<bits/stdc++.h>
using namespace std;
void find_pair(int N, std::vector<int> U, std::vector<int> V, int A, int B) {
int M = U.size();
std::vector<int> w(M);
map<int,int>a;
for (int i = 0; i < M; ++i) {
w[i] = 0;
}
long long toll = ask(w);
int cnt = toll/A;
for(int i=0;i<N;i++){
if(cnt == 0)break;
w[i]=1;
if(toll != ask(w)){
a[V[i]]++;
a[U[i]]++;
cnt--;
}
w[i]=0;
}
map<int,int>::iterator it = m.begin();
int ans1=-1 , ans2=-1;
for(;it!=m.end();it++){
if(it->secind == 1){
if(ans1==-1)ans1=it->first;
else{
ans2 = it->first;
break;
}
}
}
answer(ans1 , ans2);
}