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

A. You Are Given Two Binary Strings...

Quiz https://codeforces.com/contest/1202/problem/A Submit https://codeforces.com/contest/1202/submission/60410011 解法 文字列をs, tとする 2kをかけることは左シフトと同じ tを左に滑らせていき、足して反転させたものを辞書順最小にすればいい 最後…

D. Shortest Cycle

Quiz https://codeforces.com/contest/1206/problem/D 2000人が解いているので解けなきゃいけない Submit なし 解法 https://codeforces.com/blog/entry/69158 まず、ビットで考えた時に同じビット位置が1のものが3つ存在したら、サイクルの長さ3で終了 …