流水依依

希望朋友们有个好的身体,开开心心工作与学习。

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页

2013年9月11日 #

摘要: Naive and Silly MugglesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 136Accepted Submission(s): 93Problem DescriptionThree wizards are doing a experiment. To avoid from bothering, a special magic is set around them. The magic forms a circle, whic 阅读全文
posted @ 2013-09-11 22:04 流水依依 阅读(343) 评论(0) 推荐(0)

2013年9月9日 #

摘要: 题目1536:树的最小高度时间限制:5 秒内存限制:128 兆题目描述:给定一棵无向树, 我们选择不同的节点作为根节点时,可以得到不同的高度(即树根节点到叶子节点距离的最大值), 现在求这棵树可能的最低高度。输入:输入可能包含多个测试案例。对于每个测试案例,输入的第一行为一个整数n(1 #include #include #include #include #include #include #include #define Min(a,b) ((a)<(b)?(a):(b))#pragma comment(linker, "/STACK:16777216")usin 阅读全文
posted @ 2013-09-09 22:46 流水依依 阅读(344) 评论(0) 推荐(0)

2013年9月8日 #

摘要: Rotation Lock PuzzleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionAlice was felling into a cave. She found a strange door with a number square matrix. These numbers can be rotated around the center clockwise or counterclockwise. A fairy came and to 阅读全文
posted @ 2013-09-08 18:06 流水依依 阅读(323) 评论(0) 推荐(0)

2013年9月7日 #

摘要: Counting OffspringTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionYou are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose number is less than i in all the succeeding nodes of node i. N 阅读全文
posted @ 2013-09-07 13:54 流水依依 阅读(237) 评论(0) 推荐(0)

2013年9月6日 #

摘要: 题目1368:二叉树中和为某一值的路径时间限制:1 秒内存限制:32 兆特殊判题:否题目描述:输入一颗二叉树和一个整数,打印出二叉树中结点值的和为输入整数的所有路径。路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径。输入:每个测试案例包括n+1行:第一行为2个整数n,k(1#include #include #include #include #include #include #include #include #include #include #include #include #define Max(a,b) ((a)>(b)?(a):(b))#define M 阅读全文
posted @ 2013-09-06 22:36 流水依依 阅读(328) 评论(0) 推荐(0)

摘要: 2197: Pick applesTime Limit:1 SecMemory Limit:128 MBDescriptionOnce ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because she has never seen so many apples before. Each k 阅读全文
posted @ 2013-09-06 12:57 流水依依 阅读(368) 评论(0) 推荐(0)

摘要: 2218: Thrall’s DreamTime Limit:1 SecMemory Limit:128 MBDescriptionWe never paid any heed to the ancient prophecies, like fools we clung to the old hatreds, and fought as we had for generations. Until one day the sky rained fire, and a new enemy came upon us. We stand now upon the brink of destructio 阅读全文
posted @ 2013-09-06 10:16 流水依依 阅读(639) 评论(0) 推荐(0)

2013年9月5日 #

摘要: 坐标旋转公式x1=cos(angle)*x-sin(angle)*y;y1=cos(angle)*y+sin(angle)*x;其中x,y表示物体相对于旋转点旋转angle的角度之前的坐标,x1,y1表示物体旋转angle后相对于旋转点的坐标从数学上来说,此公式可以用来计算某个点绕另外一点旋转一定角度后的坐标,例如:A(x,y)绕B(a,b)旋转β度后的位置为C(c,d),则x,y,a,b,β,c,d有如下关系式:1。设A点旋转前的角度为δ,则旋转(逆时针)到C点后角度为δ+β2。求A,B两点的距离:dist1=|AB|=y/sin(δ)=x/cos(δ)3。求C,B两点的距离:dist2=| 阅读全文
posted @ 2013-09-05 19:56 流水依依 阅读(7221) 评论(0) 推荐(0)

摘要: YTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionSample Input41 21 31 4Sample Output1Hint1. The only set is {2,3,4}.2. Please use #pragma comment(linker, "/STACK:16777216")Source2013 Multi-University Training Contest 10 思路:反面考虑,用总的方案数减去A, 阅读全文
posted @ 2013-09-05 09:04 流水依依 阅读(271) 评论(0) 推荐(0)

2013年9月4日 #

摘要: EditorTime Limit: 3000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionSample Input8I 2I -1I 1Q 3LDRQ 2Sample Output23HintThe following diagram shows the status of sequence after each instruction:Source2013 Multi-University Training Contest 10思路:两个栈的应用 。#include #i 阅读全文
posted @ 2013-09-04 22:50 流水依依 阅读(357) 评论(0) 推荐(0)

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