競プロ

AtCoder

[AtCoder][競技プログラミング][python] ABC 249 D-Index Trio

問題 問題キャプチャ。 方針 \(1\)個ずつ確認すると\(O(N^3)\)かかる。素因数を列挙する方針にした。素因数は以下のコードで列挙できる。計算量は\(O(\log{N})\)。 import mat...
AtCoder

[AtCoder]ABC 249 C-Just K

問題 問題キャプチャ。 方針 全検索でよい。Bit全検索でもpythonのitertools libraryのcombinationsでも。 解答 #input from collections import...
タイトルとURLをコピーしました