답안 #601726

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
601726 2022-07-22T09:25:50 Z jack715 통행료 (IOI18_highway) C++14
6 / 100
90 ms 2124 KB
#include "highway.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
#define bb back
#define ff first
#define ss second

using namespace std;

int n, m, cost;

void find_pair(int N, vector<int> U, vector<int> V, int A, int B) {
  n = n, m = U.size();
  vector<int> q(m, 0);
  ll dist = ask(q);
  int l = 0, r = m;
  while (l < r) {
    int mid = (l + r) / 2;
    for (int i = 0; i <= mid; i++)
      q[i] = 1;
    if (ask(q) != dist)
      r = mid;
    else 
      l = mid+1;
    for (int i = 0; i <= mid; i++)
      q[i] = 0;
  }
  answer(l, l+dist/A);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Output is incorrect: {s, t} is wrong.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 244 KB Output is incorrect: {s, t} is wrong.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 492 KB Output is correct
2 Correct 17 ms 576 KB Output is correct
3 Correct 28 ms 868 KB Output is correct
4 Correct 86 ms 2124 KB Output is correct
5 Correct 90 ms 2012 KB Output is correct
6 Correct 53 ms 2012 KB Output is correct
7 Correct 80 ms 2092 KB Output is correct
8 Correct 62 ms 2052 KB Output is correct
9 Correct 82 ms 2052 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB Output is incorrect: {s, t} is wrong.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 15 ms 368 KB Output is incorrect: {s, t} is wrong.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 508 KB Output is incorrect: {s, t} is wrong.
2 Halted 0 ms 0 KB -