2013年4月6日

Codeforecs 65D. Harry Potter and the Sorting Hat 一种新的记忆化搜索方式

摘要: D. Harry Potter and the Sorting Hattime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, Hogwarts has four houses: Gryffindor, Hufflepuff, Ravenclaw and Slytherin. The sorting of the first-years into houses is done by the Sorting Hat. The 阅读全文

posted @ 2013-04-06 20:02 电子幼体 阅读(271) 评论(0) 推荐(0) 编辑

NEFU 644 touring compute 最短路

摘要: touring computeTime Limit 1000msMemory Limit 65536KdescriptionThe best friends Mr. Li and Mr. Liu are touring in beautiful country M. M has n cities and m two-way roads in total. Each road connects two cities with fixed length.We assume that the cost of car traveling on the road is only related ... 阅读全文

posted @ 2013-04-06 18:20 电子幼体 阅读(159) 评论(0) 推荐(0) 编辑

NEFU 642 monkey 记忆化搜索

摘要: monkeyTime Limit 1000msMemory Limit 65536Kdescription Cc is a lovely monkey. It likes to play the game "catching plates". The game is as follows. There are n pegs in a line numbered from 1 to n. Cc stands on the first peg at the beginning. It is rather hard for Cc to jump from peg i to peg 阅读全文

posted @ 2013-04-06 18:17 电子幼体 阅读(151) 评论(0) 推荐(0) 编辑

NEFU 641 素数树

摘要: 素数树Time Limit 1000msMemory Limit 65536KdescriptionSuppose there is a tree named A. All nodes of A have a weight v(0 < v < 4000000).Now, we will give the definition of "Prime Node".A node is a Prime Node if the following conditions are satisfied.The subtree of A whose root node is b w 阅读全文

posted @ 2013-04-06 18:15 电子幼体 阅读(183) 评论(0) 推荐(0) 编辑

导航