这题其实挺简单,可是自己就是被坑了很长时间,究其原因,脑袋短路了。本来排完序之后,应该把结果按照未排序之前的顺序输出,结果我就直接输出了,而题目给的例子正好是按顺序给的,输出没有问题,哎,果然够坑。以后再也不能相信题目给的例子了。
#include
#include
#include
#include
#include
#include
using namespace std;
int seat...
分类:
其他好文 时间:
2015-01-30 22:57:57
阅读次数:
384
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
HideTags
Linked List Two
Pointers
#pragma once
#include
using namespace std;
...
分类:
其他好文 时间:
2015-01-30 22:54:42
阅读次数:
174
【1】默认构造函数关于默认构造函数,请参见随笔《类中函数》请看测试代码:至此足以。【2】加括号与不加的区别加括号:不加括号:Good Good Study, Day Day Up.顺序 选择 循环 总结
分类:
其他好文 时间:
2015-01-30 20:57:01
阅读次数:
739
project configuration is not up-to-date with pom.xml其实这个问题解决非常简单:在项目上右键——【Maven】——【Update Project Configuration……】这时会打开一个(Update Maven Dependencies)的对...
分类:
其他好文 时间:
2015-01-30 14:59:01
阅读次数:
168
Android studio 快捷键注释代码// CTRL + /注释代码/**/ ctrl + shift + /格式化代码 ctrl + alt + L清除无效包引用 ctrl + alt + o查找并替换 ctrl + r上下移动代码 alt + shift + up/do...
分类:
移动开发 时间:
2015-01-30 14:52:25
阅读次数:
125
[10.3.53.53:/EMRCV5]# svn up svn: E155004: Working copy '/EMRCV5' locked. svn: E155004: '/EMRCV5' is already locked. svn: run 'svn cleanup' to remove ...
分类:
其他好文 时间:
2015-01-29 23:57:38
阅读次数:
5863
Linux 常用命令-- toptop 命令实时显示进程的状态。默认状态显示的是cpu密集型的进程,并且每5秒钟更新一次。你可以通过PID的数字大小,age(),time(),resident memory usage()以及进程从启动后占用cpu的时间。top - 20:59:18 up 4 da...
分类:
系统相关 时间:
2015-01-29 23:48:04
阅读次数:
358
访问https://help.github.com/articles/set-up-git/,选择对应OS平台。有文档参考,我的是OpenSuse。在console中下载安装http://www.git-scm.com/download/linux对应平台的版本,需要root。现在你可以试试输入gi...
分类:
其他好文 时间:
2015-01-29 22:15:28
阅读次数:
201
Problem Description
N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel between any two planets through these channels.
If we ...
分类:
移动开发 时间:
2015-01-29 21:11:36
阅读次数:
248
Problem Description
Caocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn't give up. Caocao's army still was not good at water battles, so he came up with another ide...
分类:
其他好文 时间:
2015-01-29 21:10:54
阅读次数:
207