自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 资源 (1)
  • 收藏
  • 关注

原创 2071126

树形dp专题结束,总结一下这个专题的收获。这一章的题都是蛮难的,主要是背包,几乎每个题都用到,但是背包这个东西一千个题有一千个公式,专题里有几个相似,但大部分是不同的,做完题时又没有及时的全写博客,现在回头过去总结挺有必要的。

2017-11-26 22:45:21 84

原创 M - GeoDefense

Tower defense is a kind of real-time strategy computer games. The goal of tower defense games is to try to stop enemies from reaching your bases by building towers which shoot at them as they pass.

2017-11-26 22:30:04 151

原创 I - The more, The Better

ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input每个测试实例首先包括2个整数,N,M.(1 = 0。当N = 0, M = 0输入结束。

2017-11-26 17:44:33 148

原创 T - Contestants Division

In the new ACM-ICPC Regional Contest, a special monitoring and submitting system will be set up, and students will be able to compete at their own universities. However there’s one problem. Due to the

2017-11-26 16:44:23 207

原创 Q - Godfather

Last years Chicago was full of gangster fights and strange murders. The chief of the police got really tired of all these crimes, and decided to arrest the mafia leaders.Unfortunately, the structure

2017-11-26 16:28:23 163

原创 G - Starship Troopers

You, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected with tunnels. Each roo

2017-11-26 16:28:03 182

原创 R - Tree Cutting

After Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 Bessie, feeling vindictive, decided to sabotage Farmer John's network by cutting power to one of the bar

2017-11-26 16:27:43 135

原创 F - TELE

A TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the football match,

2017-11-26 16:27:21 192

原创 20171123

这几天做题还蛮规律的,每天晚上做上两三道题,往后做就越来越觉出来难在dp上了,理解递归关系,模拟过程,找出来公式,这个过程真是费尽脑子。昨天又组队去了606做比赛,商量了三个题,但只出来一个,有个想法对了,回来后队友发现细节上出了错,以后还要细心多想才行。

2017-11-23 21:47:50 99

原创 20171119

这几天做的树状dp,虽然还是一个模子的题,但是做起来感觉比之前难了些。很好笑的一个事情,刚开始的时候我还纠结一个题我怎么知道这是个树状dp呢,有了节点,还有了边和权值,那为啥不是个图状dp呢非得是树状dp;结果昨天我正建着树呢才想明白,树是刚好n-1条边啊,少了连不上,多了才是图。另外一个是树的使用了,之前的线段树,树状数组,也都是树,不过又一点都不一样,这次原来苦苦研究明白邻接链表终于有了用处了

2017-11-19 22:48:57 104

原创 S - Balancing Act

Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be the size of the

2017-11-19 10:18:44 174

原创 20171116

周二,老师给开了个大会,每个人都谈了谈自己的acm,老师也向我们表达了不满,也给我们提了要求。大家来做这一个,都说是都要学东西的,是要拿奖的,但是确实我们的状态都不是很好,表现的不尽人意。我自己而言,玩心+惰性,是必须要面对的问题,都要努力克制。做的新专题,树状dp,和数位dp专题一样,树状这个问题要先搞明白的,不过这次显然是更容易了些,树毕竟是学过的,而且有了上次的经验。然后就是刷题了,今天大半

2017-11-16 21:21:18 97

原创 B - Computer

A school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new computers. Each new computer was connected to one of settled earlier. Ma

2017-11-16 20:44:53 179

原创 A - Anniversary party

There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation forms a tr

2017-11-16 16:47:23 323

原创 20171112

今天是数位dp最后一天了,这波专题要告一段落。先总结下着个专题的收获——一个模板。没错,大体就是一个dfs + 一个solve,最后solve(ri)-solve(le-1);这样的一个模板。说起来没有想象中的难,反而感觉简单;除了最开始入门时看博客结果找了个难那种无从下手的感觉不太爽,我真是该先去做题的,做题过程学习感觉学的也挺好,更关键的是一个一个题出来的过程有种进步的感觉。不过做这些水题也没

2017-11-12 21:08:03 97

原创 C - Apocalypse Someday

The number 666 is considered to be the occult “number of the beast” and is a well used number in all major apocalypse themed blockbuster movies. However the number 666 can’t always be used in the scri

2017-11-11 17:01:34 192

原创 20171109

昨天做题做昏了,到睡觉也没想起来写博客,今天补上。数位dp的专项还在进行中,这个专题的目前做到的题做起来挺顺手的,就算遇到不会的看看题解也都瞬明白了,比起来线段树简单多了。周三的时候去606做比赛,学长也该给说了写事情。一个是让尽量比赛都来606组队正式做,以后的比赛应该会多了一些,有个牛客网的,还有做完之后一起讨论讲解。

2017-11-10 12:22:34 127

原创 Y - odd-even number

Y - odd-even number       要求一个数的每一位,每连续的奇数要是偶数个,连续的偶数要是奇数个。代码如下:#include#includeusing namespace std;typedef long long LL;int bit[20];LL dp[20][10][20];// pos pre sta LL dfs(in

2017-11-09 20:50:10 159

原创 V - How Many Zeroes

Jimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down?InputInput starts with an integer T (≤ 11000), denot

2017-11-07 23:37:31 199

原创 U - Investigation

An integer is divisible by 3 if the sum of its digits is also divisible by 3. For example, 3702 is divisible by 3 and 12 (3+7+0+2) is also divisible by 3. This property also holds for the integer 9.

2017-11-07 22:03:46 168

原创 X-Bi-peak Number

One integer number x is called "Mountain Number" if:(1) x>0 and x is an integer;(2) Assume x=a[0]a[1]...a[len-2]a[len-1](0≤a[i]≤9, a[0] is positive). Any a[2i+1] is larger or equal to a[2i] and a[

2017-11-06 22:46:09 207

原创 R—self同类分步

给出a,b,求出[a,b]中各位数字之和能整除原数的数的个数。Sample Input10 19Sample Output3Hint【约束条件】1 ≤ a ≤ b ≤ 10^18      题意太好理解了,一句话而已。写dfs部分的时候,感觉不要dp了吧,直接深搜暴力深搜就好,结果超时。还是得数位上下手,代码里的求模的那个sum,又学了一手,直接在so

2017-11-06 22:40:52 179

原创 E-Beautiful Numbers (对每一位求模)

Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue with

2017-11-06 21:09:06 297

原创 20171105

这几天做了数位dp的题了,做了几个感觉感觉也就是一个套路下来,装个模板,简单题应该是能够越练越熟的,和之前的树状数组线段树一样,至于难的那些还没做到,但是想来也是难下手,那些真的dp就是dp不管有没有数位都是现在都不敢想的。昨天下午应该是有个重现赛,我没有做,为了今天的考试奋斗了一天,应该考的不错了。结束了一门考试就刚好空出来一波时间,数位dp继续努力,

2017-11-05 21:56:51 82

原创 H-Bomb

The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence inc

2017-11-03 21:26:27 183

原创 G-B-number

A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example, 130 and 2613 are wqb-numbers, but 143 and 2639 ar

2017-11-03 20:29:59 205

原创 20171102

昨天晚上到了606去做秦皇岛的题,队友问我的dp做的怎么样,我才发现人家都已经开始做数位dp的那套练习的,点进去一看,最多的做了13个了,真是压力倍增,抓紧做题了,看到有几个题大多都做出来的,应该是模板了,也该先练一练试试。做秦皇岛的那套题,应该是区域赛的题吧,这题感觉确实很好,首先题长但是能读懂,然后还有想法,就是做不出来。

2017-11-02 20:37:28 89

tinyhttp.tar

自己学习整理了tinyhttp的代码,500多行受益匪浅,不过源码是不能直接运行的,找了好久的博客才运行起来,自己写了篇博客,也把自己的代码传上来

2019-12-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除