流水依依

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

博客园 首页 新随笔 联系 订阅 管理
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页

2013年12月7日 #

摘要: 过河Time Limit:1000MSMemory Limit:65536K题目描述 在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧。在桥上有一些石子,青蛙很讨厌踩在这些石子上。由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可能到达的点看成数轴上的一串整点:0,1,……,L(其中L是桥的长度)。坐标为0的点表示桥的起点,坐标为L的点表示桥的终点。青蛙从桥的起点开始,不停的向终点方向跳跃。一次跳跃的距离是S到T之间的任意正整数(包括S,T)。当青蛙跳到或跳过坐标为L的点时,就算青蛙已经跳出了独木桥。 题目给出独木桥的长度L,青蛙跳跃的距离范围S,T,桥上石子的位 阅读全文
posted @ 2013-12-07 11:14 流水依依 阅读(483) 评论(0) 推荐(0)

摘要: Play GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Problem DescriptionAlice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They take turns to pick up the top or bottom card from either pile, an 阅读全文
posted @ 2013-12-07 10:37 流水依依 阅读(244) 评论(0) 推荐(0)

摘要: 滑雪Time Limit:1000MSMemory Limit:65536KDescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-1... 阅读全文
posted @ 2013-12-07 10:33 流水依依 阅读(484) 评论(0) 推荐(0)

2013年12月6日 #

摘要: Problem JThe Closest Pair ProblemInput: standard inputOutput: standard outputTime Limit: 8 secondsMemory Limit: 32 MBGiven a set of points in a two dimensional space, you will have to find the distance between the closest two points.InputThe input file contains several sets of input. Each set of inp 阅读全文
posted @ 2013-12-06 17:18 流水依依 阅读(402) 评论(0) 推荐(0)

摘要: 翻纸牌游戏Time Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description有一种纸牌游戏,很有意思,给你N张纸牌,一字排开,纸牌有正反两面,开始的纸牌可能是一种乱的状态(有些朝正,有些朝反),现在你需要整理这些纸牌。但是麻烦的是,每当你翻一张纸牌(由正翻到反,或者有反翻到正)时,他左右两张纸牌(最左边和最右边的纸牌,只会影响附近一张)也必须跟着翻动,现在给你一个乱的状态,问你能否把他们整理好,使得每张纸牌都正面朝上,如果可以,最少需要多少次操作。Input有多个c 阅读全文
posted @ 2013-12-06 16:14 流水依依 阅读(358) 评论(1) 推荐(0)

2013年12月5日 #

摘要: I. The old PadawanTime limit: 0.5 secondMemory limit: 64 MBYoda: Use the Force. Yes. Now, the stone. Feel it. Concentrate!Luke Skywalker is having exhausting practice at a God-forsaken planet Dagoba. One of his main difficulties is navigating cumbersome objects using the Power. Luke’s task is to hol 阅读全文
posted @ 2013-12-05 21:13 流水依依 阅读(427) 评论(0) 推荐(0)

2013年12月4日 #

摘要: void CEightDlg::OnBnClickedButton2(){ // TODO: 在此添加控件通知处理程序代码 CString all = (_T("")); MessageBox(first) ; all += first ; std::vectorvec ; vec.clear() ; for(int i = 0 ;i answer = app->out() ; for(int i = 0 ;i ) ; friend bool operator B.f ; else ... 阅读全文
posted @ 2013-12-04 16:50 流水依依 阅读(333) 评论(0) 推荐(1)

摘要: 连连看Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外围绕过。玩家鼠 阅读全文
posted @ 2013-12-04 16:45 流水依依 阅读(196) 评论(0) 推荐(0)

摘要: /*闭区间 [ A[L] ,A[R] ]*/void QuickSort(int A[],int L ,int R){ if(L < R){ int pivot = R ,i = L - 1 , j; for(j = L ; j < R ;j++){ if(A[j] <= A[pivot]){ i++ ; std::swap(A[j],A[i]) ; } } std::swap(A[pivot],A[i+1]) ; pivot... 阅读全文
posted @ 2013-12-04 10:52 流水依依 阅读(110) 评论(0) 推荐(0)

2013年12月1日 #

摘要: 1. originPeople in Primitive society(原始社会)in order to survive,they have to hunt for food efficiently,so they learned the primary attack means.Gradually stone and wooden tools are added as weapon.When the war become more and more ,the dictators(执政者) attach great importance to attach means.So people c 阅读全文
posted @ 2013-12-01 18:46 流水依依 阅读(772) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 14 下一页