上一页 1 ··· 7 8 9 10 11 12 13 14 下一页

2013年9月7日

POJ 2251 Dungeon Master

摘要: Dungeon MasterTime Limit:1000MSMemory Limit:65536KTotal Submissions:14268Accepted:5552DescriptionYou 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, south, e 阅读全文

posted @ 2013-09-07 01:43 天使是一个善良的神 阅读(184) 评论(0) 推荐(0) 编辑

POJ 1246 Find The Multiple

摘要: Find The MultipleTime Limit:1000MSMemory Limit:10000KTotal Submissions:15468Accepted:6359Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 阅读全文

posted @ 2013-09-07 00:43 天使是一个善良的神 阅读(404) 评论(0) 推荐(1) 编辑

2013年9月6日

HDU 2563 统计问题

摘要: 统计问题Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4250Accepted Submission(s): 2477 Problem Description在一无限大的二维平面中,我们做如下假设: 1、每次只能移动一格; 2、不能向后走(假设你的目的地是“向上”,那么你可以向左走,可以向右走,也可以向上走,但是不可以向下走); 3、走过的格子立即塌陷无法再走第二次;求走n步不同的方案数(2种走法只要有一步不一样,即被认为是不同的方案)。I 阅读全文

posted @ 2013-09-06 20:36 天使是一个善良的神 阅读(239) 评论(1) 推荐(1) 编辑

2013年9月5日

POJ 2488 A Knight's Journey

摘要: A Knight's JourneyTime Limit:1000MSMemory Limit:65536KTotal Submissions:26188Accepted:8942DescriptionBackground 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 squares in 阅读全文

posted @ 2013-09-05 16:34 天使是一个善良的神 阅读(193) 评论(0) 推荐(0) 编辑

HDU 1715 大菲波数

摘要: 大菲波数Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8683Accepted Submission(s): 2947 Problem DescriptionFibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。Input输入第一行为一个整数N,接下来N行为整数Pi(1#include #include #include using namesp 阅读全文

posted @ 2013-09-05 01:31 天使是一个善良的神 阅读(172) 评论(0) 推荐(0) 编辑

2013年9月4日

POJ 1321 棋盘问题

摘要: 棋盘问题Time Limit:1000MSMemory Limit:10000KTotal Submissions:19282Accepted:9611Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n #include #include #include using name 阅读全文

posted @ 2013-09-04 23:06 天使是一个善良的神 阅读(167) 评论(0) 推荐(0) 编辑

HDU 1664 Different Digits

摘要: Different DigitsTime Limit: 10000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 464Accepted Submission(s): 106 Problem DescriptionGiven a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least numbe 阅读全文

posted @ 2013-09-04 19:21 天使是一个善良的神 阅读(404) 评论(0) 推荐(0) 编辑

2013年9月1日

HDU 1045 Fire Net

摘要: Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5076Accepted Submission(s): 2847 Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a 阅读全文

posted @ 2013-09-01 23:39 天使是一个善良的神 阅读(163) 评论(0) 推荐(0) 编辑

无前驱的顶点的拓扑排序

摘要: 无前驱的顶点的拓扑排序算法,采用链式前向星存储图,队列实现拓扑排序代码:#include #include #include using namespace std;int i,j,w;int head[100];int indegree[100];struct EdgeNode{ int to; int next;};EdgeNode Edge[1000];int n,m;int main(){ while(~scanf("%d%d",&n,&m)) { memset(indegree,0,sizeof(indegree)); memset(head,0, 阅读全文

posted @ 2013-09-01 20:36 天使是一个善良的神 阅读(372) 评论(0) 推荐(0) 编辑

2013年8月31日

HDU 1518 Square

摘要: SquareTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6187Accepted Submission(s): 2013 Problem DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square?InputThe first line of input contains N, t 阅读全文

posted @ 2013-08-31 00:46 天使是一个善良的神 阅读(192) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 下一页

导航