| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 263192 | salma | 통행료 (IOI18_highway) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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->second == 1){
if(ans1==-1)ans1=it->first;
else{
ans2 = it->first;
break;
}
}
}
answer(ans1 , ans2);
}
