![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
======动态规划======
文章平均质量分 88
VampireWeekend
I want my dreams to rescue me
展开
-
Codeforces Gym 100548H - The Problem to Make You Happy 2014 ACM-ICPC 西安站
Problem H. The Problem to Make You HappyInput file: standard inputOutput file: standard outputTime limit: 1 secondsMemory limit: 256 mebibytesProblem DescriptionAlice and Bob are good friends, a...原创 2018-10-16 21:11:50 · 271 阅读 · 0 评论 -
Codeforces 666C C. Codeword 组合数学+DP
C. Codewordtime limit per test6 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe famous sculptor Cicasso is a Reberlandian s原创 2017-11-18 14:47:06 · 539 阅读 · 0 评论 -
Hdu 4418 Time travel 概率DP
Time travelTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3229 Accepted Submission(s): 853Problem DescriptionAgent K is原创 2017-10-16 11:10:30 · 245 阅读 · 0 评论 -
Hdu 4035 Maze 树上概率DP
MazeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2842 Accepted Submission(s): 1212Special JudgeProblem DescriptionWhen wak原创 2017-10-09 21:56:00 · 241 阅读 · 0 评论 -
Hdu 4089 Activation 概率DP
ActivationTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4239 Accepted Submission(s): 1418Problem DescriptionAfter 4 years原创 2017-10-16 10:51:14 · 199 阅读 · 0 评论 -
Hdu 4336 Card Collector 概率DP+状态压缩
一共n种卡片,每次抽卡片的种类是随机、等可能的。问抽到原创 2017-10-16 00:08:45 · 187 阅读 · 0 评论 -
Codeforces 868F (Codeforces Round #438 F) Yet Another Minimization Problem DP+分治
F. Yet Another Minimization Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given原创 2017-10-13 20:58:45 · 1186 阅读 · 0 评论 -
Hdu 6007 Mr. Panda and Crystal 最短路+完全背包
Mr. Panda and CrystalTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 605 Accepted Submission(s): 202Problem DescriptionLong l原创 2017-11-07 17:37:07 · 373 阅读 · 0 评论 -
Codeforces 189D AlgoRace floyd+DP
D. AlgoRacetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPMP is getting a warrior. He is practicing a lo原创 2017-10-12 19:09:28 · 296 阅读 · 0 评论 -
POJ 2976 Dropping tests 01分数规划Dinkelbach算法
Dropping testsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13732 Accepted: 4817DescriptionIn a certain course, you take n tests. If you get ai out原创 2017-10-04 00:09:39 · 394 阅读 · 0 评论 -
BZOJ 2244 拦截导弹 cdq分治
2244: [SDOI2011]拦截导弹Time Limit: 30 Sec Memory Limit: 512 MBSec Special JudgeSubmit: 877 Solved: 303[Submit][Status][Discuss]Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一原创 2017-10-03 17:55:02 · 316 阅读 · 0 评论 -
Codeforces Round #245 (Div. 1) ABCDE
Codeforces Round #245 (Div. 1) 赛前随便选了一场 CF Div 1A. Xor-treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub is very p原创 2017-10-21 23:42:44 · 349 阅读 · 0 评论 -
Codeforces 886E (Codeforces Round #445) Maximum Element 组合数学+DP
E. Maximum Elementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Petya was solving a very interes原创 2017-11-22 16:02:18 · 782 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第四场)C. Chiaki Sequence Reloaded 数位DP
题目描述 Chiaki is interested in an infinite sequence a1, a2, a3, …, which defined as follows: Chiaki would like to know the sum of the first n terms of the sequence, i.e. . As this number may be ve...原创 2018-09-06 19:31:28 · 229 阅读 · 0 评论 -
Hdu 6321 Dynamic Graph Matching 状压DP
Problem C. Dynamic Graph MatchingTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1226 Accepted Submission(s): 509Problem Descriptio...原创 2018-07-31 19:12:12 · 151 阅读 · 0 评论 -
XVIII Open Cup named after E.V. Pankratiev. Grand Prix of Saratov. J. Subsequence Sum Queries 分治+背包
Problem J. Subsequence Sum QueriesInput file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 256 mebibytesYou have an array a containing n integers and an integ...原创 2018-07-25 19:31:35 · 493 阅读 · 0 评论 -
Codeforces 985E Pencils and Boxes DP+two-pointers
E. Pencils and Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMishka received a gift of multicolored pencils for his birthday! Unfortunately...原创 2018-05-25 13:16:11 · 311 阅读 · 0 评论 -
Codeforces 960E Alternating Tree 树型DP
E. Alternating Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiven a tree with nn nodes numbered from 11 to nn. Each node ii has an associat...原创 2018-04-09 21:43:18 · 471 阅读 · 0 评论 -
Educational Codeforces Round 40 (Rated for Div. 2)
A. Diagonal Walkingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMikhail walks on a 2D plane. He can go either up or right. You are given a seque...原创 2018-03-23 21:50:53 · 493 阅读 · 0 评论 -
Codeforces 935E Fafa and Ancient Mathematics DP
E. Fafa and Ancient Mathematicstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAncient Egyptians are known to have understood difficult concepts i...原创 2018-03-13 21:19:54 · 285 阅读 · 0 评论 -
Codeforces 922E Birds DP
E. Birdstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputApart from plush toys, Imp is a huge fan of little yellow birds!To summon birds, Imp needs ...原创 2018-02-18 16:23:37 · 693 阅读 · 0 评论 -
Codeforces 946D Timetable DP
D. Timetabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan is a student at Berland State University (BSU). There are n days in Berland week,...原创 2018-03-07 14:43:31 · 239 阅读 · 0 评论 -
Codeforces Round #383 (Div. 1)
A. Arpa's loud Owf and Mehrdad's evil plantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you have notic原创 2017-11-26 17:04:15 · 255 阅读 · 0 评论 -
Codeforces 864E (Codeforces Round #436 (Div. 2)) E. Fire 背包输出路径
E. Firetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is in really serious trouble — his house i原创 2017-09-30 14:49:20 · 299 阅读 · 0 评论 -
Codeforces Manthan, Codefest 17 C. Helga Hufflepuff's Cup 树型DP
C. Helga Hufflepuff's Cuptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHarry, Ron and Hermione have figu原创 2017-09-25 11:50:18 · 231 阅读 · 0 评论 -
Manthan, Codefest 17 E. Salazar Slytherin's Locket 数位DP+状态压缩
E. Salazar Slytherin's Lockettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHarry came to know from Dumbl原创 2017-09-27 19:31:47 · 330 阅读 · 0 评论 -
Poj 2378 Tree Cutting 树型DP
Tree CuttingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4594 Accepted: 2808DescriptionAfter Farmer John realized that Bessie had installed a "tree原创 2017-07-11 11:01:55 · 200 阅读 · 0 评论 -
Gym - 101411H Hotel in Ves Lagos 数位DP 2009-2010 ACM-ICPC, NEERC, Western Subregional Contest
http://codeforces.com/gym/101411/attachmentsProblem H. Hotel in Ves LagosInput le: hotel.inOutput le: hotel.outTime limit: 1 secondMemory limit: 256 megabytesA new hotel is being bui原创 2017-07-19 19:37:52 · 636 阅读 · 0 评论 -
POJ 2576 / Light OJ 1147 Tug of War 状态压缩DP
Tug of WarTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9257 Accepted: 2578DescriptionA tug of war is to be arranged at the local office picnic. For原创 2017-07-22 13:13:55 · 248 阅读 · 0 评论 -
Codeforces 219D Choosing Capital for Treeland 树型DP
D. Choosing Capital for Treelandtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe country Treeland consi原创 2017-07-23 10:53:24 · 244 阅读 · 0 评论 -
UVA Live 7693 (Codeforces Gym 101201B) Buggy Robot DP+bfs
https://vjudge.net/contest/179241#problem/B给你一个地图,机器人从起点到终点按照字符串的指示前进,如果遇到障碍或者出边界就停留在原地,不算违规。问你最少修改字符串的几个字符,才能让机器人到终点。用dp[i][j][k]表示扫描完前k个字符之后,到达地图坐标(i,j)上的最小代价。把每个状态都依次穷举,加入队列后bfs。原创 2017-08-20 23:28:28 · 862 阅读 · 0 评论 -
Hdu 2457 DNA repair AC自动机+DP
DNA repairTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2612 Accepted Submission(s): 1406Problem DescriptionBiologists fina原创 2017-08-05 22:51:20 · 215 阅读 · 0 评论 -
Hdu 6148 Valley Numer 数位DP
Valley NumerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 422 Accepted Submission(s): 224Problem Description众所周知,度度熊非常喜欢数字。原创 2017-08-19 22:15:00 · 296 阅读 · 0 评论 -
Hdu 6082 度度熊与邪恶大魔王 背包DP
度度熊与邪恶大魔王Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 303 Accepted Submission(s): 160Problem Description度度熊为了拯救可爱的公主,于是与邪恶原创 2017-08-08 20:49:10 · 227 阅读 · 0 评论 -
Codeforces 786A Berzerk DP+博弈
A. Berzerktime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRick and Morty are playing their own version原创 2017-08-09 21:30:12 · 402 阅读 · 0 评论 -
Hdu 4003 Find Metal Mineral 树型背包DP
Find Metal MineralTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 3696 Accepted Submission(s): 1726Problem DescriptionHumans原创 2017-08-09 21:06:08 · 251 阅读 · 0 评论 -
Hdu 3709 Balanced Number 数位DP
Balanced NumberTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5692 Accepted Submission(s): 2727Problem DescriptionA balance原创 2017-07-08 23:02:46 · 205 阅读 · 0 评论 -
POJ 3252 Round Numbers 数位DP
Round NumbersTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13448 Accepted: 5251DescriptionThe cows, as you know, have no fingers or thumbs and thus ar原创 2017-07-09 09:54:55 · 262 阅读 · 0 评论 -
POJ 3311 Hie with the Pie 状态压缩DP+floyd
Hie with the PieTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8106 Accepted: 4411DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas t原创 2017-09-03 14:09:37 · 201 阅读 · 0 评论 -
POJ 1185 炮兵阵地 状态压缩DP
炮兵阵地Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 29168 Accepted: 11300Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),原创 2017-09-03 13:04:52 · 218 阅读 · 0 评论