O(1)

SRM 207 DIV1 Hard GetThemAll

問題 Editorial 問題 上下左右に無限に広がったチェス盤がある。 今、ナイトは(0, 0)にいて、標準のナイトの動きをすることができる。 点が複数(pieces)与えられた時、全ての点に行く動きの最小数を求めよ 1 -1000000 解答 まず巡回セールスマン部分は全探索…

SRM 522 DIV1 Easy RowAndCoins

http://apps.topcoder.com/stat?c=problem_statement&pm=11566&rd=14547 コメント Editorial http://apps.topcoder.com/wiki/display/tc/SRM+522 を見て、感動した。 これはDIV2MediumでもRowAndManyCoinshttp://apps.topcoder.com/stat?c=problem_statement…