Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2014-08-17 21:08:02
阅读次数:
339
章节:自动化基础篇——MonkeyRunner原理初步网易云课堂:http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=877115&courseId=712011主要讲解内容及笔记:一、理...
分类:
移动开发 时间:
2014-08-17 21:07:32
阅读次数:
385
在系统中查找程序:which,type(Bash,which date);whence(Korn Shell,whence date)。如何停止程序:quit,^D(bc)。显示时间和日期:date,date -u。显示日历:cal(显示当前月份的日历),cal 2014(显示某一年的日历),cal...
分类:
其他好文 时间:
2014-08-17 21:07:12
阅读次数:
390
1、首先在官网http://www.nodejs.org/下载NODE.JS2、打开命令行CMD,进入NODEJS\node_modules\的目录,输入npm install socket.io 安装socket.io模块.别急着关掉此CMD窗口,后面有用3、搭建服务端代码server.js 1 ...
分类:
Web程序 时间:
2014-08-17 21:07:02
阅读次数:
376
10.29 编写程序,使用流迭代器读取一个文本文件,存入一个vector中的string里。#include#include#include#include#includeusing namespace std;int main(){ ifstream in("1.txt"); istr...
分类:
其他好文 时间:
2014-08-17 21:06:32
阅读次数:
310
1 Junit中的@Test为例: 1.1 用注解(@Test)前private boolean isTestMethod(Method m) { return m.getParameterTypes().length == 0 && ...
分类:
编程语言 时间:
2014-08-17 21:06:12
阅读次数:
314
1. .net framework原理简介,C#程序的两次编译 .NET源代码——>语言编译器(第一次编译)——>MSIL+元数据(exe文件)——>CLR(公共语言运行时——类似于jre)——>机器代码(第二次编译)——>代码被执行2.Main函数是什么?在程序中使用Main函数有什么需要注意的....
分类:
Web程序 时间:
2014-08-17 21:05:12
阅读次数:
287
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1281...
分类:
其他好文 时间:
2014-08-17 20:02:22
阅读次数:
202
这题LRJ书上翻译的有问题,书上说两点之间的cost是两点的欧几里得距离,而题目要求两点的距离是两点欧几里得距离的平方。
其余就没什么好说的了,裸的并查集,需要注意的就是二进制枚举子集的问题。
二进制枚举子集:
for(int i = 0 ; i < (1 << s) ; i++){ /*s是集合元素的个数*/
for(int j = 0 ; j < s ; j+...
分类:
其他好文 时间:
2014-08-17 20:01:52
阅读次数:
213
A. Pashmak and Garden
题意:已知两个顶点的坐标,如果能推断出另外两个顶点则输出(special judge)。如果这两个顶点不是构成正方形的两个顶点,
则输出-1。
水题,1A,不多说。
#include
#include
#include
#include
using namespace std;
int main()
{
int x1,...
分类:
其他好文 时间:
2014-08-17 19:58:42
阅读次数:
410