摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2066&cid=1158View Code #include #include long long num; int main() { int n,k,T,i ; w... 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2064&cid=1158View Code #include<stdio.h> long long f(int n) { if(n==0) return 1 ; else return 3*f(n-1); } int main() { int n, t ; scanf("%d", &t) ; while(t--) { scanf("%d", &n) ; printf("... 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2067&cid=1158View Code #include<stdio.h>#include<string.h>#define max(a, b) (a>b?a:b)struct node{ int len, a[1000] ;}dp[251] ;void add(node a, node b, node &c){ int i ; int len = max(a.len, b.len) ; for(i=1; i<=len; i++) c.a 阅读全文
摘要:
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2065&cid=1158View Code #include<stdio.h>int main(){ int n, i ; int f[31] ; while(scanf("%d", &n)!=EOF) { if(n==-1) break ; f[0] = 1 ; f[2] = 3 ; for(i=4; i<=n; i=i+2) f[i] = 4*f[i-2] - f[i-4] ; ... 阅读全文