2666. Query on a tree IVProblem code: QTREE4You are given a tree (an acyclic undirected connected graph) with N nodes, and nodes numbered 1,2,3...,N. ...
分类:
其他好文 时间:
2015-01-07 00:31:02
阅读次数:
266
lct 基础(' ' ) 就当个纪念吧(' ' ) 毕竟写了4h, cut 部分一直naive 总是想找谁是儿子,然后最后发现直接提根就好了啊(' ' )#include #include #include #include using namespace std;typedef long l...
分类:
其他好文 时间:
2015-01-06 23:07:00
阅读次数:
276
1. Add chunk:For example, replace the header by using chunk.Usage: [[$chunk_name]]Cut all the header code from the Learn template [[++site_...
分类:
其他好文 时间:
2015-01-06 00:46:13
阅读次数:
332
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled u...
分类:
其他好文 时间:
2015-01-05 07:03:18
阅读次数:
261
论什么是LCT?蒟蒻也不造。。。splay写错是shen me gui = =话说,要注意翻转标记!!!还是要注意link & cut的写法啊喂! 1 /************************************************************** 2 Pr...
分类:
其他好文 时间:
2015-01-05 00:16:38
阅读次数:
307
Linux下添加用户:useradd 用户名
为用户名添加密码:passwd 用户名
查看系统中的所有用户:cat /etc/passwd |cut -f 1 -d :
注意:| 是管道,把cat的输出传给cut处理;后面的cut取出每一行的以:分割的第一栏。
用who命令可以查看当前登录的用户有哪些,一个用户可以多次登录比如有两个root。一个root在它的本地,一个ro...
分类:
其他好文 时间:
2015-01-04 21:32:54
阅读次数:
287
-f 列
cut -f 2 test.txt 提取第二列(以制表符为默认分隔符)
cut -f 2-5,8 test.txt 提取第2、3、4、5、8列(以制表符为默认分隔符)
-d 指定分隔符
cut -d "," -f 2,3 test.txt 以逗号为分隔符,提取第2和3列...
分类:
系统相关 时间:
2015-01-04 10:07:14
阅读次数:
217
邻接矩阵的图示:构建一个这种无向邻接矩阵。參考站点:http://www.geeksforgeeks.org/graph-and-its-representations/这里写了个类,添加删除图的操作。#pragma once#include #include class AdjListGraph{...
分类:
编程语言 时间:
2015-01-03 17:09:04
阅读次数:
239
1、查看CPU型号(1)查看CPU信息(型号)# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz(看到有8个逻辑CPU, 也知道了CPU型号)# ...
分类:
系统相关 时间:
2015-01-03 15:54:27
阅读次数:
331
图的复制
class Solution {
public:
UndirectedGraphNode *cloneGraph(UndirectedGraphNode *node ){
unordered_mapmap;
if(node == NULL)
return NULL;
return clone(node,ma...
分类:
其他好文 时间:
2015-01-01 21:19:33
阅读次数:
289