
UVA
文章平均质量分 51
tokers
所有的魅力在“习惯”面前都将无色。
展开
-
UVA10325--- The Lottery (容斥)
The Sports Association of Bangladesh is in great problem with their latest lottery ‘Jodi laiga Jai’. There are so many participants this time that they cannot manage all the numbers. In an urgent meet原创 2015-05-27 20:49:30 · 882 阅读 · 0 评论 -
UVA11584---Partitioning by Palindromes(dp)
We say a sequence of characters is a palindrome if it is the same written forwards and backwards. For exam- ple, ‘ racecar ’ is a palindrome, but ‘ fastcar ’ is not. A partition of a sequenc原创 2015-05-21 18:34:19 · 672 阅读 · 0 评论 -
UVA10003---Cutting Sticks(简单区间dp)
任意两个切割点之间无法再分割 所以如果设dp[i][j] 表示从i位置切到j位置其实没有多大意义,亲测这样会TLE dp[i][j]表示切割第i个切割点开始的位置到第j个切割点的位置结束的木棍的最小花费 时间复杂度O(n3)O(n^3)/************************************************************************* >原创 2015-05-21 21:53:46 · 661 阅读 · 0 评论 -
UVA12186--- Another Crisis (树形dp)
Description Download as PDFA couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular company are trying to ask for an increase原创 2015-05-28 22:04:55 · 1142 阅读 · 0 评论 -
UVA1025---A Spy in the Metro(简单dp)
dp[i][j]dp[i][j]表示时刻i,在车站j,等待的最少时间 有3中方案: 等一分钟 往左搭车 往右搭车/************************************************************************* > File Name: uva1025.cpp > Author: ALex > Mail: zchao1原创 2015-05-25 20:03:20 · 730 阅读 · 0 评论 -
UVA1347---Tour(dp,双调TSP)
dp[i][j]dp[i][j]表示在1~max(i,j)都已经被走过的情况下,第一个人在i点,第二个人在j点时,走完剩下的点还需要的最短距离 规定第一个人领先第二个人 所以dp[i][j]dp[i][j]可以转移到dp[i+1][j]dp[i + 1][j]和dp[i+1][i]dp[i + 1][i](等价于dp[i][i+1]dp[i][i + 1])/******************原创 2015-05-25 20:41:52 · 879 阅读 · 0 评论