随笔分类 -  数据结构-平衡树-SplayTree

摘要:题目连接http://poj.org/problem?id=3580SuperMemoDescriptionYour friend, Jackson is invited to a TV show called SuperMemo in which the participant is told t... 阅读全文
posted @ 2015-08-31 17:12 GadyPu 阅读(157) 评论(0) 推荐(0)
摘要:题目连接http://poj.org/problem?id=2887Big StringDescriptionYou are given a string and supposed to do some string manipulations.InputThe first line of the ... 阅读全文
posted @ 2015-08-31 16:42 GadyPu 阅读(170) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1890如下: 1 #include 2 #include 3 #include 4 #include 5 using std::sort; 6 using std::swap; 7 cons... 阅读全文
posted @ 2015-05-02 17:33 GadyPu 阅读(198) 评论(0) 推荐(0)
摘要:原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1269伸展树的运用,如下: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::swap; 7... 阅读全文
posted @ 2015-05-01 09:42 GadyPu 阅读(184) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18902伸展树的区间翻转剪切。。。如下: 1 #include 2 #include 3 #include 4 #include 5 const int Ma... 阅读全文
posted @ 2015-04-25 14:25 GadyPu 阅读(232) 评论(0) 推荐(0)
摘要:原题链接:http://www.tyvj.cn/p/1729这道题以前用c语言写的splay tree水过了。。现在接触了c++重写一遍。。。只涉及区间翻转,由于没有删除操作故不带垃圾回收,具体如下: 1 #include 2 #include 3 #include 4 #include ... 阅读全文
posted @ 2015-04-24 19:36 GadyPu 阅读(241) 评论(0) 推荐(0)