2010-08-29から1日間の記事一覧

Topcoder Member SRM 478 "KiwiJuiceEasy"

問題:http://www.topcoder.com/stat?c=problem_statement&pm=11020 (要ログイン) public class KiwiJuiceEasy { public int[] thePouring(int[] capacities, int[] bottles, int[] fromId, int[] toId) { for(int i = 0; i < fromId.length; ++i){ bottle…

Codeforces #14(div2) D "Two Paths"

問題:http://codeforces.com/contest/14/problem/D他の人のコードを書き写してみた.どうやら全域木になっているようなので,任意のエッジを切断したあとの エッジの端点を含む木における最長の長さ(木の深さかリーフ同士における 最長の長さ)を求めてい…