はまやんはまやんはまやん

hamayanhamayan's blog

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

AB Substrings [diverta 2019 Programming Contest C]

https://atcoder.jp/contests/diverta2019/tasks/diverta2019_c 解法 https://atcoder.jp/contests/diverta2019/submissions/5348793文字列中にABがあれば順番にかかわらず含まれるので、そこを最初に数えておこう。 そのついでに先頭がBの個数topB、末尾がA…