资源预览内容
第1页 / 共7页
第2页 / 共7页
第3页 / 共7页
第4页 / 共7页
第5页 / 共7页
第6页 / 共7页
第7页 / 共7页
亲,该文档总共7页全部预览完了,如果喜欢就下载吧!
资源描述
Problem A:简单的图形覆盖Time Limit:1000MS Memory Limit:65536K Total Submit:201 Accepted:104 DescriptionDescription 有一个 2*n 的方格,要用若干个 1*2 的模块覆盖,模块可以横放,也可以竖放.问对 于给定的 n(n int A101; int main() int n,i;while(scanf(“%d“,A1=2;if(n=1|n=0) printf(“%dn“,A0);else if(n=2) printf(“%dn“,A1);elsefor(i=2;i int A101; int B101; int main() int n,i,max;scanf(“%d“,while(n!=0) for(i=0;i #include char x201; char y201; int z200200; int main() int i,j,s,t,max;while(scanf(“%s%s“,x,y)!=EOF) s=strlen(x);t=strlen(y);for(i=0;i=zij-1) zij=zi-1j;else zij=zij-1; max=z00; for(i=0;imax) max=zij; printf(“%dn“,max);return 0; Problem D:最长上升子序列Time Limit:1000MS Memory Limit:65536K Total Submit:456 Accepted:239 DescriptionDescription 一个数的序列 bi,当 b1 int A100,B100; int main() int n,i,j,max; while(scanf(“%d“,imax) max=Bj; Bi= max+1; max=B0; for(i=1;in;i+) if(maxBi) max=Bi; printf(“%dn“,max); return 0;
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号