# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
946670 | PagodePaiva | 통행료 (IOI18_highway) | C++17 | 88 ms | 2236 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "highway.h"
#include<bits/stdc++.h>
#define N 90010
#define ll long long
using namespace std;
void find_pair(int n, std::vector<int> u, std::vector<int> v, int an, int bn) {
ll a = an;
ll b = bn;
int l = 0, r = n-2;
vector <int> w(n-1);
for(int i = 0;i < n-1;i++) w[i] = 0;
ll custo = ask(w);
ll d = custo/a;
while(l < r){
int mid = (l+r)/2;
for(int i = l;i <= mid;i++){
w[i] = 1;
}
custo = ask(w);
if(d*a == custo){
l = mid+1;
}
else{
r = mid;
}
for(int i = 0;i < n-1;i++) w[i] = 0;
}
answer(l, l+d);
return;
// int M = U.size();
// for (int j = 0; j < 50; ++j) {
// std::vector<int> w(M);
// for (int i = 0; i < M; ++i) {
// w[i] = 0;
// }
// long long toll = ask(w);
// }
// answer(0, N - 1);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |