Submission #601715

#TimeUsernameProblemLanguageResultExecution timeMemory
601715jack715Highway Tolls (IOI18_highway)C++14
0 / 100
110 ms2084 KiB
#include "highway.h" #include <bits/stdc++.h> #define ll long long #define pb push_back #define pp pop_back #define mp make_pair #define bb back #define ff first #define ss second using namespace std; int n, m, cost; void find_pair(int N, vector<int> U, vector<int> V, int A, int B) { n = n, m = U.size(); vector<int> q(m, 0); int dist = ask(q); int l = 0, r = m; while (l < r) { int mid = (l + r) / 2; for (int i = 0; i <= mid; i++) q[i] = 1; if (ask(q) != dist) r = mid; else l = mid+1; for (int i = 0; i <= mid; i++) q[i] = 0; } answer(l, l+dist/A); }
#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...