随笔分类 -  dp

摘要:题目链接 :http://bak3.vjudge.net/contest/136499#problem/D 题意: 阅读全文
posted @ 2016-10-15 03:53 a_clown_cz 阅读(196) 评论(0) 推荐(0)
摘要:Description Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a mat 阅读全文
posted @ 2016-10-14 22:35 a_clown_cz 阅读(408) 评论(0) 推荐(0)
摘要:题目链接: http://codeforces.com/problemset/problem/710/E 题意:要输入n个字符'a',有两种操作,一种是输入或删除一个'a',耗时x;另一种是把当前的整个文本复制粘贴,耗时y。求最少时间。 思路:dp 具体看代码=.= 阅读全文
posted @ 2016-10-11 20:12 a_clown_cz 阅读(102) 评论(0) 推荐(0)
摘要:Common Subsequence Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a se 阅读全文
posted @ 2016-09-28 21:48 a_clown_cz 阅读(422) 评论(0) 推荐(0)
摘要:http://acm.split.hdu.edu.cn/showproblem.php?pid=1087 状态方程:sum[j]=max{sum[i]}+a[j]; 其中,0<=i<=j,a[i]<a[j] 把当前最大和更新到数组中,注意顺序。 Input Input contains multip 阅读全文
posted @ 2016-09-28 21:45 a_clown_cz 阅读(150) 评论(0) 推荐(0)
摘要:discription:定义臻.排序数列如下:一个数列删去其中一个数后是从小到大排好序的,称这个数列为臻.排序数列。现在给你一个数列,判断它是否为臻.排序数列。 intput:多组输入数据,每组有两行,第一行一个整数 n (2<=n<=1000000),第二行有 n 个整数,表示给定的数列 outp 阅读全文
posted @ 2016-09-28 20:46 a_clown_cz 阅读(174) 评论(0) 推荐(0)
摘要:Balanced Number Problem Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specific 阅读全文
posted @ 2016-09-28 20:40 a_clown_cz 阅读(448) 评论(0) 推荐(0)
摘要:Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如 阅读全文
posted @ 2016-09-28 20:34 a_clown_cz 阅读(229) 评论(0) 推荐(0)