摘要: Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this con 阅读全文
posted @ 2019-01-28 19:44 StarHai 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ上有不少相关的题目,比如1005 Fibonacci 阅读全文
posted @ 2019-01-28 19:42 StarHai 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Stan and Ollie play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Stan always starts with p = 1, does his multi 阅读全文
posted @ 2019-01-28 19:39 StarHai 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat s 阅读全文
posted @ 2019-01-28 19:37 StarHai 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The starting position has a number of he 阅读全文
posted @ 2019-01-28 19:35 StarHai 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones: 阅读全文
posted @ 2019-01-28 19:32 StarHai 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Let's consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You can take any number of consecutive 阅读全文
posted @ 2019-01-28 19:28 StarHai 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌 阅读全文
posted @ 2019-01-28 19:26 StarHai 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“ 阅读全文
posted @ 2019-01-28 19:24 StarHai 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题解:最大流板题;增加两个源点,一个汇点。第一个源点到第二个源点连边,权为K,然后第一个源点再连其他点(英雄点)边权各为1,然后英雄和怪物之间按照所给连边(边权为1)。 每个怪物连终点,边权为1; 参考代码: 1 #include<bits/stdc++.h> 2 using namespace s 阅读全文
posted @ 2019-01-28 19:17 StarHai 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共N个可以作为通讯信号中转站的地址,而 阅读全文
posted @ 2019-01-28 19:07 StarHai 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统。 这个程序接受一些形如 xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。 输入包含多组数据。 然而粗心的小w不幸地把每组数据之间的分隔符删掉了。 他只知道每组数据都是不可满足 阅读全文
posted @ 2019-01-28 19:00 StarHai 阅读(349) 评论(0) 推荐(0) 编辑