摘要: 有两棵APP树,编号为1,2.每一秒,这两棵APP树中的其中一棵会掉一个APP.每一秒,你可以选择在当前APP树下接APP,或者迅速移动到另外一棵APP树下接APP(移动时间可以忽略不计),但由于却乏锻炼,你最多移动W次.问在T秒内,你最多能收集多少个APP.假设你开始站在1号APP树下. Inpu 阅读全文
posted @ 2019-07-11 23:44 coolwx 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 一组研究人员正在设计一项实验,以测试猴子的智商。他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子。如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉。 研究人员有n种类型的砖块,每种类型的砖块都有无限个。第i块砖块的长宽高分别用xi,yi,zi来表示。 阅读全文
posted @ 2019-07-11 23:42 coolwx 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more diffi 阅读全文
posted @ 2019-07-11 23:39 coolwx 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement; I.e., a loop which star 阅读全文
posted @ 2019-07-10 00:17 coolwx 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方 阅读全文
posted @ 2019-07-09 23:37 coolwx 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 很久很久以前,在遥远的大陆上有一个美丽的国家。统治着这个美丽国家的国王是一个园艺爱好者,在他的皇家花园里种植着各种奇花异草。有一天国王漫步在花园里,若有所思,他问一个园丁道: “最近我在思索一个问题,如果我们把花坛摆成六个六角形,那么……” “那么本质上它是一个深度优先搜索,陛下”,园丁深深地向国王 阅读全文
posted @ 2019-07-08 23:56 coolwx 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the 阅读全文
posted @ 2019-07-07 15:25 coolwx 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose 阅读全文
posted @ 2019-07-07 12:56 coolwx 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,g 阅读全文
posted @ 2019-07-06 23:15 coolwx 阅读(117) 评论(0) 推荐(0) 编辑
摘要: George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the origina 阅读全文
posted @ 2019-07-06 21:25 coolwx 阅读(167) 评论(0) 推荐(0) 编辑