题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4283 Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small…
传送门 https://www.cnblogs.com/violet-acmer/p/9852294.html 题意: 有n个屌丝排成一排,每个屌丝都有一个不开心值a[ i ]( i=1,2,3,.....n ),如果第 i 个屌丝第 k 个上场,那么他的不开心度就是(k-1)*a[ i ]. ∑ni=1(ki-1)*a[i]的最小值,其中ki指的是第i个屌丝第k个上场. 关键条件"the director can put the boy into the dark room temporari…
设f[i][j]为区间(i,j)的最短长度,然后转移的话一个是f[i][j]=min(j-i+1,f[i][k]+f[k+1][j]),还有就是把(k+1,j)合并到(i,k)上,需要判断一下字符串相同,然后转移的时候注意字符串计数的那个数字也是按位数算的,要计算一下位数 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=105; int n,f[…
You Are the One Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the…
Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65535 K (Java/Others)Total Submission(s): 2858 Accepted Submission(s): 1168 Problem Description In mathematics, a subsequence is a sequence that can be derived f…
Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65535 K (Java/Others)Total Submission(s): 3183 Accepted Submission(s): 1328 Problem Description In mathematics, a subsequence is a sequence that can be derived f…
题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4293 Problem Description After the regional contest, all the ACMers are walking alone a very long avenue to the dining hall in groups. Groups can vary in size for kinds of reasons, which means, sev…