"luogu" 下面令$n,q$同阶 先考虑暴力做法,询问是要对两个位置集合,选两个元素出来,求最小的差的绝对值.因为对于一个元素,一定选另一个集合中和他位置最近的前后两个元素最优,所以暴力是让集合为升序排列,再维护两个指针,一开始指向集合第一个元素,这同时维护之前扫过的元素中两个集合的最后一个元素 ...
分类:
其他好文 时间:
2020-02-13 21:02:55
阅读次数:
72
一、mongoose 介绍 Mongoose 是在 node.js 异步环境下对 mongodb 进行便捷操作的对象模型工具。Mongoose 是 NodeJS 的驱动,不能作为其他语言的驱动。 Mongoose 有两个特点 1、通过关系型数据库的思想来设计非关系型数据库 2、基于 mongodb ...
分类:
其他好文 时间:
2020-02-13 17:17:01
阅读次数:
85
import xml.etree.ElementTree as ET data=ET.parse('xml_lesson') root=data.getroot() for i in root: for j in i: print(j.tag) for i in root: print(i.attr ...
分类:
编程语言 时间:
2020-02-13 17:11:09
阅读次数:
74
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th ...
分类:
其他好文 时间:
2020-02-13 13:22:48
阅读次数:
67
python数据类型 字符串 一、 字符串的表示方法(str) 作用: 记录文本信息 表示方法:‘ ’ 单引号 “ ”双引号 ‘’‘ ’‘’三单引号 “”“ ”“”三双引号 说明: 1. 单引号可以嵌套双引号 2. 双引号可以嵌套单引号 3. 三单/双引号可以包含单/双引号,换行直接回车自动换行不需 ...
分类:
编程语言 时间:
2020-02-12 22:14:15
阅读次数:
106
Write a SQL query to find all duplicate emails in a table named Person. + + + | Id | Email | + + + | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | + + ...
分类:
其他好文 时间:
2020-02-12 16:35:55
阅读次数:
61
题目一 代码实现 1 package class_03; 2 3 public class Code_07_ReverseList { 4 5 public static class Node { 6 public int value; 7 public Node next; 8 9 public ...
分类:
编程语言 时间:
2020-02-12 13:16:11
阅读次数:
70
并查集是一种用来管理元素分组情况的数据结构,可以高效的执行下面的操作: 1.查寻(find):查询元素a和b是否属于同一分组; 2.合并(union):将两个不同的分组合并为一个分组。 注意并查集虽然可以进行合并操作,但是却无法进行分割操作。 并查集的结构 并查集使用树形结构实现,整个并查集由一颗或 ...
分类:
其他好文 时间:
2020-02-12 13:06:08
阅读次数:
63
(1\\d{10})分组 m.find();查找 m.group();获取分组内容 ...
分类:
其他好文 时间:
2020-02-12 12:52:55
阅读次数:
38
https://cuiqingcai.com/5445.html 安装 nginx 找到配置文件 find / -name nginx.conf 修改 http { server { listen 6801; location / { proxy_pass http://127.0.0.1:6800 ...
分类:
其他好文 时间:
2020-02-12 11:08:58
阅读次数:
210