选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2137 Accepted Submission(s): 1699 Problem Description 又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合.你来帮帮他吧.(xhd认为一样学分的课没区别)…
题意:需要学够n学分,有k个情况(x学分,y个相同学分的课) 解法:套母函数模板 #include <iostream> #include<cstdio> using namespace std; int main(int argc, char** argv) { int i,j,k,t,sum; int c1[10000],c2[10000],num[120],n,m,x[120],y[120]; scanf("%d",&t); while(t--){…
代码: #include<cstdio> #include<cstring> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int n,k; int a[9],b[9]; scanf("%d%d",&n,&k); for(int i=1; i<=k; i++) { scanf("%d%d",&…
母函数的简单应用http://acm.hdu.edu.cn/showproblem.php?pid=2079 介绍见另一篇随笔HDU1028Ignatius and the Princess III(母函数) #include<stdio.h> int main() { int T; while(~scanf("%d", &T))while(T--) { ]={},c2[]={}; int num,val; int i,n,k; scanf("%d%d&q…
Problem Description 又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合.你来帮帮他吧.(xhd认为一样学分的课没区别) Input输入数据的第一行是一个数据T,表示有T组数据.每组数据的第一行是两个整数n(1 <= n <= 40),k(1 <= k <= 8).接着有k行,每行有两个整数a(1 <= a <= 8),b(1 <= b <= 10),表示学分为a的课有b门. Output对于每…
选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2254 Accepted Submission(s): 1791 Problem Description 又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合.你来帮帮他吧.(xhd认为一样学分的课没区别)…
计算数的和的种类,母函数裸题 #include<stdio.h> #include<string.h> ],c2[],a,b; int main(){ int T; while(scanf("%d",&T)!=EOF){ int n,k; ;q<=T;q++){ scanf("%d%d",&n,&k); int i,j,p; memset(c1,,sizeof(c1)); c1[]=;; ;i<=k;i++…
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…
Coin Change Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10289 Accepted Submission(s): 3451 Problem Description Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1…
Square Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6416 Accepted Submission(s): 4336 Problem Description People in Silverland use square coins. Not only they have square shapes but…
选课时间(题目已修改,注意读题) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5115 Accepted Submission(s): 3944 Problem Description 又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合.你来帮帮他吧.(xhd认为一样学分的课没区别)…
Square Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7883 Accepted Submission(s): 5332 Problem Description People in Silverland use square coins. Not only they have square shapes but…
HDU2070 Fibbonacci Number 题目链接 Problem Description Your objective for this question is to develop a program which will generate a fibbonacci number. The fibbonacci function is defined as such: f(0) = 0 f(1) = 1 f(n) = f(n-1) + f(n-2) Your program sho…
一讲到数据库设计,大家很容易想到的就是三范式,但是第四.第五范式又是什么,不是很清楚,三范式到底怎么区分,也不清楚,作为数据库设计的基础概念,我再讲解下数据库范式. Normal form Brief definition 1NF First normal form Table faithfully represents a relation, primarily meaning it has at least one candidate key 2NF Second normal form…