摘要: Emuskald considers himself a master of flow algorithms. Now he has completed his most ingenious program yet — it calculates the maximum flow in an undirected graph. The graph consists ofnvertices andmedges. Vertices are numbered from 1 ton. Vertices1andnbeing the source and the sink respectively.How 阅读全文
posted @ 2013-07-06 20:12 Oyking 阅读(552) 评论(0) 推荐(0)
摘要: You have been givenndistinct integersa1, a2, ..., an. You can remove at mostkof them. Find the minimum modularm(m > 0), so that for every pair of the remaining integers(ai, aj), the following unequality holds:.InputThe first line contains two integersnandk(1 ≤ n ≤ 5000, 0 ≤ k ≤ 4), which we have 阅读全文
posted @ 2013-07-06 00:04 Oyking 阅读(394) 评论(0) 推荐(0)