Submission #263145

#TimeUsernameProblemLanguageResultExecution timeMemory
263145UserIsUndefinedHighway Tolls (IOI18_highway)C++14
0 / 100
11 ms544 KiB
#include "highway.h" #include <bits/stdc++.h> using namespace std; void find_pair(int N, std::vector<int> U, std::vector<int> V, int A, int B) { int m = V.size(); vector<int> ans; vector<int> test(m , 0); cout << "YES" << endl; int li = ask(test); bool good = true; cout << "YES" << endl; for (int i = 0 ; i < N && good ; i++){ vector<int> W(m); for (int j = 0 ; j < m && good ; j++){ if (U[j] == i || V[j] == i){ W[j] = 1; } else W[j] = 0; } int an = ask(W); if (an - B + A == li){ ans.push_back(i); if (ans.size() == 2)good = false; } } answer(ans[0] , ans[1]); }
#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...