Submission #756175

#TimeUsernameProblemLanguageResultExecution timeMemory
756175drdilyorHighway Tolls (IOI18_highway)C++17
0 / 100
12 ms1012 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...