Educational Codeforces Round 77 D問題
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int M, N, K, T, A[2d5];
int L[2d5], R[2d5], D[2d5];
{
int res, agi, p, nx, t;
rd(M,N,K,T,A(M),(L,R,D)(K));
sortF(M,A);
sortA(K,L,R,D);
res = bsearch_max[int,x,0,M][
agi = A[M-x];
t = p = 0;
rep(i,K) if(D[i] > agi){
t += (L[i] - 1) - p;
p = L[i] - 1;
nx = R[i];
while(i+1 < K && nx >= L[i+1]){
i++;
if(D[i] > agi) nx >?= R[i];
}
t += 3 * (nx - p);
p = nx;
}
t += N + 1- p;
](t <= T);
wt(res);
}
Current time: 2024年05月04日22時55分11秒
Last modified: 2020年02月16日15時09分55秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces
トップページに戻る
Logged in as: unknown user (not login)