![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技巧
Never_Say-Never
这个作者很懒,什么都没留下…
展开
-
hdoj2717Catch That Cow
Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a p原创 2016-07-29 19:54:10 · 246 阅读 · 0 评论 -
Codeforces Round #367 (Div. 2) B - Interesting drink
Vasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink "Beecola", which can be bought in n different shops in the cit原创 2016-08-12 15:57:20 · 237 阅读 · 0 评论 -
hdoj2066一个人的旅行(jijkstra)
Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜女……眼看寒假就快到了,这么一大原创 2016-08-12 11:40:37 · 291 阅读 · 0 评论 -
CodeForces 659A Round House(技巧)
Vasya lives in a round building, whose entrances are numbered sequentially by integers from 1 to n. Entrance n and entrance 1 are adjacent.Today Vasya got bored and decided to take a walk in t原创 2016-08-11 11:37:50 · 278 阅读 · 0 评论 -
hdoj 【BestCoder Round #81 (div.2)】 5670 Machine
Problem DescriptionThere is a machine with m(2≤m≤30) coloured bulbs and a button.When the button is pushed, the rightmost bulb changes.For any changed bulb,if it is red now it will be gree原创 2016-08-11 09:12:59 · 231 阅读 · 0 评论 -
zzulioj1908小火山的围棋梦想(dfs+技巧)
Description 小火山最近喜欢上了围棋。 对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也会变成小火山的棋子;这样的位置是指小火山的棋子将该位置围起来。 现在,小火山想知道实际棋盘是什么样子的。 你快来帮帮他吧!Input输入第一行是一个整数T(T 每组数据,第一行为两个整数n原创 2016-08-10 20:05:24 · 385 阅读 · 0 评论 -
hdoj5806 NanoApe Loves Sequence Ⅱ(尺取法)
Problem DescriptionNanoApe, the Retired Dog, has returned back to prepare for for the National Higher Education Entrance Examination!In math class, NanoApe picked up sequences once again. He w原创 2016-08-09 11:12:47 · 266 阅读 · 0 评论 -
HDU5804 BestCoder Round 86A 【Price List】
问题描述在Byteland一共有nn家商店,编号依次为11到nn。每家商店只会卖一种物品,其中第ii家商店的物品单价为v_ivi。Byteasar每天都会进行一次购物,他会在每家商店购买最多一件物品,当然他也可以选择什么都不买。回家之后,Byteasar会把这一天购物所花的钱的总数记录在账本上。Byteasar的数学不好,他可能会把花的钱记少,也可能记多。Byteasar并不介意原创 2016-08-08 19:57:30 · 275 阅读 · 0 评论 -
zzuli oj 1919(序列分段求和)(二分)
Description晴天想把一个包含n个整数的序列a分成连续的若干段,且和最大的一段的值最小,但他有强迫症,分的段数不能超过m段,然后他就不会分了。。。他想问你这个分出来的和最大的一段的和最小值是多少?Input第一行输入一个整数t,代表有t组测试数据。每组数据第一行为两个整数n,m分别代表序列的长度和最多可分的段数。接下来一行包含n个整数表示序列。0原创 2016-08-18 15:27:03 · 629 阅读 · 0 评论 -
BestCoder Round #85 hdoj5776 sum
Problem DescriptionGiven a sequence, you're asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NOInputThe first line of th原创 2016-08-05 17:49:23 · 241 阅读 · 0 评论 -
BestCoder Round #85 1002 domino
问题描述小白在玩一个游戏。桌子上有n张多米诺骨牌排成一列。它有k次机会,每次可以选一个还没有倒的骨牌,向左或者向右推倒。每个骨牌倒下的时候,若碰到了未倒下的骨牌,可以把它推倒。小白现在可以随意设置骨牌的高度,但是骨牌高度为整数,且至少为1,并且小白希望在能够推倒所有骨牌的前提下,使所有骨牌高度的和最小。输入描述第一行输入一个整数T(1\leq T \leq 101≤T≤10)原创 2016-08-05 10:43:40 · 274 阅读 · 0 评论 -
CodeForces 612BHDD is Outdated Technology
DescriptionHDD hard drives group data by sectors. All files are split to fragments and each of them are written in some sector of hard drive. Note the fragments can be written in sectors in arbitr原创 2016-07-21 23:47:17 · 267 阅读 · 0 评论 -
CodeForces612AThe Text Splitting(枚举)
DescriptionYou are given the string s of length n and the numbers p, q. Split the string s to pieces of length p and q.For example, the string "Hello" for p = 2, q = 3 can be split to the two原创 2016-07-21 23:29:55 · 222 阅读 · 0 评论 -
CodeForces 599A Patrick and Shopping
DescriptionToday Patrick waits for a visit from his friend Spongebob. To prepare for the visit, Patrick needs to buy some goodies in two stores located near his house. There is a d1 meter long r原创 2016-07-21 23:14:49 · 517 阅读 · 0 评论 -
zzuilOJ 1898: 985的数字难题
Description985有n个数,已知每次操作可以将其中不相同的两个数一个加一、一个减一,操作次数不限。问他最多可以得到多少个相同的数。Input第一行输入一个整数t,代表有t组测试数据。每组数据占两行,第一行输入一个n代表元素个数,下面一行输入n个整数a[]。注:1 Output输出一个整数代表最多可以得到多少个相同的数。原创 2016-08-04 10:54:19 · 287 阅读 · 0 评论 -
zzuilOJ 1894: 985的方格难题
Description985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输出到达(n,n)的方案数。Input第一行输入一个整数t,代表有t组测试数据。每组数据第一行输入三个整数n,x,y,分别代表方格地图的大小以及坏掉格子的原创 2016-08-04 10:44:45 · 307 阅读 · 0 评论 -
light oj 1058(数学)
DescriptionThere are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In other words, find the number of 4-原创 2016-08-15 18:08:10 · 335 阅读 · 0 评论 -
hdoj2095find your present (2)
Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will原创 2016-07-29 21:28:35 · 236 阅读 · 0 评论 -
hdoj5748 Bellovin 【BestCoder Round #84】 (最长上升序列)
Problem DescriptionPeter has a sequence a1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn), where fi is the length of the longest increasing subsequence原创 2016-08-12 20:41:39 · 260 阅读 · 0 评论