上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页
摘要: http://acm.uestc.edu.cn/problem.php?pid=1874&cid=217Wally WorldTime Limit: 1000 ms Memory Limit: 65535 kB Solved: 26 Tried: 135 DescriptionTwo star-crossed lovers want to meet. The two lovers are standing at distinct points in the plane (but then again, aren't we all?). They can travel freel 阅读全文
posted @ 2013-06-02 14:44 crazy_apple 阅读(299) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2253FroggerTime Limit:1000MSMemory Limit:65536KTotal Submissions:20262Accepted:6575DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and f 阅读全文
posted @ 2013-05-31 23:03 crazy_apple 阅读(209) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1961PeriodTime Limit:3000MSMemory Limit:30000KTotal Submissions:10855Accepted:4995DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That 阅读全文
posted @ 2013-05-30 22:18 crazy_apple 阅读(216) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2488A Knight's JourneyTime Limit:1000MSMemory Limit:65536KTotal Submissions:24572Accepted:8305DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knig 阅读全文
posted @ 2013-05-30 21:03 crazy_apple 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 using namespace std; 6 7 struct Nod 8 { 9 int num;10 Nod *left;11 Nod *right;12 Nod()13 {14 num=0;15 left=right=NULL;16 }17 };18 19 template <class TYPE>20 Nod* buildBinaryS... 阅读全文
posted @ 2013-05-14 11:37 crazy_apple 阅读(270) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3791二叉搜索树Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1905Accepted Submission(s): 850Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小于10,包含(0~9)的数字 阅读全文
posted @ 2013-05-14 10:47 crazy_apple 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 第三题://3 拼音字母【编程题】(满分19分) 在很多软件中,输入拼音的首写字母就可以快速定位到某个词条。比如,在铁路售票软件中,输入: “bj”就可以定位到“北京”。怎样在自己的软件中实现这个功能呢?问题的关键在于:对每个汉字必须能计算出它的拼音首字母。 GB2312汉字编码方式中,一级汉字的3755个是按照拼音顺序排列的。我们可以利用这个特征,对常用汉字求拼音首字母。 GB2312编码方案对每个汉字采用两个字节表示。第一个字节为区号,第二个字节为区中的偏移号。为了能与已有的ASCII编码兼容(中西文混排),区号和偏移编号都从0xA1开始。 我们只要找到拼音a,b,c,...x,y,z 每 阅读全文
posted @ 2013-05-04 17:05 crazy_apple 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 第一题:微生物增殖 假设有两种微生物 X 和 Y X出生后每隔3分钟分裂一次(数目加倍),Y出生后每隔2分钟分裂一次(数目加倍)。 一个新出生的X,半分钟之后吃掉1个Y,并且,从此开始,每隔1分钟吃1个Y。 现在已知有新出生的 X=10, Y=89,求60分钟后Y的数目。 如果X=10,Y=90 呢? 本题的要求就是写出这两种初始条件下,60分钟后Y的数目。 题目的结果令你震惊吗?这不是简单的数字游戏!真实的生物圈有着同样脆弱的性质!也许因为你消灭的那只 Y 就是最终导致 Y 种群灭绝的最后一根稻草! 1 //1 微生物增殖 2 #include<iostream> 3 using 阅读全文
posted @ 2013-05-04 16:11 crazy_apple 阅读(276) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn the year 2012, Departyment finally finished building Freedam. From then on, all people can only smilence in the Chintranet. If you want to go some where, you need to obey some rules.One day, Shitizen wants to go somewhere. He(/she/it?) starts from (X, 0), and wants to go to any place w 阅读全文
posted @ 2013-04-29 20:15 crazy_apple 阅读(275) 评论(0) 推荐(0) 编辑
摘要: http://soj.me/show_problem.php?pid=1001&cid=10041001. Black MagicDescriptionBelieve it or not, there is a powerful black magic, invented by Mage Philia, which will make one person fall in love with an OTAKU. Needless to say, this is the ultimate goal for all of you. However, in order to learn th 阅读全文
posted @ 2013-04-29 20:11 crazy_apple 阅读(236) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页