網頁

Wednesday 14 July 2010

Individual Training 13/07/2010

A - Adventure of Super Mario

Shortest Path
一開始以DFS來處理super run, 後來發現處理不到limit的情況
於是改用floyd-warshall preprocess, 改outer loop便巧妙地處理到castle不能經過的條件



B - Geometry with a ruler

geom題, 不過差不多要0誤差..
我用fraction + long long, 不斷取 gcd 約簡過了
理論上應該會有case搞到我 overflow..



C - Chessboard Puzzle

學到野的一題, 之後打篇entry詳細講..



D - Diamond Puzzle

簡單BFS



E - Discrete Square Roots

又係同mod有關的題目.. 未識做

No comments:

Post a Comment