C# list介绍 一、LIST概述 所属命名空间:System.Collections.Generic public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable ...
1.描述 允许一个对象在其内部状态改变时改变他的行为,对象看起来似乎修改了他的类。 2.模式的使用 ·环境(Context):环境是一个类,该类含有抽象状态(State)的声明,可以引用任何具体状态类的实例。用户对该环境(Context)类的实例在某种状态下的行为感兴趣。 ·抽象状态(State): ...
分类:
其他好文 时间:
2017-10-15 14:40:52
阅读次数:
160
阿里云的云翼计划,是专门针对学生推出的一项优惠活动,只要经过学生实名认证,证明你是学生,你就可以9块买到阿里云的服务器了。 目前阿里云又推出了一项优惠活动,就是阿里云幸运券,无论任何人都可以领取。领取了阿里云幸运券然后购买阿里云服务器,在你支付购买之后,就会有各种幸运降临给你 阿里云幸运券领取地址 ...
分类:
其他好文 时间:
2017-10-15 14:25:00
阅读次数:
226
WebService 页面: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 /// <summ ...
【BZOJ3813】奇数国 Description 给定一个序列,每次改变一个位置的数,或是询问一段区间的数的乘积的phi值。每个数都可以表示成前60个质数的若干次方的乘积。 Sample Input 6 0 1 3 1 1 5 0 1 3 1 1 7 0 1 3 0 2 3 Sample Outp ...
分类:
其他好文 时间:
2017-10-15 14:14:38
阅读次数:
184
Your are given a binary tree in which each node contains a value. Design an algorithm to get all paths which sum to a given value. The path does not n ...
分类:
其他好文 时间:
2017-10-15 11:31:13
阅读次数:
188
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv ...
分类:
其他好文 时间:
2017-10-15 11:28:25
阅读次数:
195
changeAtlasScoreString : function (score,tfScore) { if(tfScore.getDescription() == "LabelAtlas")//判断是否为艺术字 //if(tfScore instanceof ccui.TextAtlas) ret ...
分类:
其他好文 时间:
2017-10-15 11:15:53
阅读次数:
126
以前做的是单调队列的方法,现在试一试DP 注意的是对于i,向左延伸的L[i]到i不一定是单调的,比如1 3 2 1 2,对于i=4,L[i]=1而是2所以不能简单的和左边第一个比较 错: if(a[i]<=a[i-1]) L[i]=L[i-1]+1; ...
分类:
其他好文 时间:
2017-10-15 00:42:27
阅读次数:
213
这段代码是AQS框架中将当前节点入队的操作。Node pred = tail;if (pred != null) { node.prev = pred; if (compareAndSetTail(pred, node)) { pred.next = n... ...
分类:
其他好文 时间:
2017-10-14 23:25:14
阅读次数:
200