tree命令以树状图列出文件目录结构。不过某些Linux上(Centos 6.4)没有tree命令,本文将介绍安装方法。常用参数:tree -d 只显示目录。tree -L 1 只显示第一层目录。[root@localhost tree-1.7.0]# tree-bash: tree: comman...
分类:
系统相关 时间:
2014-07-22 22:48:14
阅读次数:
347
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题解:开始想到的方法比较偷懒,直接遍历一遍数组,把每个ListNode对应的值放到...
分类:
其他好文 时间:
2014-07-22 22:45:13
阅读次数:
271
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2014-07-22 22:42:33
阅读次数:
243
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".题解:简单的二进制加法模拟。a,b的最后以为对齐开始进行加法,用carries保存进位,如果加...
分类:
其他好文 时间:
2014-07-22 22:42:32
阅读次数:
196
此实例实现的功能:在一个树形控件中显示鸡啄米网站的简单结构分层,共有三层,分别为鸡啄米网站、各个分类和文章。用鼠标左键单击改变选中节点后,将选中节点的文本显示到编辑框中。下面是具体实现步骤:
1. 创建一个基于对话框的MFC工程,名称设置为“Example31”。
2. 在自动生成的对话框模板IDD_EXAMPLE31_DIALOG中,删除“TODO: Pl...
分类:
其他好文 时间:
2014-07-22 14:36:48
阅读次数:
372
java很给力逆序用了Colletcions.reverse();/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; ...
分类:
其他好文 时间:
2014-07-22 00:04:35
阅读次数:
154
1.Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
2.Given a singly linked list where elements are sorted in ascending order, convert it to a heig...
分类:
其他好文 时间:
2014-07-21 23:45:53
阅读次数:
264
Multiplication Table
Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u
Submit
Status
Practice
CodeForces 448D
Description
Bizon the Champion isn't just charming, he al...
分类:
其他好文 时间:
2014-07-21 23:29:23
阅读次数:
311
不容易啊。。一个小错误让我wa死了,找了一个晚上,怎么都找不到
最后是对拍代码找到的错误,发现当步数比较小的时候答案就是对的,比较大的时候就不对了
想到一定是什么地方越界了。。。
power[i] = (i64)(power[i - 1] * 26) % mod;
就是这行。。。
改成 power[i] = ((i64)power[i - 1] * 26) % mod;
就过了。。...
分类:
其他好文 时间:
2014-07-21 23:29:20
阅读次数:
369
Description
The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which h...
分类:
其他好文 时间:
2014-07-21 22:32:18
阅读次数:
278