Codeforces Good Bye 2021: 2022 is NEAR D問題 (2000pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
REP(rd_int()){
int @N; ll @A[N], @X, s; int chk[N] = {};
rep(i,N) A[i] -= X;
rep(i,N){
s = A[i];
rep(j,min(i,5)){
if(chk[i-j-1]==0) break;
s += A[i-j-1];
if(s < 0) break_continue;
}
chk[i] = 1;
}
wt(sum(chk(N)));
}
Current time: 2024年05月19日05時11分43秒
Last modified: 2021年12月31日18時01分47秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Good_Bye_2021
トップページに戻る
Logged in as: unknown user (not login)