# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
915406 | biank | 통행료 (IOI18_highway) | C++14 | 3089 ms | 12108 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 <bits/stdc++.h>
using namespace std;
#define SIZE(x) int(x.size())
#define forn(i,n) for(int i=0;i<int(n);i++)
#define pb push_back
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long ll;
ll ask(const vi &w);
void answer(int s, int t);
const int MAXN = 90000;
int d[2][MAXN];
vector<ii> adj[MAXN];
int c=0;
void find_pair(int n, vi u, vi v, int /*a*/, int /*b*/) {
int m=SIZE(u);
forn(i,m) {
adj[u[i]].pb({v[i],i});
adj[v[i]].pb({u[i],i});
}
vi w(m,0);
ll D=ask(w);
auto bs=[&](int lo, int hi) {
while(hi-lo>1) {
int mid=(lo+hi)/2;
forn(i,m) w[i]=i<=mid;
if(ask(w)!=D) hi=mid;
Compilation message (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... |