计算几何模板 正如不知何方大佬所言,计算几何精妙之处,就是不用解析几何的方法去做 为了方便查找,防止自己迷路,我把函数名都写成了拼音 绝对不是因为我英语不好!!! 基本数据结构 点和向量: 点和向量都可以用一个坐标$(x,y)$来表示. 故向量$Vector$可以写为 typedef struct ...
分类:
其他好文 时间:
2021-02-06 12:02:22
阅读次数:
0
643 of leetcode class Solution { public: double findMaxAverage(vector<int>& nums, int k) { double len=nums.size(); double sum_now=0; double sum_max=0; ...
分类:
其他好文 时间:
2021-02-04 12:24:48
阅读次数:
0
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra ...
分类:
其他好文 时间:
2021-02-02 11:30:56
阅读次数:
0
脚本需求: 每天备份mysql数据库,保留7天的脚本。 存放在/opt/dbbak目录中。 脚本名称为database_xxxx-xx-xx.sql 脚本内容: 1 2 3 4 5 #!/bin/bash export NOW="$(date +"%Y-%m-%d")" export DATA_DI ...
分类:
数据库 时间:
2021-02-02 11:10:23
阅读次数:
0
算法原理 $fhq - treap$是一种好用的平衡数,以分裂合并为基本操作,代码简洁优雅,能解决包括序列操作在内的大部分问题,适合初学平衡树的$OIer$们(比如我)学习和掌握。 核心:分裂与合并 分裂时一般传四个参数 \(now\) :当前节点 \(k\) :以权值分裂或者以排名分裂时对两棵树的 ...
分类:
其他好文 时间:
2021-02-01 12:51:28
阅读次数:
0
1. 使用java8 的Instant //获取秒long unixTime = Instant.now().getEpochSecond();//161189992 将时间戳转为日期 long unixTime = 1611901474; Instant instant = Instant.ofE ...
分类:
编程语言 时间:
2021-01-30 11:46:37
阅读次数:
0
string str = DateTime.Now.ToString("yyyyMMdd"); string[] format = {"yyyyMMdd"}; DateTime date; if (DateTime.TryParseExact(str, format, System.Globaliz ...
对于一般形式约束优化问题: \[ \begin{array}{cl} \min & f(x) \\ \mathrm{s.t.} & g_i(x) \leq0, \quad i=1,\cdots ,m \\ & h_i(x) = 0, \quad i=1,\cdots ,l \end{array} \ ...
分类:
其他好文 时间:
2021-01-29 12:20:15
阅读次数:
0
符号 语法 示例(2016-05-09 13:09:55:2350) 格式说明 y DateTime.Now.ToString() 2016/5/9 13:09:55 短日期 长时间 d DateTime.Now.ToString("d") 2016/5/9 短日期 D DateTime.Now.T ...
方法1 import datetimeimport timestarttime = datetime.datetime.now()#long runningtime.sleep(2)endtime = datetime.datetime.now()str="run time: %d seconds" ...
分类:
编程语言 时间:
2021-01-27 14:08:10
阅读次数:
0