# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782408 | 2023-07-13T23:28:26 Z | vjudge1 | Highway Tolls (IOI18_highway) | C++17 | 102 ms | 2536 KB |
#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 = U.size(); std::vector<int> w(M, 0); long long toll = ask(w); int dis = toll/A; int l = 0, r = N-1; while(l<r) { vector<int> v(M, 0); int mid = l+r>>1; for(int i = 0; i <= mid; i++) v[i] = 1; toll = ask(v); if(toll==A*dis) { l = mid+1; } else if (toll==B*dis){ r = mid; } else { long long over = toll-dis*(long long)A; over/=(B-A); answer(mid-over+1, mid-over+1+dis); return; } if(r-l+1==dis) { answer(l, r+1); return; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 17 ms | 484 KB | Output is correct |
2 | Correct | 15 ms | 692 KB | Output is correct |
3 | Correct | 21 ms | 968 KB | Output is correct |
4 | Correct | 53 ms | 2400 KB | Output is correct |
5 | Correct | 48 ms | 2536 KB | Output is correct |
6 | Correct | 102 ms | 2412 KB | Output is correct |
7 | Correct | 59 ms | 2412 KB | Output is correct |
8 | Correct | 92 ms | 2396 KB | Output is correct |
9 | Incorrect | 45 ms | 2396 KB | Output is incorrect: {s, t} is wrong. |
10 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 464 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 504 KB | Output is incorrect: {s, t} is wrong. |
2 | Halted | 0 ms | 0 KB | - |