Reversing Linked List (25)
摘要:#include#includetypedef struct Node{ int curadd; int data; int nextadd;}Node;int main(){ int n,k,firstadd,i,num,j; Node *a,temp; int c; while(scanf("%...
阅读全文
posted @
2015-01-25 22:59
赛亚人
阅读(183)
推荐(0)
Maximum Subsequence Sum (25)——改进版
摘要:#include#includeint main(){ int k,i; int *a; while(scanf("%d",&k)!=EOF) { if(k10000) continue; int sum=0,b=0; int f=0,l=k,t=0; a=(int *)malloc(k*s...
阅读全文
posted @
2015-01-23 22:32
赛亚人
阅读(116)
推荐(0)
最大子列和问题(20)
摘要:#include#includeint main(){ int k,i; while(scanf("%d",&k)!=EOF) { if(k100000) continue; int *a=(int *)malloc(k*sizeof(int)); int sum=0,b=0; for(...
阅读全文
posted @
2015-01-21 12:02
赛亚人
阅读(126)
推荐(0)
01-2. Maximum Subsequence Sum (25)
摘要:#include#includeint main(){ int k,i; int *a; while(scanf("%d",&k)!=EOF) { int sum=0,b=0; int f=0,l=k,t=0; a=(int *)malloc(k*sizeof(int)); for(i=0;...
阅读全文
posted @
2015-01-21 11:58
赛亚人
阅读(121)
推荐(0)