/** * 辅助类 * 用于记载字符和位置 * */class CharPos{ char c; int pos; public CharPos(char c,int pos){ this.c=c; this.pos=pos; }}/** ...
分类:
其他好文 时间:
2014-07-26 00:31:56
阅读次数:
189
描述:计算逆波兰表达法的结果Sample: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6使用stack实现: 1 def is_op(c): 2 .....
分类:
其他好文 时间:
2014-07-26 00:13:26
阅读次数:
265
import java.lang.reflect.Array;/** * 泛型栈 * * @param */public class Stack{ private Class type;// 栈元素所属的类 private int size;// 栈深度 private T[] ...
分类:
其他好文 时间:
2014-07-26 00:03:26
阅读次数:
322
挖坑防忘,天亮补题解。#include #include #include #include #include #include #include #include #include #pragma comment(linker, "/STACK:1024000000");#define EPS (...
分类:
其他好文 时间:
2014-07-25 16:47:21
阅读次数:
228
曾经遇到过卡顿是类似的原因:当时对显卡底层知识理解不懂,看到引擎底层有一个MaskFramexxx的接口,实现是使用注册表修改显卡底层的注册信息,当时还是一个掉接口习惯的客户端码农的思维,没理解底层含义却不小心改成了30。于是游戏就开始每隔一会儿就卡一下了。调试过程中使用了伟大的CPU卡顿PROFI...
分类:
其他好文 时间:
2014-07-25 13:50:11
阅读次数:
216
1 UIView自带的方法 2 1> - (void)layoutSubviews; 3 * 当一个控件的frame发生改变的时候就会自动调用 4 * 一般在这里布局内部的子控件(设置子控件的frame) 5 * 一定要调用super的layoutSubviews方法 6 7 2> - (voi.....
分类:
其他好文 时间:
2014-07-25 02:38:44
阅读次数:
209
self.textView = [[[UITextView alloc] initWithFrame:self.view.frame] autorelease];//初始化大小并自动释放self.textView.textColor = [UIColor blackColor];//设置textvi...
分类:
其他好文 时间:
2014-07-25 02:30:04
阅读次数:
267
(1)开关结点初始化 ??? 这时选择的节点类型是终端节点,所以使用f8wEndev.cfg文件,所以在Zglobals.h文件中,我们可以得到下面的定义 #define ZG_DEVICETYPE_ENDDEVICE ?????? 0x02 #define DEVICE_LO...
分类:
移动开发 时间:
2014-07-25 00:05:34
阅读次数:
360
最长上升子序列+最长递减子序列-重复的方法不严谨,貌似有人已经找到反例了,至于为什么那种方法能ac应该是测试数据弱吧
以下才是最标准的做法
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-07-24 23:11:53
阅读次数:
262
DescriptionMr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever he wants to watch one of the movies, he...
分类:
其他好文 时间:
2014-07-24 21:58:12
阅读次数:
394