- 博客(20)
- 收藏
- 关注
原创 Little Tiger vs. Deep Monkey (状压转01背包)
A crowd of little animals is visiting a mysterious laboratory – The Deep Lab of SYSU. “Are you surprised by the STS (speech to speech) technology of Microsoft Research and the cat face recognition pr...
2018-07-31 23:01:03 386
原创 CodeForces Cards and Joy (dp)
There are nn players sitting at the card table. Each player has a favorite number. The favorite number of the jj-th player is fjfj.There are k⋅nk⋅n cards on the table. Each card contains a single in...
2018-07-31 21:50:37 231
原创 Multiplication Puzzle
The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points equal to the pr...
2018-07-31 20:13:59 158
原创 Cash Machine (多重背包+二进制优化)
A Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k...
2018-07-31 19:35:28 264
原创 Combine String
Given three strings aa, bb and cc, your mission is to check whether cc is the combine string of aa and bb. A string cc is said to be the combine string of aa and bb if and only if cc can be broken in...
2018-07-31 19:08:50 412
原创 最大连续子序列
给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年的数据结构考卷中,...
2018-07-31 16:14:56 599
原创 Max Sum Plus Plus (dp+滚动数组)
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem.Given...
2018-07-31 14:45:37 577
原创 Monkey and Banana HDU - 1069 (贪心+dp)
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monk...
2018-07-31 11:13:14 184
原创 HDU6321 Dynamic Graph Matching(状态dp,类比于背包问题)
Problem DescriptionIn the mathematical discipline of graph theory, a matching in a graph is a set of edges without common vertices.You are given an undirected graph with n vertices, labeled by 1,2,...
2018-07-30 22:16:13 173
原创 HDU 6319 Ascending Rating
Problem DescriptionBefore the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left to right. It can be easily found that the i-th contestant's...
2018-07-30 19:30:35 197
原创 treecnt 51Nod - 1677
给定一棵n个节点的树,从1到n标号。选择k个点,你需要选择一些边使得这k个点通过选择的边联通,目标是使得选择的边数最少。现需要计算对于所有选择k个点的情况最小选择边数的总和为多少。样例解释: 一共有三种可能:(下列配图蓝色点表示选择的点,红色边表示最优方案中的边)选择点{1,2}:至少要选择第一条边使得1和2联通。 选择点{1,3}:至少要选择第二条边使得1和3联通。...
2018-07-29 21:53:04 341
原创 Python 爬虫系列教程一爬取批量百度图片
很久之前就学习了Python的爬虫了,也用来做过一些项目(主要是一些课程项目),但时间比较紧,一直没有空把它写下来,这个暑假,我可能会逐渐更新Python爬虫的相关知识。项目1:实现批量爬取百度图片先简单的介绍下这个项目。当你需要下载大量图片的时候,或许你会去百度图片里一张张右键下载,但这样未免太麻烦了,有了这个工具,你直接运行下程序,输入你想要下载图片的关键字,然后输入你想要下载图片的数...
2018-07-29 19:40:05 91096 205
原创 Making the Grade POJ - 3666
A straight dirt road connects two fields on FJ's farm, but it changes elevation more than FJ would like. His cows do not mind climbing up or down a single slope, but they are not fond of an alternatin...
2018-07-29 17:23:03 445
原创 Phalanx HDU - 2859
Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of the PRC. A phalanx is a matrix of size n*n, each element is a character (a~z or A~Z), st...
2018-07-27 15:27:45 186
原创 FatMouse and Cheese HDU - 1078
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid lo...
2018-07-27 12:49:21 189
原创 Help Jimmy POJ - 1661
"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX...
2018-07-26 21:33:02 294
原创 HDU - 6315 Naive Operations
In a galaxy far, far away, there are two integer sequence a and b of length n. b is a static permutation of 1 to n. Initially a is filled with zeroes. There are two kind of operations: 1. add l r: ...
2018-07-26 19:41:12 181
原创 POJ - 1015 Jury Compromise
In Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of members of the general public. Every time a trial is set to begin, a jury has to be selected, which ...
2018-07-26 19:20:25 226
原创 POJ 2184 Cow Exhibition
"Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both smart and fun. In order to do thi...
2018-07-22 20:29:03 140
原创 在线离散化
我们以前遇到需要离散化的题目,大部分都是先对原数组排序,再unique,然后二分,进行离散化。这里介绍一种在线的离散化方法,那就是利用mapmap<int,int> mp;int Hash(int x){ if(mp.find(x)==mp.end()) mp[x]=tot++; return mp[x];}...
2018-07-15 17:41:19 342 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人