The Balance Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5706    Accepted Submission(s): 2311 Problem Description Now you are asked to measure a dose of medicine with a balance and a number o…
题意: 有一个天平.有N个砝码.重量分别是A1...AN. 问重量[1..S]中有多少种重量是无法利用这个天平和这些砝码称出来的. S是N个砝码的重量总和. 思路: 对于每一个砝码来说,有三种:不放,放左盘,放右盘. 额,,母函数和DP其实核心一样,,,, 看代码,, 代码: int n; int aa[105]; bool a[10005], b[10005]; int temp[10005]; int main(){ while(scanf("%d",&n)!=EOF){…
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24002    Accepted Submission(s): 8458 Problem Description Nowadays, we all know that Computer College is the biggest department…
母函数的特殊情况,左右两边都可以放,如样例1,2,9 母函数为(1+x+1/x)*(1+x^2+1/x^2)*(1+x^9+1/x^9) 化简为(1+x+x^2)*(1+x^2+x^4)*(1+x^9+x^18)/(x*x^2*x^9) 这样就好计算了,看代码: ;}…
The Balance Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5956    Accepted Submission(s): 2427 Problem Description Now you are asked to measure a dose of medicine with a balance and a number o…
The Balance Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6652    Accepted Submission(s): 2730 Problem Description Now you are asked to measure a dose of medicine with a balance and a number o…
题意: 现在你被要求用天平和一些砝码来量一剂药.当然,这并不总是可以做到的.所以你应该找出那些不能从范围[1,S]中测量出来的品质.S是所有重量的总质量. 输入一个n,后面有n个数,表示这n个物品的质量 题解: 注意这个题的题干,这个天平只要能制造出来那个质量差,然后这个质量差就不会输出(看懂第二个样例就行) 这道题是母函数的变化版,没学过母函数的可以看一下:母函数 <普通母函数(HDU - 1028 ) && 指数型母函数(hdu1521)> 代码: 1 #include&l…
The Balance Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7677    Accepted Submission(s): 3187 Problem Description Now you are asked to measure a dose of medicine with a balance and a number o…
找单词 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4093    Accepted Submission(s): 2933 Problem Description 假设有x1个字母A, x2个字母B,..... x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,..... 字母Z的价值为26.那么,对于给定的字母,可以找到…
The Balance Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4497    Accepted Submission(s): 1808 Problem Description Now you are asked to measure a dose of medicine with a balance and a number o…