# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
418299 | FlippenFaz | Highway Tolls (IOI18_highway) | C++11 | 14 ms | 456 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;
set<int> curCities;
void find_pair(int N, vector<int> U, vector<int> V, int A, int B) {
vector<int> askArr;
askArr.resize(U.size());
ll sml = ask(askArr);
askArr[0] = 1;
ll cur = ask(askArr);
if (cur > sml) {
curCities.insert(U[0]);
curCities.insert(V[0]);
}
for (int i = 1; i < askArr.size(); i++) {
U[i-1] = 0;
U[i] = 1;
ll cur = ask(askArr);
if (cur > sml) {
if (curCities.erase(U[i]) == 0) {
curCities.insert(U[i]);
}
if (curCities.erase(V[i]) == 0) {
curCities.insert(V[i]);
}
}
}
vector<int> cits;
for (auto it = curCities.begin(); it != curCities.end(); it++) {
cits.push_back(*it);
}
answer(cits[0], cits[1]);
}
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... |