码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  234 随笔 :: 426 文章 :: 44 评论 :: 145万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

文章分类 -  【1-03】【HDUOJ】

学习C++,C,Java。研究数据结构,算法。 提高编码内功。
摘要:Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 59774Accepted Submission(s): 13593Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max 阅读全文
posted @ 2011-10-10 15:11 海山 阅读(204) 评论(0) 推荐(0) 编辑

摘要:#include<iostream>using namespace std;#define Base 10#define MaxLen 1000struct BigInt { int len; int data[MaxLen]; BigInt() :len(0) {} BigInt(const BigInt& s) :len(s.len){ memcpy(this->data,s.data,len*sizeof(*data)); } BigInt(int s) :len(0){ for(;s>0;s=s/Base) data[len++]=s%Base; } B 阅读全文
posted @ 2011-10-10 14:33 海山 阅读(376) 评论(0) 推荐(0) 编辑

摘要:#include<iostream>using namespace std;int main(){int a,b;int sum=0;cin>>a>>b;for(int i=1;i<=b;i++){sum=sum+i;}return 1;}#include<iostream>using namespace std;int main(){int a,b;int sum=0;cin>>a>>b;for(;a<=b;a++){sum=sum+a;}count<<a<<endl;cout< 阅读全文
posted @ 2011-10-06 23:01 海山 阅读(121) 评论(0) 推荐(0) 编辑

摘要:C++#include<iostream>using namespace std;int main(){int a,b;while(cin>>a>>b)cout<<a+b<<endl;return 1;}C#include<stdio.h>#define P 3.1415927main(){ int a,b; while(scanf("%d%d",&a,&b)==2) printf("%d\n",a+b); return 0;}Javaimport java.util 阅读全文
posted @ 2011-10-06 14:48 海山 阅读(256) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示