- 博客(4)
- 收藏
- 关注
原创 HDU 5074 Hatsune Miku DP
解题思路:题意为有m种音符,编号1到m,我们要用这m种音符来创造一首带有n个音符的曲子(当然,一种音符可以用多次),假设有两个连续的音符 i ,j ,那么定义score(i,j)为这两个音符的得分,题目中预先给出所有的score(i,j) 1<=i,j<=m, 那么我们创造出的n个音符的曲子的得分为 score( note[i] , note[i+1] ) + score (note
2015-08-06 09:39:25 451
原创 HDU 5119 Happy Matt Friends - DP
点击打开题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5119#include#include#include#includeusing namespace std;int a[50];int dp[50][2000100];int cnt=1;int main(){ int T,n,m; sca
2015-08-03 10:32:13 539
原创 HDU 1796 容斥原理
点击打开题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1796#include#include#include#includeusing namespace std;int arr[200];//int select[200];int n,m,cnt,ans;int gcd(int a,int b){ return
2015-08-03 09:48:42 421
原创 HDU 4786 Fibonacci Tree (2013ACMICPC 成都站 F) 并查集
点击打开题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4786#include#includestruct Tree{ int a,b,c;}tree[110000];int node[110000];int fib[40];int n,m;void Fibonacci(){ int i; fib[0]=fib[1]
2015-08-03 09:43:46 627
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人