上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 28 下一页
摘要: POJ推荐50题以及ACM训练方案(转)POJ 推荐50题第一类 动态规划(至少6题,2479和 2593 必做)2479和 259310151042(可贪心)114110501080122112602411(稍难)1276第二类 搜索(至少4题)1011103311292049205624882492(稍难,也可并查集)第三类 贪心(至少2题)10652054(难)15212709第四类 最短路 (至少3题)10621125179722532679 Bellman-Ford (难)第五类 最小生成树 (至少2题, 而且 Prim 和 Kruskal 至少各用一次)12511258178924 阅读全文
posted @ 2012-05-09 16:57 w0w0 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Constructing RoadsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 15578Accepted: 6302DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only 阅读全文
posted @ 2012-05-09 16:45 w0w0 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Agri-NetTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 26517Accepted: 10474DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John ordered a high speed co 阅读全文
posted @ 2012-05-09 16:24 w0w0 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Jungle RoadsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14682Accepted: 6559DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so 阅读全文
posted @ 2012-05-09 16:06 w0w0 阅读(162) 评论(0) 推荐(0) 编辑
摘要: The Unique MSTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 13474Accepted: 4674DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of 阅读全文
posted @ 2012-05-09 15:35 w0w0 阅读(187) 评论(0) 推荐(0) 编辑
摘要: NetworkTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 9892Accepted: 3711Special JudgeDescriptionAndrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since 阅读全文
posted @ 2012-05-09 11:16 w0w0 阅读(169) 评论(0) 推荐(0) 编辑
摘要: HighwaysTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15200Accepted: 7077DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They're plan 阅读全文
posted @ 2012-05-09 10:27 w0w0 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Children of the Candy CornTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6293Accepted: 2752DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors 阅读全文
posted @ 2012-05-09 00:09 w0w0 阅读(257) 评论(0) 推荐(0) 编辑
摘要: Red and BlackTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 16188Accepted: 8474DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can& 阅读全文
posted @ 2012-05-08 20:17 w0w0 阅读(155) 评论(0) 推荐(0) 编辑
摘要: A Knight's JourneyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19356Accepted: 6515DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two square 阅读全文
posted @ 2012-05-08 19:02 w0w0 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 棋盘问题Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14336Accepted: 7067Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-1 -1时表示输入结 阅读全文
posted @ 2012-05-08 16:03 w0w0 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Sum It UpTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4491Accepted: 2264DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are fou 阅读全文
posted @ 2012-05-08 14:26 w0w0 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Oil DepositsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8624Accepted: 4826DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the 阅读全文
posted @ 2012-05-08 09:31 w0w0 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Asteroids!Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2413Accepted: 919DescriptionYou're in space. You want to get home. There are asteroids. You don't want to hit them. InputInput to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be 阅读全文
posted @ 2012-05-07 23:37 w0w0 阅读(310) 评论(0) 推荐(0) 编辑
摘要: Dungeon MasterTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11111Accepted: 4290DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, sout 阅读全文
posted @ 2012-05-07 21:56 w0w0 阅读(185) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 28 下一页