Arranging Hat 题目大意: 给你n,m n个m位的数,保证m位,问要是n个按照从小到大排序,求改变最少个数字,使得这n个按照不递增排序,求最后排序的结果。 //dp[i][j] 表示前i个数,修改不超过j次的最小值。 dp[i][j]向dp[i+1][j+k]转移//pre[i][j]表 ...
分类:
其他好文 时间:
2019-10-05 22:54:18
阅读次数:
173
名句,感悟,鸡汤 1.一个人总要走陌生的路,看陌生的风景,听陌生的歌,然后在某个不经意的瞬间,你会发现,原本是费尽心机想要忘记的事情真的就那么忘记了。 1. One is always on a strange road, watching strange scenery and listening ...
分类:
其他好文 时间:
2019-10-05 22:09:55
阅读次数:
98
一.配置Nginx隐藏版本号 [root@localhost ~]# curl -I 192.168.200.111HTTP/1.1 200 OKServer: nginx/1.16.1 //Nginx版本号Date: Fri, 13 Sep 2019 02:20:55 GMTContent-Typ ...
分类:
其他好文 时间:
2019-10-05 12:39:31
阅读次数:
120
1、匹配一行文字中的所有开头的字母内容>>> re.findall(r"^[a-zA-Z]+","a\nB\n1\nx\n",re.M)['a', 'B', 'x']>>> re.findall(r"^[a-z]+","a\nb\n1\n2\nx\n",re.M) ['a', 'b', 'x'] > ...
分类:
其他好文 时间:
2019-10-05 12:26:14
阅读次数:
142
MYSQL安装(mariadb) 方法1:yum安装mariadb Red Hat Enterprise Linux/CentOS 7.0 发行版已将默认的数据库从 MySQL 切换到 MariaDB。 第一步:添加 MariaDB yum 仓库 找到yum仓库目录,创建repo文件 第二步:在 C ...
分类:
数据库 时间:
2019-10-05 12:09:16
阅读次数:
117
Edit: I suddenly found that this theorem is called Abel Identity. And the proof here is exactly the same as what he did. At first, I'd like to say tha ...
分类:
其他好文 时间:
2019-10-04 21:03:48
阅读次数:
98
https://golang.org/doc/asm https://github.com/teh-cmc/go-internals/tree/master/chapter1_assembly_primer https://github.com/go-internals-cn/go-internal ...
分类:
其他好文 时间:
2019-10-04 09:57:55
阅读次数:
102
You are given two arrays aa and bb, both of length nn. All elements of both arrays are from 00 to n?1n?1. You can reorder elements of the array bb (if ...
分类:
其他好文 时间:
2019-10-04 00:15:16
阅读次数:
79
一、简介 JDK5以前就有了ThreadLocal,又叫线程本地变量,提供了get与set等方法,这些方法为每一个使用该变量的线程都存有一份独立的副本,因此get总是返回由当前执行线程在调用set方法时设置的最新值。 二、使用 使用方法比较简单,如下。 ThreadLocal<M> threadLo ...
分类:
其他好文 时间:
2019-10-04 00:08:03
阅读次数:
100
从这里开始 比赛目录 从这里开始 比赛目录 Problem A 01 Matrix Code Problem B Sorting a Segment 如果选择的两个没有交的区间排序后得到的序列相同。那么两次排序都等于什么都没做。 如果有交,那么假设这两个区间分别是$[l_1, r_1]$和$[l_2 ...
分类:
其他好文 时间:
2019-10-03 16:28:50
阅读次数:
183