#include "highway.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
typedef pair<ll,ll> pii;
const ll MAXN = 2e5+5;
const ll INF = 1e9+7;
ll n,M,W;
ll find(){
ll lo=0,hi=M-1,mid,i,x;
while(hi>lo){
mid = lo + (hi-lo)/2;//cout<<hi<<" "<<lo<<" "<<mid<<" ";
std::vector<int> w(M);
for(i=0;i<M;i++){w[i] = i<=mid ;}
x=ask(w);
//cout<<x<<endl;
if(x>W){
hi=mid;
}else{
lo=mid+1;
}
}
return hi;
}
void find_pair(int N, std::vector<int> U, std::vector<int> V, int A, int B) {
M = U.size();
n=N;
std::vector<int> w(M);
W = ask(w);
ll s=find();
// cout<<s<<"\n";
answer(s,s+(W/A));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
488 KB |
Output is correct |
2 |
Correct |
38 ms |
704 KB |
Output is correct |
3 |
Correct |
30 ms |
980 KB |
Output is correct |
4 |
Correct |
85 ms |
2400 KB |
Output is correct |
5 |
Correct |
146 ms |
2400 KB |
Output is correct |
6 |
Correct |
154 ms |
2456 KB |
Output is correct |
7 |
Correct |
83 ms |
2412 KB |
Output is correct |
8 |
Correct |
126 ms |
2404 KB |
Output is correct |
9 |
Correct |
144 ms |
2408 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
32 ms |
484 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
456 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |