2020年12月05日15時39分53秒に更新されたバージョンを表示しています.
最新のページはこちらをご覧ください.
Codeforces Round #687 (based on Technocup 2021 Elimination Round 2) DIV1 A問題 (500pt)
Codeforces Round #687 (based on Technocup 2021 Elimination Round 2) DIV2 C問題 (1250pt)
Technocup 2021 - Elimination Round 2 C問題 (1250pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, P, K; ll X, Y;
char S[1d5+2];
int cnt[1d5+1];
{
REP(rd_int()){
ll res = ll_inf;
rd(N,P--,K,S,X,Y);
cnt[N] = 0;
rrep(i,N){
cnt[i] = 0;
if(S[i]=='0') cnt[i]++;
if(i+K <= N) cnt[i] += cnt[i+K];
}
rep(i,P,N) res <?= Y * (i-P) + X * cnt[i];
wt(res);
}
}
Current time: 2024年05月08日11時50分30秒
Last modified: 2020年12月05日15時39分53秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF687 CF_DIV1_A CF_DIV2_C
トップページに戻る
Logged in as: unknown user (not login)