# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
946666 | 2024-03-14T21:31:35 Z | PagodePaiva | Highway Tolls (IOI18_highway) | C++17 | 10 ms | 600 KB |
#include "highway.h" #include<bits/stdc++.h> #define N 90010 #define ll long long using namespace std; void find_pair(int n, std::vector<int> u, std::vector<int> v, int an, int bn) { ll a = an; ll b = bn; int l = 0, r = n-2; vector <int> w(n-1); for(int i = 0;i < n-1;i++) w[i] = 0; ll custo = ask(w); ll d = custo/a; while(l < r){ int mid = (l+r)/2; for(int i = l;i <= mid;i++){ w[i] = 1; } custo = ask(w); if(d*a == custo){ l = mid+1; } else{ r = mid; } } answer(l, l+d); return; // int M = U.size(); // for (int j = 0; j < 50; ++j) { // std::vector<int> w(M); // for (int i = 0; i < M; ++i) { // w[i] = 0; // } // long long toll = ask(w); // } // answer(0, N - 1); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 600 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 600 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 10 ms | 600 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |