Symmetric Tree问题:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).思路: dfs我的代码:public class Solution { ...
分类:
其他好文 时间:
2015-03-07 19:58:45
阅读次数:
135
这是一道简单的编程,随机的生成四则运算,不过还是不是很完美,还有一些欠缺!源代码:#include#include#includevoid main(){ int a,b,i,op,r;//r记录回答结果 int flag=1; while(flag) { fo...
分类:
其他好文 时间:
2015-03-07 19:59:46
阅读次数:
132
ArrayList与数组的区别: 数组是连续的、同一类型数据的一块区域,而集合可以是不连续的、多种数据类型的。 1.ArrayList ArrayList al = new ArrayList(); al.Add(3); al.Add(5.09); al.Add("gfdg"); ...
分类:
其他好文 时间:
2015-03-07 19:57:03
阅读次数:
115
/* * 1.10ReadCommandsFromStandardInputAndExecuteThem.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h"
#include static voi...
分类:
其他好文 时间:
2015-03-07 19:57:59
阅读次数:
297
////////////////////////////////////////////////////////////////////////////////////计算字符串的长度int strlen1(const char *str){int len=0;while (*str++!='\0'...
分类:
其他好文 时间:
2015-03-07 19:56:31
阅读次数:
234
man 3 errno /* * 1.8DemonstrateStrerrorAndPerror.cpp * * Created on: Feb 11, 2015 * Author: sunyj */ #include "../apuesunyj.h" int main(int argc, char...
分类:
其他好文 时间:
2015-03-07 19:56:34
阅读次数:
230
void function() {}A a;void main{ ::atexit(function); A b;};次序如下:1 实例 b 的析构函数 # main 里面的实例的析构函数2 --- main 函数返回---3 function() ...
分类:
其他好文 时间:
2015-03-07 19:55:28
阅读次数:
164
#includeint main(){ int n; char xing; scanf("%d %c",&n,&xing); int num=1,i=1; while(1) { num = num + 2 * (i + 2); //一开始就超出,不改变i if...
分类:
其他好文 时间:
2015-03-07 19:57:45
阅读次数:
111
#includeint main(){ int n; char xing; scanf("%d %c",&n,&xing); int num=1,i=1; while(1) { num = num + 2 * (i + 2); //一开始就超出,不改变i if...
分类:
其他好文 时间:
2015-03-07 19:56:03
阅读次数:
153
突然就看到SPOJ升级了,让我好不适应。。这一一道博弈论的题目,可以先前面暴力一下,易得小于十的为必胜态,十的时候必败,然后11到19又必胜,而且发现只要各位为零且这个数不为零就必败。再依次验证上百,上千的数。。#include#includeint n;int main(){ scanf("...
分类:
其他好文 时间:
2015-03-07 19:56:20
阅读次数:
120
存储程序计算机(The stored program computer)内存存储指令和数据CPU解释指令X86实现(X86 implementation)Registers(寄存器)通用寄存器(General-Purpose Registers)段寄存器(Segment Registers)标志寄存...
分类:
其他好文 时间:
2015-03-07 19:54:03
阅读次数:
101
133.100.11.8 prefer210.72.145.44203.117.180.36131.107.1.10time.asia.apple.com64.236.96.53130.149.17.2166.92.68.246www.freebsd.org18.145.0.30clock.via....
分类:
其他好文 时间:
2015-03-07 19:54:20
阅读次数:
163
DollarsTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %llu Submit Status DescriptionNew Zealand currency consists of $100, $50, $20, $...
分类:
其他好文 时间:
2015-03-07 19:53:59
阅读次数:
113
0) 首先讨论一下 cache line 索引定位的方式。 给定一个 32 位虚拟地址,怎么定位 cache line 呢? 答案是 VIPT (virtual indexed, physical taged), 即以虚拟地址作为 cache line 的 set 的索引,物理地址作为 ...
分类:
其他好文 时间:
2015-03-07 19:52:05
阅读次数:
312
二者实质上效果是一样的。1.接口回调是什么[2]?接口回调是指:可以把使用某一接口的类创建的对象的引用赋给该接口声明的接口变量,那么该接口变量就可以调用被类实现的接口的方法。实际上,当接口变量调用被类实现的接口中的方法时,就是通知相应的对象调用接口的方法,这一过程称为对象功能的接口回调。看下面示例。...
分类:
其他好文 时间:
2015-03-07 19:53:55
阅读次数:
104
0) 背景 有个静态库叫做 slib.lib, 其中包含两个 obj 文件: expofunc1.obj |- void sayHello1() { printf("Hello 1\n"); } |- void sayWorld1() {} expofunc...
分类:
其他好文 时间:
2015-03-07 19:51:34
阅读次数:
161
#df shows no file systems processedPosted by John Quaglieri on 27 July 2012 07:26 AMA df -m command on the system shows:df -mdf: no file systems proce...
分类:
其他好文 时间:
2015-03-07 19:53:41
阅读次数:
160