2013年8月15日

POJ 2785 4 Values whose Sum is 0

摘要: 4 Values whose Sum is 0Time Limit:15000MSMemory Limit:228000KTotal Submissions:13069Accepted:3669Case Time Limit:5000MSDescriptionThe SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b 阅读全文

posted @ 2013-08-15 20:18 lzm风雨无阻 阅读(362) 评论(0) 推荐(0) 编辑

POJ 1186 方程的解数

摘要: 方程的解数Time Limit:15000MSMemory Limit:128000KTotal Submissions:6188Accepted:2127Case Time Limit:5000MSDescription已知一个n元高次方程:其中:x1, x2,...,xn是未知数,k1,k2,...,kn是系数,p1,p2,...pn是指数。且方程中的所有数均为整数。假设未知数1 #include #define Max 4000037 int hash[Max],num[Max]; //hash判断和的位置,num是和为s的个数 bool used[Max]; ... 阅读全文

posted @ 2013-08-15 17:28 lzm风雨无阻 阅读(932) 评论(2) 推荐(0) 编辑

HDU 3999 The order of a Tree

摘要: The order of a TreeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 845Accepted Submission(s): 461Problem DescriptionAs we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely:1.insert a key k to 阅读全文

posted @ 2013-08-15 14:48 lzm风雨无阻 阅读(393) 评论(0) 推荐(0) 编辑

HDU 3791 二叉搜索树

摘要: 二叉搜索树Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2148Accepted Submission(s): 957Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1#include #include #include using namespace std;typedef struct node{ char data; node *lchild; node *rchild... 阅读全文

posted @ 2013-08-15 14:13 lzm风雨无阻 阅读(282) 评论(0) 推荐(0) 编辑

导航