B - 採点/Grading 解説 by ngtkana


Boyer–Moore majority vote algorithm を使うと、\(O ( N )\) 時間で達成できます。(入力 \(M\) も受け取らなくて大丈夫です。)

投稿日時:
最終更新: