摘要:Alice and BobTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1253Accepted Submission(s): 478Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards res
阅读全文
摘要:Jamie's Contact GroupsTime Limit: 15000/7000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 225Accepted Submission(s): 63Problem DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone.
阅读全文
摘要:题目链接:http://poj.org/problem?id=1240好久之前自己写的,今天拿出来看看,越看越喜欢。题目意思,已知前序遍历跟后序遍历,求树共有多少种形态。前一篇随笔中提到了一点。View Code #include <iostream>#include <stdio.h>#include <string.h>#include <stdlib.h>using namespace std;const int maxn=27;char s1[maxn],s2[maxn];int m,ans,pre;int zuhe(int cnt){
阅读全文
摘要:今天是国庆节,没有出去,因为之前一直都在学习数据结构的东西,把图论的东西忘的差不多,七天乐,乐图论。今天早上电脑无缘无故开不了机,没办法我把硬盘拆了又重装了一遍。昨晚看到个给出一棵K叉树的前序跟后序遍历,让算一下这个树一共有多少种形态。里面涉及到一点求组合数的知识,我把他弄上来,免的自己以后忘记了。
阅读全文