摘要: Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工 阅读全文
posted @ 2016-08-18 19:34 野小子& 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 本人决定将博客搬至CSDN,请关注的人去CSDN查看。 阅读全文
posted @ 2016-08-18 09:59 野小子& 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Description RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partne 阅读全文
posted @ 2016-08-17 11:03 野小子& 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 前言 之前对kmp算法虽然了解它的原理,即求出P0···Pi的最大相同前后缀长度k;但是问题在于如何求出这个最大前后缀长度呢?我觉得网上很多帖子都说的不是很清楚,总感觉没有把那层纸戳破,后来翻看算法导论,32章 字符串匹配虽然讲到了对前后缀计算的正确性,但是大量的推理证明不大好理解,没有与程序结合起 阅读全文
posted @ 2016-08-16 09:53 野小子& 阅读(1206) 评论(0) 推荐(0) 编辑
摘要: Description Little Mishka is a great traveller and she visited many countries. After thinking about where to travel this time, she chose XXX — beautif 阅读全文
posted @ 2016-08-15 19:53 野小子& 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜 阅读全文
posted @ 2016-08-15 15:48 野小子& 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there ar 阅读全文
posted @ 2016-08-14 18:17 野小子& 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Description There are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on thes 阅读全文
posted @ 2016-08-14 18:08 野小子& 阅读(558) 评论(0) 推荐(0) 编辑
摘要: Problem Description Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a near 阅读全文
posted @ 2016-08-14 17:58 野小子& 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this: Each cell contains 阅读全文
posted @ 2016-08-14 16:08 野小子& 阅读(302) 评论(0) 推荐(0) 编辑