上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页
摘要: Builder 生成器——对象创建型模式1.意图将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示2.动机一个RTF文档交换格式的阅读器应该能将RTF转换成多种正文格式。要能够容易地实现新的转换,同时不改变RTF阅读器3.适用性当创建复杂对象的算法应独立于该对象的组成部分以及他们的装配方式时当构造过程必须允许被构造的对象有不同的表示时。4.表示用一张别人的图http://www.cnblogs.com/woainilsr/archive/2012/04/05/2433153.html5.参与者builder为创建一个product对象的各个部件指定抽象接口Concrete 阅读全文
posted @ 2012-05-18 18:25 w0w0 阅读(268) 评论(0) 推荐(0)
摘要: abstract factory 抽象工厂——对象创建型模式1.意图提供一个创建一系列相关产品或相互依赖的接口,而无需指定他们具体的类2.别名kit3.动机为保证视感风格标准间的可移植性,一个应用不应该为一个特定的视感外观硬编码它的窗口组件。在整个应用中实例化特定的视感风格的窗口将会使以后难以改变4.适用性一个系统要独立于它的产品的创建、组合和表示时一个系统要由多个产品系列中的一个来配置时要强调一系列相关的产品对象的设计以便进行联合使用时提供一个产品类库,而只想显示他们的接口而不是实现时5.结构http://blog.csdn.net/caianye/article/details/58764 阅读全文
posted @ 2012-05-17 22:09 w0w0 阅读(192) 评论(0) 推荐(0)
摘要: 一个设计模式的要素1.模式名称:帮助记忆交流和思考2.问题:在何时使用设计模式3.解决方案:设计的组成部分,相互关系和各自的职责和协作方式还可以细分成结构:说明对象间的协作关系参与者:设计模式中的类和对象以及他们各自的职责协作:参与者怎么协作以实现他们的职责4.效果:描述模式应用的效果及使用模式应权衡的问题5.已知应用和相关模式在一定的抽象层次上描述问题,是对被用来在特定场景下解决一般设计问题的类和相互通信的对象的描述。设计模式确定了所包含的类和实例,他们的角色,协作方式以及职责分配,每一个设计模式都集中于一个特定的面向对象的设计问题或者设计要点。MVC设计模式 模型/视图/控制器分离视图和模 阅读全文
posted @ 2012-05-17 15:17 w0w0 阅读(389) 评论(0) 推荐(0)
摘要: 本文为转载===========================================================作者: thunderbird2(http://thunderbird2.itpub.net)发表于: 2008.08.10 23:58分类: 数据结构 出处: http://thunderbird2.itpub.net/post/5549/468533--------------------------------------------------------------- 二叉树遍历的递归与非递归算法二叉树的遍历可以大致分为递归遍历和层序遍历。递归遍历依次遍历左 阅读全文
posted @ 2012-05-15 20:30 w0w0 阅读(198) 评论(0) 推荐(0)
摘要: FroggerTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 16382Accepted: 5384DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sunsc 阅读全文
posted @ 2012-05-15 15:30 w0w0 阅读(211) 评论(0) 推荐(0)
摘要: 食物链Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 28725Accepted: 8371Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物,用上述两种说法,一句接一句地 阅读全文
posted @ 2012-05-14 23:18 w0w0 阅读(196) 评论(0) 推荐(0)
摘要: A Bug's LifeTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 20641Accepted: 6709DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite g 阅读全文
posted @ 2012-05-14 21:41 w0w0 阅读(188) 评论(0) 推荐(0)
摘要: Wireless NetworkTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 11639Accepted: 4953DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in t 阅读全文
posted @ 2012-05-14 20:01 w0w0 阅读(170) 评论(0) 推荐(0)
摘要: Cube StackingTime Limit: 2000MSMemory Limit: 30000KTotal Submissions: 13922Accepted: 4695Case Time Limit: 1000MSDescriptionFarmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John 阅读全文
posted @ 2012-05-14 16:49 w0w0 阅读(185) 评论(0) 推荐(0)
摘要: Find them, Catch themTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 20728Accepted: 6126DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify 阅读全文
posted @ 2012-05-14 11:01 w0w0 阅读(157) 评论(0) 推荐(0)
摘要: The SuspectsTime Limit: 1000MSMemory Limit: 20000KTotal Submissions: 14417Accepted: 6855DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to se 阅读全文
posted @ 2012-05-13 22:06 w0w0 阅读(155) 评论(0) 推荐(0)
摘要: Is It A Tree?Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14525Accepted: 5007DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties. There i 阅读全文
posted @ 2012-05-13 10:16 w0w0 阅读(175) 评论(0) 推荐(0)
摘要: ArbitrageTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9986Accepted: 4250DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British pou 阅读全文
posted @ 2012-05-10 20:35 w0w0 阅读(221) 评论(0) 推荐(0)
摘要: Arctic NetworkTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5390Accepted: 1909DescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every o 阅读全文
posted @ 2012-05-10 09:16 w0w0 阅读(226) 评论(0) 推荐(0)
摘要: Tangled in CablesTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4464Accepted: 1831DescriptionYou are the owner of SmallCableCo and have purchased the franchise rights for a small town. Unfortunately, you lack enough funds to start your business properly and are relying on parts you have fo 阅读全文
posted @ 2012-05-09 21:50 w0w0 阅读(214) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页