随笔分类 -  水题

摘要:详解 该函数的主要作用是计算一个数字的二进制中有多少个1,返回值就是其中1的个数。 它使用一张基于表的方法来进行位搜索,因此这个操作的执行效率很高 此处举一题 P1582 倒水 阅读全文
posted @ 2018-08-15 19:04 岩扉 阅读(3383) 评论(0) 推荐(1)
摘要:The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus 阅读全文
posted @ 2018-08-15 10:27 岩扉 阅读(1117) 评论(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 岩扉 阅读(234) 评论(0) 推荐(0)
摘要:Patrick and Shopping今天 Patrick 等待着他的朋友 Spongebob来他家玩。为了迎接 Spongebob,Patrick 需要去他家附近的两家商店 买一些吃的。他家离第一家商店有d1米远,离第二家商店有d2米远。还有,两家商店之间的距离... 阅读全文
posted @ 2017-07-30 09:23 岩扉 阅读(280) 评论(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 岩扉 阅读(247) 评论(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 岩扉 阅读(229) 评论(0) 推荐(0)
摘要:1203: 杨八方的语文问题 [字符串] 时间限制: 1 Sec 内存限制: 128 MB 题目描述 转眼间一学期就将要过去了,杨八方也在大学里经历了许多事情,最难忘的自然是学校里的各色课程。杨八方很喜欢中国的古典文化,所以当她知道大学有语文课的时候是很开心的。更幸运... 阅读全文
posted @ 2017-07-21 08:43 岩扉 阅读(180) 评论(0) 推荐(0)