如:删除容器中第i个元素。 操作:先将第i个元素与最后个元素互换,再删除最后一个元素。 std::swap(std::begin(pointsetA)+i-1,std::end(pointsetA)-1); //交换数据 pointsetA.pop_back(); //删除最后的那个数据 ...
分类:
其他好文 时间:
2020-08-11 09:28:27
阅读次数:
65
有一个 $X$、$Y$ 轴坐标范围为 $1\sim n$ 的范围的方阵,每个点上有块黄金。一阵风来 $(x,y)$ 上的黄金到了 $(f(x),f(y))$,$f(x)$ 为 $x$ 各位上数字的乘积,如果黄金飘出方阵就没了。求在 $k$ 个格子上采集黄金最多可以采集的黄金数。
数据范围:$1\le... ...
分类:
其他好文 时间:
2020-08-11 09:13:49
阅读次数:
52
Mysql索引优化 准备数据 建立一个测试用表 往表中插入10w条随机数据的存储过程 CREATE DEFINER=`root`@`%` PROCEDURE `insert_tbl`(in max_num int(10)) BEGIN declare i int default 0; set aut ...
分类:
数据库 时间:
2020-08-09 14:25:01
阅读次数:
106
rootview.h #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface RootViewController : UIViewController @end rootview.m #import "RootViewControlle ...
分类:
其他好文 时间:
2020-08-08 21:24:32
阅读次数:
87
点击查看代码块 /* 找字典序最小的欧拉路,也可以做欧拉回路 */ #include <bits/stdc++.h> #define ed end() #define bg begin() #define mp make_pair #define pb push_back #define v(T) ...
分类:
其他好文 时间:
2020-08-07 12:35:13
阅读次数:
76
function toAge($idCard){ if(empty($idCard)) return ''; //获取当前年份; $now_year = substr(date('Y-m-d'),0,4); //获取当前年份月份; $now_month = substr(date('m'),0,1) ...
分类:
其他好文 时间:
2020-08-05 18:12:07
阅读次数:
108
#!/bin/bash # # # 自动创建 Docker TLS 证书 # # 以下是配置信息 # --[BEGIN] CODE="docker" IP="192.168.31.199" PASSWORD="123456" COUNTRY="CN" STATE="HUNAN" CITY="CHAN ...
分类:
其他好文 时间:
2020-08-05 13:10:53
阅读次数:
81
There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w. Now given all the cities and flights, toget ...
分类:
其他好文 时间:
2020-08-05 10:29:42
阅读次数:
73
private void UpgradeFont(object o) { if (CheckUpdate()) { dt = DateTime.Now; if (string.IsNullOrEmpty(FilePath) || !File.Exists(FilePath)) { ShowTip(" ...
分类:
其他好文 时间:
2020-08-01 21:21:41
阅读次数:
77
function timediff ($begin_time,$end_time) { var $starttime = '' var $endtime = '' if ($begin_time < $end_time) { $starttime = $begin_time; $endtime = ...
分类:
Web程序 时间:
2020-07-30 19:44:34
阅读次数:
110