# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
297195 | Saboon | Highway Tolls (IOI18_highway) | C++17 | 808 ms | 13932 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;
typedef long long ll;
const int maxn = 2e5 + 10;
vector<int> Q;
ll Cost = 0;
int p[maxn], par[maxn];
vector<pair<int,int>> g[maxn];
bool mark[maxn];
int get(int L, int R){
if (L+1 == R)
return L;
int mid = (L + R) >> 1;
for (int v = L; v < mid; v++)
for (auto [u,idx] : g[v])
Q[idx] |= 1;
ll nowCost = ask(Q);
for (int v = L; v < mid; v++)
for (auto [u,idx] : g[v])
Q[idx] &= 0;
if (nowCost != Cost)
return get(L,mid);
else
return get(mid,R);
}
int Que[maxn], head = 0, tail = 0, h[maxn];
# | 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... |