摘要: Jungle RoadsThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads be... 阅读全文
posted @ 2017-08-03 20:25 岩扉 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 畅通工程再续相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,... 阅读全文
posted @ 2017-08-03 20:13 岩扉 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Highwayshe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopi... 阅读全文
posted @ 2017-08-03 20:08 岩扉 阅读(211) 评论(0) 推荐(0) 编辑
摘要: NetworkingYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the a... 阅读全文
posted @ 2017-08-03 19:56 岩扉 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Highways The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult ... 阅读全文
posted @ 2017-08-03 19:54 岩扉 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Is It A Tree? A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connec... 阅读全文
posted @ 2017-08-02 22:31 岩扉 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Ice_cream’s world Iice_cream’s world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to d... 阅读全文
posted @ 2017-08-02 22:07 岩扉 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 小希的迷宫上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过... 阅读全文
posted @ 2017-08-02 22:03 岩扉 阅读(153) 评论(0) 推荐(0) 编辑
摘要: More is better Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the bett... 阅读全文
posted @ 2017-08-02 21:53 岩扉 阅读(153) 评论(0) 推荐(0) 编辑
摘要: The Suspects Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat i... 阅读全文
posted @ 2017-08-02 21:46 岩扉 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Rikka with GraphAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practic... 阅读全文
posted @ 2017-08-02 21:39 岩扉 阅读(193) 评论(0) 推荐(0) 编辑
摘要: poj 1383 Labyrinth 【 BFS实现 树的直径裸题】 The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is ... 阅读全文
posted @ 2017-08-01 20:52 岩扉 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Number TransformationIn this problem, you are given an integer number s. You can transform any integer number A to another integer num... 阅读全文
posted @ 2017-07-31 17:38 岩扉 阅读(317) 评论(0) 推荐(0) 编辑
摘要: Birthday Paradox Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose ... 阅读全文
posted @ 2017-07-31 10:42 岩扉 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Poj1142 Smith NumbersSmith Numbers Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13854 Accepted: 4716 Descr... 阅读全文
posted @ 2017-07-30 21:58 岩扉 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 容斥模板代码,int solve(){ int ans = 0; //是那四个数的倍数的数的数量 for (int i = 1 ; i < (1<<4) ; i++) //选数 { int ant = 0; //选中数的数量 int k = 1; /... 阅读全文
posted @ 2017-07-30 21:01 岩扉 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Halloween treatsEvery year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sw... 阅读全文
posted @ 2017-07-30 14:17 岩扉 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Find a multiple The input contains N natural (i.e. positive integer) numbers ( N int a[10010],sum[10010];int main(){ int n; whil... 阅读全文
posted @ 2017-07-30 11:24 岩扉 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Patrick and Shopping今天 Patrick 等待着他的朋友 Spongebob来他家玩。为了迎接 Spongebob,Patrick 需要去他家附近的两家商店 买一些吃的。他家离第一家商店有d1米远,离第二家商店有d2米远。还有,两家商店之间的距离... 阅读全文
posted @ 2017-07-30 09:23 岩扉 阅读(252) 评论(0) 推荐(0) 编辑
摘要: In this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the sum.... 阅读全文
posted @ 2017-07-30 09:15 岩扉 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Bear and Three Balls Limak is a little polar bear. He has n balls, thei-th ball has size ti.Limak wants to give one ball to each of h... 阅读全文
posted @ 2017-07-23 15:49 岩扉 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Today, Wet Shark is given n bishops on a 1000 by 1000 grid. Both rows and columns of the grid are numbered from 1 to 1000. Rows are nu... 阅读全文
posted @ 2017-07-21 16:35 岩扉 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 1203: 杨八方的语文问题 [字符串] 时间限制: 1 Sec 内存限制: 128 MB 题目描述 转眼间一学期就将要过去了,杨八方也在大学里经历了许多事情,最难忘的自然是学校里的各色课程。杨八方很喜欢中国的古典文化,所以当她知道大学有语文课的时候是很开心的。更幸运... 阅读全文
posted @ 2017-07-21 08:43 岩扉 阅读(149) 评论(0) 推荐(0) 编辑