A 旅行 题面: "bzoj" 题解:神奇的$dp$ 先按长度把边排序 指定必须走前$l$条边,枚举$l$ 设$dis[i][j][k]$表示当前到了$i$节点,已走过了$j$条前$l$条边,用了$k$次交换次数 "code" B 找零钱的洁癖 题面: "bzoj" 题解:更为神奇 首先直接bfs, ...
分类:
Web程序 时间:
2020-02-01 23:40:49
阅读次数:
143
1、镜像 Alt + Y 2、左转90° Ctrl + L 3、右转90° Ctrl + R ...
分类:
其他好文 时间:
2020-02-01 19:48:14
阅读次数:
1086
可以推出 min[i]要么是i要么是1,当a序列中存在这个数是1 max[i]的话就比较麻烦了 首先对于i来说,如果还没有被提到第一位的话,他的max可由他后面的这部分序列中 j =i 的不同数多少所决定,这个可以用树状数组解决 其次就是两次被提到第一位的中间的空当,这个空当中不同的数的大小,也会决 ...
分类:
其他好文 时间:
2020-01-30 22:56:34
阅读次数:
92
此段代码是基于辛普森公式的积分计算方法 1.代码 %%复合辛普森求积公式 %%Y是数值(attribute=0)或具体表达式(attribute=1),interval是求积区间,n是精度(如果是数值,则为数值长度-1) function CSQF = Compound_Simpson_quadra ...
分类:
其他好文 时间:
2020-01-30 17:22:53
阅读次数:
180
1、求出2-10000内的所有素数 Python: t = time() p_list = [] for i in range(2, b): flag = True for p in p_list: if p > math.sqrt(i): break if i % p == 0: flag = F ...
分类:
其他好文 时间:
2020-01-29 23:47:34
阅读次数:
80
计算机的三个子系统 :中央处理单元(CPU)、主存储器和输入/输出子系统。 中央处理单元 CPU有三个组成部分:算术逻辑单元、控制单元、寄存器组。 算术逻辑单元控制三种操作:逻辑运算、移位运算、算术运算。 寄存器有三部分:数据寄存器、指令寄存器、程序寄存器。 控制单元控制各个子系统的操作。 主存储器 ...
分类:
其他好文 时间:
2020-01-29 23:42:57
阅读次数:
61
http-server https://github.com/http-party/http-server#readme http-server is a simple, zero-configuration command-line http server. It is powerful enou ...
分类:
Web程序 时间:
2020-01-29 23:41:29
阅读次数:
99
Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output t ...
分类:
其他好文 时间:
2020-01-29 19:46:43
阅读次数:
81
| 分类 leetcode | Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most signifi... ...
分类:
其他好文 时间:
2020-01-29 12:44:58
阅读次数:
82
使用matplotlib画图报错,情况如下 RuntimeWarning: Glyph 20998 missing from current font 查询后初步发现是matplotlib找不到字体,需要自行设置一下: ...
分类:
其他好文 时间:
2020-01-29 00:59:28
阅读次数:
1246