sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出。如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序。 sort语法 [root@www ~]# sort [-fbMnrtuk] [file or stdin] 选项与 ...
分类:
系统相关 时间:
2017-08-17 15:45:16
阅读次数:
219
redis-cli -a my_redis_password keys "rData_*" | xargs redis-cli -a my_redis_password del Linux 的xargs : 支持管道传输参数 原理 : xargs 可以读入 stdin 的资料,并且以空白字元或断行字 ...
分类:
其他好文 时间:
2017-08-17 14:47:04
阅读次数:
162
题面: Problem Description Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整 ...
分类:
其他好文 时间:
2017-08-16 19:14:51
阅读次数:
111
from sys import stdout ,stdin f=open(r"c:\text\somefile.txt") open(filename,mode,buffering) mode 'r' read 'w' writ 'a' 追加模式 'b' 二进制模式 '+' 读写模式 bufferi ...
分类:
编程语言 时间:
2017-08-16 14:03:04
阅读次数:
177
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4255 这特喵的不就是河南省某届省赛那道开关灯的强化版题目吗。。。。 一是数据增强了可能爆int,所以用的LL才A,还有就是给出的坐标不一定有序注意排序,还有起点不一定是送餐点,要 ...
分类:
其他好文 时间:
2017-08-16 13:13:57
阅读次数:
136
题意 给定长度为 $n$ 的序列 $A = \left\{ a_1, a_2, ..., a_n \right\}$ . 我们定义其逆序图 $G$ : 对于 $i < j$ , $i, j$ 之间存在连边 $\Leftrightarrow a_i > a_j$ . 给定一个序列的逆序图, 求有多少个 ...
分类:
其他好文 时间:
2017-08-14 23:30:28
阅读次数:
111
#include using namespace std; #define SIZE 100 int map[SIZE][SIZE]; int queue[SIZE]; int color[SIZE]; int visit[SIZE]; int m,n; int tab; int ans; int ... ...
分类:
其他好文 时间:
2017-08-14 18:56:48
阅读次数:
154
有两篇文章一篇讲解(下面copy)《 PageRank算法简介及Map-Reduce实现》来源:http://www.cnblogs.com/fengfenggirl/p/pagerank-introduction.html 另一篇《PageRank简介-串讲Q&A.docx》 http://doc ...
分类:
编程语言 时间:
2017-08-14 17:22:44
阅读次数:
189
https://vjudge.net/problem/SPOJ-HIGH 题意: 给n个点m条边,求生成树个数。 思路: 矩阵树裸题。 具体的话可以看一下周冬的论文《生成树的计数及其应用》。 简单说一下,$A[ ][ ]$为邻接矩阵,有边为1(其实也就是边的个数,有重边时要注意),无边为0。$D[ ...
分类:
其他好文 时间:
2017-08-14 10:12:44
阅读次数:
154
★★ 输入文件:ACautomata.in 输出文件:ACautomata.out 简单对比时间限制:1 s 内存限制:128 MB 【题目描述】 对,这就是裸的AC自动机。 要求:在规定时间内统计出模版字符串在文本中出现的次数。 【输入格式】 第一行:模版字符串的个数N(N<=10)。 第2->N ...
分类:
其他好文 时间:
2017-08-14 10:02:47
阅读次数:
178