2012年10月7日

【转】【伸展树Splay Tree】

摘要: 作者:Dong | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明网址:http://dongxicheng.org/structure/splay-tree/1、 概述二叉查找树(Binary Search Tree,也叫二叉排序树,即Binary Sort Tree)能够支持多种动态集合操作,它可以用来表示有序集合、建立索引等,因而在实际应用中,二叉排序树是一种非常重要的数据结构。从算法复杂度角度考虑,我们知道,作用于二叉查找树上的基本操作(如查找,插入等)的时间复杂度与树的高度成正比。对一个含n个节点的完全二叉树,这些操作的最坏情况运行时间为O(log n)。但如果因 阅读全文

posted @ 2012-10-07 15:21 kuangbin 阅读(7662) 评论(4) 推荐(0) 编辑

HDU 4115 Eliminate the Conflict (2-SAT)

摘要: Eliminate the ConflictTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 740Accepted Submission(s): 301Problem DescriptionConflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fight 阅读全文

posted @ 2012-10-07 13:46 kuangbin 阅读(1333) 评论(1) 推荐(0) 编辑

POJ 3678 Katu Puzzle (2-SAT)

摘要: Katu PuzzleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5749Accepted: 2077DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (one of AND, OR, XOR) and an integer c (0 ≤ c ≤ 1). One Katu is solvable if one can find each 阅读全文

posted @ 2012-10-07 10:54 kuangbin 阅读(367) 评论(0) 推荐(0) 编辑

POJ 3648 Wedding(2-SAT)

摘要: WeddingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5880Accepted: 1802Special JudgeDescriptionUp to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears an ela 阅读全文

posted @ 2012-10-07 10:23 kuangbin 阅读(2397) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: