摘要:
题目:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1291以前的一个题,贴下代码; 1 #include 2 #include 3 char ans[100]; 4 5 void build(int n, char *s1, char *s2, char *s) 6 { 7 if(n <= 0) return; 8 int p = strchr(s2, s1[0])-s2; 9 build(p, s1+1, s2, s);10 build(n-p-1, s1+p... 阅读全文
posted @ 2013-07-01 22:51
水门
阅读(381)
评论(0)
推荐(0)
摘要:
题目:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2136&cid=1184 自己重新写的: 下面的代码如果建树 不想要返回值的话,也可以这些写 void build(tree *&p) { },这样用引用可以自动 改变L和R的指向。 如果不加 阅读全文
posted @ 2013-07-01 13:37
水门
阅读(514)
评论(0)
推荐(0)
摘要:
c++ sort :http://www.16kan.com/post/997260.html http://wenku.baidu.com/view/e064166daf1ffc4ffe47ac67.html 假设自己定义了一个结构体 node struct node { int a; int b 阅读全文
posted @ 2013-07-01 10:21
水门
阅读(1255)
评论(0)
推荐(0)

浙公网安备 33010602011771号