2019-12-27から1日間の記事一覧

The Number Of Good Substrings - Educational Codeforces Round 72 div2 c

#two pointers コード https://codeforces.com/contest/1217/submission/67684154 解法 good か判定する文字列 (の左端と右端) を全探索する 右端を固定して左端をその右端の位置から左に延ばせば値が求まる値が求まったとき, その文字列の長さがその数より…

double factorial - abc 148 e

#math 問題 https://atcoder.jp/contests/abc148/tasks/abc148_e 類題 https://atcoder.jp/contests/abc052/tasks/arc067_a https://codeforces.com/contest/2/problem/B 解法 偶数の方が多いので, 素因数 5 の数を数えるここで, 例えば N = 100 なら, N!! =…

Remove the Substring (hard version) - #579 d2

#two pointers #文字列 **解法 削除する区間の左 i を全探索する i より左に t の文字 (前から) があればあるほど削除する区間を延ばせる 具体例で解法を示すs = dcabdac t = abct は, s の 2 番目 (0 indexed) 以降の文字列で作れる 3 番目以降では無理t の…