UVA
文章平均质量分 83
Lllll_sh
这个作者很懒,什么都没留下…
展开
-
UVA - 11584 Partitioning by Palindromes (dp)
题意:将一串字符串划分成尽量少的回文串。思路: 首先枚举回文串起始字符,标记所有回文串。dp[i]为0~i的最小划分回文串。dp[i]=dp[i-1]+1,dp[i]=min(dp[j-1]+1) j~i为回文串。 #include #include #include #include #include #include #include #include #inc原创 2017-08-07 19:46:25 · 180 阅读 · 0 评论 -
Analysis Gym - 101173A UVALive - 7747 Appearance Analysis (模拟)
原题:You have taken a photo of the Faculty of Electrical Engineering and Computing “C” building herein Zagreb with its equal sized windows neatly arranged in rows and columns. Some of the windowsa原创 2017-08-30 17:34:29 · 288 阅读 · 0 评论 -
UVA 10382 Watering Grass (贪心)
原题: nsprinklers are installed in a horizontal strip of grassl meters long andw meters wide. Each sprinkleris installed at the horizontal center line of the strip. For each sprinkler we原创 2017-08-23 12:04:20 · 232 阅读 · 0 评论 -
UVALive - 4256 Salesmen (dp)
原题:Traveling salesmen of . (the prestigious Korean internet company) report their current locationto the company on a regular basis. They also have to report their new location to the company if原创 2017-08-24 10:26:04 · 276 阅读 · 0 评论 -
UVA - 11404 Palindromic Subsequence (LPS,dp)
原题链接:https://vjudge.net/problem/UVA-11404区间dp求LPS#include #include #include #include #include #include #include #include #include #include #include #include #include #incl转载 2017-08-27 10:22:08 · 205 阅读 · 0 评论 -
UVA - 10534 Wavio Sequence (LIS变形,dp)
原题: Wavio is a sequence of integers. It has some interesting prop erties.• Wavio is of o dd length i.e.L = 2∗ n+ 1.• The first (n + 1) integers of Wavio sequence makes a strictly in原创 2017-08-24 19:58:05 · 193 阅读 · 0 评论 -
UVA - 1626 Brackets sequence ( dp )
原题:Let us defie a regular brackets sequence in the following way:1. Empty sequence is a regular sequence.2. If S is a regular sequence, then (S) and[S] are both regular sequences.3. If A a原创 2017-08-09 17:09:41 · 288 阅读 · 0 评论 -
UVA - 1218 Perfect Service( 树形dp)
原题:A network is comp osed ofNcomputers connected byN−1 communication links such that any twocomputers can be communicated via a unique route. Two computers are said to beadjacentif t原创 2017-08-14 16:45:02 · 261 阅读 · 0 评论 -
UVA - 12083 Guardian of Decency(二分图匹配)
原题:Frank N. Stein is a very conservative high-scho ol teacher. He wants to take some of his students on anexcursion, but he is afraid that some of them might b ecome couples. While you can never e原创 2017-08-21 15:58:50 · 185 阅读 · 0 评论 -
UVA - 580 Critical Mass(dp 数学)
原题:During the early stages of the Manhattan Project, the dangers of the new radioctive materials werenot widely known. Vast new factory cities were built to manufacture uranium and plu- tonium in原创 2017-08-12 16:54:03 · 308 阅读 · 0 评论 -
UVA - 1513 Movie collection ( 树状数组 )
原题:Mr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever hewants to watch one of the movies, he lo cates the movie in this stack and removes it ca原创 2017-08-18 17:48:33 · 259 阅读 · 0 评论 -
UVA - 1262 Password
Shoulder-surfig is the behavior of intentionally and stealthily watching the screen of another person’selectronic device, such as laptop computer or mobile phone. Since mobile devices prevail, it is原创 2017-08-10 21:02:22 · 248 阅读 · 0 评论 -
UVA - 10820 Send a Table(欧拉函数)
原题:When participating in programming contests, you sometimes face the following problem: You knowhow to calcutale the output for the given input values, but your algorithm is way to o slow to原创 2017-08-10 11:02:03 · 231 阅读 · 0 评论 -
UVA - 11806 Cheerleaders ( 容斥 )
原题:https://vjudge.net/problem/UVA-11806#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /原创 2017-08-16 21:26:42 · 160 阅读 · 0 评论 -
UVA - 12186 Another Crisis (树形dp)
原题:A couple of years ago, a new world wide crisis started, leaving many p eople with economical problems.Some workers of a particular company are trying to ask for an increase in their salaries.原创 2017-08-08 17:35:53 · 232 阅读 · 0 评论 -
UVA - 10003 Cutting Sticks (区间dp)
原题:You have to cut a wo o d stick into pieces. The most affordable company, The Analog Cutting Machinery,Inc. (ACM), charges money according to the length of the stick b eing cut. Their pro cedure原创 2017-08-09 11:20:29 · 179 阅读 · 0 评论 -
UVA - 10891 Game of Sum(区间dp)
题意: 长度为n的整数序列中,A和B轮流从左或右端取任意数量的数字,直至全部数字被取完,每人每次采取最优策略使自己取得数字总和最大,A先取,结束时A取数字总和与B取数字总和的差。思路: 任意时刻游戏状态均为原序列的一段子序列,A,B取得数字总和为序列总和。则取dp[i][j]为子序列为i~j时,A取得最大数字和。dp[i][j]=sum(i,j)-mi原创 2017-08-08 11:17:36 · 203 阅读 · 0 评论 -
UVA - 140 Bandwidth(全排列枚举)
思路:存储所有路径,全排列所有点。#include #include #include #include #include #include #include #include #include #include #include #include //#pragma comment(linker, "/STACK:1024000000,1024000000")原创 2017-08-07 20:10:58 · 199 阅读 · 0 评论 -
UVALive 7544 Banking II (DP)
原题:A month ago at the South Pacifi Divisional Contest, each of you (or one of your teammates) solved aproblem about authenticating users. To refresh your memory:The Actuarial Commerce Merchant b原创 2017-11-11 20:18:18 · 220 阅读 · 0 评论