#include<bits/stdc++.h>
#include "highway.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
const int maxn=9e4+5;
int n,m,a,b;
vector<int>u,v;
vector<pair<int,int>>adj[maxn];
vector<int>par(maxn,0),dep(maxn,0),edge(maxn,0),w;
vector<bool>used(maxn);
void dfs(int x,int p){
par[x]=p;
for(auto [y,e]:adj[x]){
if(y!=p){
dep[y]=dep[x]+1;
edge[y]=e;
dfs(y,x);
}
}
}
void find_pair(int N,vector<int>U,vector<int>V,int A, int B){
n=N,u=U,v=V,a=A,b=B;
m=u.size();
w.resize(m);
fill(all(w),0);
ll C=ask(w);
int d=C/A;
int l=0,r=n-1-d;
while(l<r){
int mid=(l+r)/2;
fill(all(w),0);
for(int i=0;i<=mid;i++){
w[i]=1;
}
if(ask(w)>C){
r=mid;
}
else{
l=mid+1;
}
}
answer(l,l+d);
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
3416 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
3416 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
3672 KB |
Output is correct |
2 |
Correct |
12 ms |
3928 KB |
Output is correct |
3 |
Correct |
18 ms |
4368 KB |
Output is correct |
4 |
Correct |
55 ms |
6076 KB |
Output is correct |
5 |
Correct |
49 ms |
6084 KB |
Output is correct |
6 |
Correct |
54 ms |
5968 KB |
Output is correct |
7 |
Correct |
50 ms |
6096 KB |
Output is correct |
8 |
Correct |
49 ms |
5968 KB |
Output is correct |
9 |
Correct |
53 ms |
6096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
3416 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
3928 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
3928 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |