摘要: Problem Description There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minim 阅读全文
posted @ 2018-05-02 23:47 l..q 阅读(349) 评论(0) 推荐(0)
摘要: DreamGrid has classmates numbered from to . Some of them are boys and the others are girls. Each classmate has some gems, and more specifically, the - 阅读全文
posted @ 2018-04-30 10:13 l..q 阅读(291) 评论(0) 推荐(0)
摘要: Problem Description On a plain of hexagonal grid, we define a step as one move from the current grid to the lower/lower-left/lower-right grid. For exa 阅读全文
posted @ 2018-04-23 13:17 l..q 阅读(242) 评论(0) 推荐(0)
摘要: Problem Description Hmz likes to play fireworks, especially when they are put regularly.Now he puts some fireworks in a line. This time he put a trigg 阅读全文
posted @ 2018-04-22 22:04 l..q 阅读(259) 评论(0) 推荐(0)
摘要: Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请 阅读全文
posted @ 2018-04-19 17:37 l..q 阅读(180) 评论(0) 推荐(0)
摘要: 题目描述 Farmer John is trying to hire contractors to help rearrange his farm, but so far all of them have quit when they saw the complicated sequence of 阅读全文
posted @ 2018-04-19 17:13 l..q 阅读(333) 评论(0) 推荐(0)
摘要: Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的 阅读全文
posted @ 2018-04-19 17:02 l..q 阅读(228) 评论(0) 推荐(0)
摘要: 火车站的列车调度铁轨的结构如下图所示。 Figure 两端分别是一条入口(Entrance)轨道和一条出口(Exit)轨道,它们之间有N条平行的轨道。每趟列车从入口可以选择任意一条轨道进入,最后从出口离开。在图中有9趟列车,在入口处按照{8,4,2,5,3,9,1,6,7}的顺序排队等待进入。如果要 阅读全文
posted @ 2018-04-18 19:09 l..q 阅读(266) 评论(0) 推荐(0)
摘要: 题目描述 A low-budget airline is designing a sophisticated algorithm that will assign more desirable seats to passengers who buy tickets earlier. Their ai 阅读全文
posted @ 2018-04-15 20:45 l..q 阅读(387) 评论(0) 推荐(0)
摘要: 题目描述 Mårten and Simon enjoy playing the popular board game Seven Wonders, and have just finished a match. It is now time to tally the scores.One of the 阅读全文
posted @ 2018-04-15 01:01 l..q 阅读(302) 评论(0) 推荐(0)