保存されている過去のバージョンの一覧

2020年12月05日15時39分53秒

Codeforces Round #687 (based on Technocup 2021 Elimination Round 2) DIV1 A問題/DIV2 C問題/Round2 C問題 - Bouncing Ball

Source

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

問題概要

省略

解法

省略

cLayversion 20201205-1)のコード

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年04月27日01時15分44秒
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)

ログイン: