7K12 blog

猫でも分かる何か

2020-05-22から1日間の記事一覧

EDPC S - Digit Sum

https://atcoder.jp/contests/dp/submissions/11937787 初期値は rep(j, 0, 10) if (j == CtoL(K[0])) dp[0][j % D][stEQ] += 1; など K以下の整数全てとmod(D)全てで繰り返しは rep(i, 0, Size(K)) rep(j, 0, 10) rep(k, 0, D) 状態は state::LT (less than…

ABC141 E - Who Says a Pun?

https://atcoder.jp/contests/abc141/submissions/11639951 ZアルゴリズムはS[i]からの部分列と先頭からの部分列の最大一致文字数を返す Zアルゴリズムの計算量は ZアルゴリズムはS[i]からの部分文字列が先頭S[0]からの文字列と何文字一致するかで返す。した…