
按相关性排序 按时间排序
- hdu 1003 2009-11-30 12:52:28
- 题目链接:http:/acm.hdu.edu.cn/showproblem.php?pid=1003思路:格式上并没有什么问题,算法:1.重第一个数开始累加直到sum为小于0,则这一串字符中必有最大值,记录最大值。2.在sum小于0的地方重复累加,最后直到结束。代码:#includeusing namespace std;int main...
- acm hdu1032The 3n + 1 problem 2009-11-20 14:37:25
- http:/acm.hdu.edu.cn/showproblem.php?pid=1032代码#include"stdio.h"unsigned long long long Length(unsigned long n){for (1;count++){if (n%2==0){n=n/2;}elsen=3*n+1;}return count;}int main(){bool temp;while (scanf("%d%d"&start,&end)!=EOF){max=1;temp...
- acm pku1532Drainage Ditches 2009-11-20 15:32:29
- http:/acm.hdu.edu.cn/showproblem.php?pid=1532网络流,纯粹的网络流..代码:#include#include#include#define SIZE 201using namespace std;int NumOfAdj,NumOfVtx;intmap;/图的邻接矩阵//FIFOqueue==struct QUEUE{int queue;int head;int tail;};struct QUEUE q;int...
- acm hdu1021Fibonacci Again 2009-11-20 14:57:52
- http:/acm.hdu.edu.cn/showproblem.php?pid=1021简单..有规律,以四为周期代码:#includeint main(){int n;while(scanf("%d"&n)!=EOF){ if(n%4==2) printf("yes\n");else printf("no\n");}return 0;}
- acm hdu1097A hard puzzle 2009-11-20 15:01:01
- http:/acm.hdu.edu.cn/showproblem.php?pid=1097悲剧了,这题不懂撒..(⊙o⊙)…代码:#includeint main(){ unsigned long a,b,i,temp,k,t,start;while(scanf("%d%d"&a,&b)!=EOF){a%10;while(k!=start){t+;k=k*a%10;}//printf("%d\n",t);b=b%t;if(b==0)b=t...
- acm hdu1019Least Common Multiple 2009-11-20 14:47:58
- http:/acm.hdu.edu.cn/showproblem.php?pid=1019最小公倍数,两个接一个求..代码:#includeint gcd(__int64n,_int64 m){if(m==0)return n;return gcd(m,n%m);}int main(){int t,n;_int64 x1,x2;scanf("%d"&t);while(t--){scanf("%d%I64d"&n,&x1);while(--n){scanf("%I...
- acm hdu1020Encoding 2009-11-20 14:55:26
- http:/acm.hdu.edu.cn/showproblem.php?pid=1020简单模拟题代码:includevoid process(chars){int i,num;for(0';i++){num=1;while(s==s&&s!\0'){num+;i+;}if(num==1)printf("%c",s);elseprintf("%d%c",num,s);}printf("\n");}int main(){int t;char s;scanf("%d"&t...
- acm hdu1017A Mathematical Curiosity 2009-11-20 14:50:19
- http:/acm.hdu.edu.cn/showproblem.php?pid=1017简答题,不废话了,(⊙o⊙)代码:#include"stdio.h"int main(){int count;int (scanf("%d"&t)!=EOF){while (t--){(scanf("%d%d"&n,&m),n||m){(
- acm hdu1016Prime Ring Problem 2009-11-20 14:39:14
- http:/acm.hdu.edu.cn/showproblem.php?pid=1016数学问题,脑子转不太过来,参了网上的思想(⊙o⊙)代码:include#includeconst int n;int recur(intp){int i;for(
- acm hdu1048The Hardest Problem Ever 2009-11-20 14:34:22
- http:/acm.hdu.edu.cn/showproblem.php?pid=1048简单模拟~~代码:#include"stdio.h"#include"string.h"char str,s;chararray={'V''W''X''Y''Z''A''B''C''D''E''F''G''H''I''J''K''L''M''N''O''P''Q''R''S''T''U'};;int main(){int i,j;/freopen("e:\test\\1048.txt...
相关搜索



