- 博客(99)
- 资源 (4)
- 收藏
- 关注
原创 NEFU 688 Word maker! 网络流
Word maker!Time Limit 5000msMemory Limit 65536KdescriptionProbably, you have seen polyhedrons which have an English letter on each face of the
2013-04-30 20:41:44 683
原创 UVa 437 - The Tower of Babylon LIS
The Tower of Babylon Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in line with the educational nature of
2013-04-30 19:31:45 1002
原创 UVa 10285 - Longest Run on a Snowboard 记忆化搜索
Problem CLongest Run on a SnowboardInput: standard inputOutput: standard outputTime Limit: 5 secondsMemory Limit: 32 MB Michael likes snowboarding. That's not very surprising, since snow
2013-04-29 21:27:55 1107
原创 UVa 10465 - Homer Simpson 背包
Return of the AztecsProblem C:Homer SimpsonTime Limit: 3 secondsMemory Limit: 32 MBHomer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer m
2013-04-29 20:52:47 962
原创 UVa 10130 - SuperSale 背包
SuperSaleThere is a SuperSale in a SuperHiperMarket. Every person can take only one object of each kind, i.e. one TV, one carrot, but for extra low price. We are going with a whole family to that
2013-04-29 18:49:07 969
原创 UVa 562 - Dividing coins 背包
Dividing coins It's commonly known that the Dutch have invented copper-wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so eager to get it and th
2013-04-29 16:44:32 938
原创 UVa 357 - Let Me Count The Ways 背包
Let Me Count The Ways After making a purchase at a large department store, Mel's change was 17 cents. He received 1 dime, 1 nickel, and 2 pennies. Later that day, he was shopping at a co
2013-04-29 16:30:14 940
原创 UVa 147 - Dollars 背包
Dollars New Zealand currency consists of $100, $50, $20, $10, and $5 notes and $2, $1, 50c, 20c, 10c and 5c coins. Write a program that will determine, for any given amount, in how many
2013-04-29 16:17:59 794
原创 NEFU English Game 字符串 dp 字典树
English GameTime Limit 1000msMemory Limit 65536Kdescription This English game is a simple English words connection game. The rules are as f
2013-04-29 11:41:24 1027
原创 UVa 11795 - Mega Man's Mission 状态压缩dp
BMega Man’s MissionsInputStandard InputOutputStandard Output Mega Man is off to save the world again. His objective is to kill the Robots created by D
2013-04-28 19:08:57 1112
原创 UVa 11404 - Palindromic Subsequence DP LCS---------无限WA
Palindromic Subsequence A Subsequence is a sequence obtained by deleting zero or more characters in a string. A Palindrome is a string which when read from left to right, reads same as w
2013-04-27 21:11:33 959
原创 NEFU 663 Emergency 最短路 floyd
EmergencyTime Limit 3000msMemory Limit 65536KdescriptionKudo’s real name is not Kudo. Her name is Kudryavka Anatolyevna Strugatskia, and Kudo
2013-04-27 19:49:03 632
原创 nefu 661 Clockwise 水DP+略几何
ClockwiseTime Limit 1000msMemory Limit 65536KdescriptionSaya have a long necklace with N beads, and she signs the beads from 1 to N. Then she
2013-04-27 15:36:10 1609
原创 UVa 10534 - Wavio Sequence LIS
Problem DWavio Sequence Input: Standard InputOutput: Standard OutputTime Limit: 2 Seconds Wavio is a sequence of integers. It has some interesting properties.· Wavio is of odd length i.
2013-04-24 21:15:13 802
原创 UVa 4256 - Salesmen dp
Traveling salesmen of nhn. (the prestigious Korean internet company) report their current location to the company on a regular basis. They also have to report their new location to the company if th
2013-04-24 20:22:46 1183
原创 UVa 11584 - Partitioning by Palindromes 回文串dp
Problem H: Partitioning by PalindromesWe say a sequence of characters is a palindrome if it is the same written forwards and backwards. For example, 'racecar' is a palindrome, but 'fastcar' is n
2013-04-24 17:14:00 1013
原创 10635 - Prince and Princess LCS&LIS
Problem DPrince and PrincessInput: Standard InputOutput: Standard OutputTime Limit: 3 Seconds In an n x n chessboard, Prince and Princess plays a game. The squares in the chessboard are
2013-04-24 15:57:25 962
原创 UVa 3882 - And Then There Was One 递推------------无力orz
Let's play a stone removing game.Initially, n stones are arranged on a circle and numbered 1,..., n clockwise (Figure 1). You are also given two numbers k and m . From this state, remove stones on
2013-04-24 15:10:14 1216
原创 UVa 10192 - Vacation 字符串dp
Problem E: Vacation The ProblemYou are planning to take some rest and to go out on vacation, but you really don't know which cities you should visit. So, you ask your parents for hel
2013-04-23 21:38:25 920
原创 10131 - Is Bigger Smarter? 水dp
Question 1: Is Bigger Smarter?The ProblemSome people think that the bigger an elephant is, the smarter it is. To disprove this, you want to take the data on a collection of elephants and put as
2013-04-23 20:53:41 921
原创 hdu 3415 Max Sum of Max-K-sub-sequence 单调队列dp
Max Sum of Max-K-sub-sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4581 Accepted Submission(s): 1656Problem Description
2013-04-23 16:46:04 1043
原创 poj 3071 football 概率dp
FootballTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2116 Accepted: 1055DescriptionConsider a single-elimination football tournament involving 2n
2013-04-23 09:53:39 1040
原创 poj 2151 Check the difficulty of problems 概率dp
Check the difficulty of problemsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3617 Accepted: 1580DescriptionOrganizing a programming contest is not
2013-04-22 21:32:46 1044
原创 Codeforces 148D - Bag of mice 概率dp
D. Bag of micetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe dragon and the princess are arguing abou
2013-04-22 20:41:03 1170
原创 hdu 3853 LOOPS 圆环之理 概率dp
LOOPSTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 830 Accepted Submission(s): 342Problem DescriptionAkemi Homura is a Ma
2013-04-22 19:55:27 1054
原创 UVa 674 - Coin Change 背包dp
Coin Change Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.For example, if
2013-04-22 17:54:14 1163
原创 UVa 10405 - Longest Common Subsequence 最长公共子序列模板
Problem C: Longest Common SubsequenceSequence 1: Sequence 2: Given two sequences of characters, print the length of the longest common subsequence of both s
2013-04-22 16:49:16 907
原创 UVa 12018 - Juice Extractor 切水果dp----------暂时存疑
Juice Extractor Jerry loses himself in the interesting game: Fruit Ninja. Fruit Ninja is a game of iPhone and iPad in which the players cut the fruits coming from the bottom of the scree
2013-04-22 16:22:06 1229
原创 UVa 111 - History Grading 最长递增子序列 LIS
History Grading BackgroundMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which students are asked to put seve
2013-04-22 16:10:44 1108
原创 UVa在线比赛单题汇总-----DP专题
动态规划基础例题LA 3882UVa 3882 - And Then There Was One 递推------------无力orzUVa 1063510635 - Prince and Princess LCS&LISUVa 10891Uva 10891 - Game of Sum dp博弈UVa 11825Uva 11825 - Ha
2013-04-21 21:29:25 3095 3
原创 UVa 10003 - Cutting Sticks 区间dp
Cutting Sticks You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the length of the stick being cut
2013-04-21 20:44:44 871
原创 hdu 2757 DNA repair AC自动机dp--------完全不懂--------
DNA repairTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 872 Accepted Submission(s): 473Problem DescriptionBiologists finall
2013-04-21 18:23:01 617
原创 ZOJ 3430 Detect the Virus AC自动机
Detect the VirusTime Limit: 2 Seconds Memory Limit: 65536 KBOne day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus th
2013-04-21 14:38:17 711
原创 hdu 3695 Computer Virus on Planet Pandora AC自动机
Computer Virus on Planet PandoraTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/128000 K (Java/Others)Total Submission(s): 1609 Accepted Submission(s): 454Problem Descrip
2013-04-20 20:38:44 798
原创 hdu 3695 AC自动机模板题
Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23502 Accepted Submission(s): 7763Problem DescriptionIn the mo
2013-04-20 19:19:25 707
转载 AC自动机算法与AC自动机专辑
AC自动机算法AC自动机简介: 首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有字典树Trie和KMP模式匹配算法的基础知识。KMP算法是单模式串的字符匹配算法,AC自动机是多
2013-04-20 19:01:34 849
转载 AC自动机模板
每个节点只访问一次。//子树节点是在插入时new的,//寻找失配指针中使用的队列是直接调用STL的const int kind = 26;struct node{ node *fail; node *next[kind]; int count;//记录当前前缀是完整单词出现的个数 node() { fail = NULL;
2013-04-20 18:26:07 596
原创 Magic Tree 水dp 错题!
Magic TreeTime Limit 1000msMemory Limit 65536Kdescription Every acmer dream for gold medal. Fotunately,there are two magic trees (which are c
2013-04-20 18:01:07 716
原创 Trip 图dp
TripTime Limit 1000msMemory Limit 65536Kdescription Xiao wang has a new car, so he wants to have a trip from his home to hefei, however, ther
2013-04-20 17:54:28 881
原创 Reverse a Road 最短路
Reverse a RoadTime Limit 1000msMemory Limit 65536Kdescription Peter resides in the city of Nanuh, and goes to his working place in this city
2013-04-20 17:44:51 1015
CSDN博客导出器2014/8/22
2014-08-22
(键)脑操语言解释器 brainfuck
2014-07-04
【Java】推箱子小游戏
2014-01-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人