grep -rn "afdfsdfasd" ./ |grep -v "svn" |grep -v
"log....." |grep ............可以 在 gerp的结果中,无数次筛选,剔除不要的结果 通过使用: grep -v 选项 。
分类:
其他好文 时间:
2014-05-17 00:07:33
阅读次数:
252
hadoop dfsadmin -safemode leave
分类:
其他好文 时间:
2014-05-16 22:18:40
阅读次数:
325
广度优先搜索(Breadth-First-Search)和深度优先搜索(Deep-First-Search)是搜索策略中最经常用到的两种方法,特别常用于图的搜索.其中有很多的算法都用到了这两种思想,比如:Dijkstra单源最短路径算法和Prim最小生成树算法都采用了和宽度优先搜索类似的思想。BFS...
分类:
其他好文 时间:
2014-05-14 12:29:53
阅读次数:
544
Pat1018代码
题目描述:
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to an...
分类:
其他好文 时间:
2014-05-13 23:27:04
阅读次数:
582
大致题意:给出一个整数n,(1 int n,flat;unsigned long long
b;void DFS(unsigned long long a,int step){ if(flat||step==19) { return ; }
if(a%n==0)...
分类:
其他好文 时间:
2014-05-13 19:59:23
阅读次数:
276
A:A. Points and Segments (easy)
题目看了n久,开始觉得尼玛这是div2的题目么,题目还标明了easy。。
意思是给你一n个点,m个区间,在n个点上放蓝球或者红球,然后让你找一种选择方案使得m个区间内的蓝球和红球数量之差不超过1.
开始想过用dfs,不过这只是div2的A题而已。。
然后想了下,直接输出010101序列不就可以么。
交了一发,发现...
分类:
其他好文 时间:
2014-05-13 15:42:51
阅读次数:
296
Prime Ring Problem
Problem Description
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent...
分类:
其他好文 时间:
2014-05-13 11:54:17
阅读次数:
444
中心节点就是树的中心,2遍dfs求到树的直径,而中心一定在直径上,顺着直径找到中心就够了。
然后可以一遍树形DP找到最小值或者二分+判断是否访问到叶子节点。
#include
#include
#include
#include
using namespace std;
struct node
{
int next;
int power;
int length...
分类:
其他好文 时间:
2014-05-13 11:28:38
阅读次数:
306
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3768
Continuous Login
Time Limit: 2 Seconds Memory Limit: 131072 KB Special Judge
Pierre is recently obsessed...
分类:
其他好文 时间:
2014-05-13 07:28:07
阅读次数:
412
lk@lk-virtual-machine:~/hadoop-1.0.1/bin$ ./hadoop dfs -rmr output
Deleted hdfs://localhost:9000/user/lk/output
lk@lk-virtual-machine:~/hadoop-1.0.1/bin$ ./hadoop jar ~/mytopk.jar top.Top input out...
分类:
其他好文 时间:
2014-05-13 06:53:12
阅读次数:
448