2012年4月24日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1087求最长上升子序列问题View Code #include <stdio.h>#include <string.h>#include <stdlib.h>int cmp(const void*a,const void*b){ return *(int*)b-*(int*)a;}int main(){ int n,i,j; int a[1100],dp[1100]; while(scanf("%d",&n),n) { for(i=0;i< 阅读全文
posted @ 2012-04-24 21:30 LegendaryAC 阅读(122) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2103bs这道题,我坚信生男生女都一样!ps:不提前把几个0打出来的话要用__int64,否则会超范围View Code #include <stdio.h>int main(){ int t,m,n; int i; int bb,cnt,f; __int64 ans,fj; scanf("%d",&t); while(t--) { cnt=ans=f=0; fj=10000; scanf("%d%d",&m,&n); ... 阅读全文
posted @ 2012-04-24 20:57 LegendaryAC 阅读(227) 评论(0) 推荐(0) 编辑