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<iostream>
using namespace std;
using ll = long long;
void find_pair(int n, std::vector<int> u, std::vector<int> v, int a, int b) {
vector<vector<int>> adj(n);
for (int i = 0; i < (int)u.size(); i++){
adj[u[i]].push_back(i);
adj[v[i]].push_back(i);
}
int toll = ask(vector<int>(u.size(), 0));
for (int i = 1; i < n; i++) {
vector<int> weather(n);
for (int j : adj[i]) {
weather[j] = 1;
}
if (ask(weather) == toll -a + b) {
answer(0, i);
}
}
}
# | 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... |