ACM
文章平均质量分 75
wangyangkobe
这个作者很懒,什么都没留下…
展开
-
Train Problem——判断输出序列是否是输入序列的出栈顺序
http://acm.hdu.edu.cn/showproblem.php?pid=1022#include #include using namespace std; void TestIsStackSequence(char *in, char *out); int main() { int n; char in[10]; char out[10]; while (scanf("%d %s %s", &n, in, out) != EOF) { TestIsSta原创 2011-01-08 12:11:00 · 1365 阅读 · 0 评论 -
A + B Problem II
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1002<br />#include <iostream> #include <string> using namespace std; /************************************************************************/ /* 两个小于1000位的大整数相加 */ /*******************************原创 2010-11-21 16:16:00 · 606 阅读 · 0 评论 -
求最大字段和
<br /> http://acm.hdu.edu.cn/showproblem.php?pid=1003<br /> <br />只有这个代码能通过<br />/* 1003 Max Sum Time Limit : 1000 ms Memory Limit : 32768 K Output Limit : 1024 K GUN C input 4 -6 -8 0 -3 output 0 1 1 OJ有错误,连不正确的也AC */ #include <stdio.h> int原创 2010-11-22 10:48:00 · 980 阅读 · 0 评论 -
Big Number(阶乘)
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1018<br /><br /> <br />正确的解法为:<br /> <br />#include <iostream> using namespace std; int main() { int t,n,ca,cb,digit; double num; if(cin>>t) { for(ca=0;ca<t;ca++) { cin>>n; digit=1;nu原创 2010-11-22 19:24:00 · 883 阅读 · 1 评论 -
另类斐波那契数列
关于菲薄纳妾数列求法的各种算法:http://www.cnblogs.com/CCBB/archive/2009/04/25/1443441.htmlACM题地址:http://acm.hdu.edu.cn/showproblem.php?pid=1021正确且NB的解法:#include #define NMAX 1000000 int main() { long n; while(scanf("%ld",&n) ==1) if (n%8==2 || n%8=原创 2010-11-24 19:11:00 · 2273 阅读 · 1 评论 -
一致性hash
http://hbluojiahui.blog.163.com/blog/static/31064767201098114026211/转载 2011-10-13 14:23:35 · 87 阅读 · 0 评论