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

Grundy数を初めて使ってみた Day 1: Game of Stones

Quiz https://www.hackerrank.com/contests/5-days-of-game-theory/challenges/a-game-of-stones/problem AC (要ログイン) https://www.hackerrank.com/contests/5-days-of-game-theory/challenges/a-game-of-stones/submissions/code/1314174009 計算量 長…

木の直径(重みあり) Diameter of a Tree

Quiz http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_5_A AC http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=3544272#1 補足 前回記事でエッジの重み1バージョンを書いたが、今回はエッジの重みが必要 ほぼ変更は必要なかった。bfs…