感觉有一些地方没有梳理通,需要重新考虑一遍。 一开始的建图,是没有问题的。 对于任意三元组 \((x,y,z)\),若满足 \(x<y<z\) 且 \(a_x<a_y\) 且 \(a_x>a_z\),那么 \(x,y\) 之间便有一条之间相连的边。 关键在于我后面的使用非常的 Naive,才导致 W ...
分类:
编程语言 时间:
2020-12-19 12:08:28
阅读次数:
2
1、显示统计占用系统内存最多的进程,并排序。ps-eopid,ppid,cmd,%mem--sort=-%mem2、编写脚本,使用for和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail!"#for循环版本1#!/bin/bashNET=192.168.0fo
分类:
系统相关 时间:
2020-12-18 13:10:27
阅读次数:
4
Select用法 Go里面提供了一个关键字select,通过select可以监听channel上的数据流动。 select的用法与switch语言非常类似,由select开始一个新的选择块,每个选择条件由case语句来描述。 与switch语句相比, select有比较多的限制,其中最大的一条限制就 ...
分类:
其他好文 时间:
2020-12-18 12:55:43
阅读次数:
3
目录 一、概述 二、遍历循环 三、遍历循环的应用 3.1 计数循环(N次) 3.2 计数循环(特定次) 3.3 字符串遍历循环 3.4 列表遍历循环 3.5 文件遍历循环 四、无限循环 五、循环控制保留字 5.1 break 和 continue 5.1.1 for 5.1.2 while 六、循环 ...
分类:
其他好文 时间:
2020-12-18 12:54:10
阅读次数:
3
//获取某元素后相邻的所有class名为MsoToc2的兄弟元素nextAll(node){ let that = this, nextNode = that.next(node), nodeArray = []; while(nextNode != null && that.hasClass(ne ...
分类:
Web程序 时间:
2020-12-18 12:49:19
阅读次数:
2
【问题】mysql从5.6升级到5.7后出现:插入数据和修改数据时出错Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: The error occurred while applying a parameter map. ...
分类:
数据库 时间:
2020-12-18 12:26:29
阅读次数:
2
//二分查找法 class Solution { public int minArray(int[] numbers) { //定义左、右边界 int left = 0; int right = numbers.length - 1; while(left < right){ //中间的元素 int ...
分类:
编程语言 时间:
2020-12-18 12:13:52
阅读次数:
2
文字叙述就省略: while是当条件为真时执行循环,下面是循环5次 #include<stdio.h> void main(){ int i=1; //定义一个整形,并给这个变量赋初值为1 while(i<=5){ //循环5次,并打印5个你好 printf("你好\n"); i++; } } ...
分类:
编程语言 时间:
2020-12-18 12:12:08
阅读次数:
2
//暴力法 时间复杂度 O(m * n) //根据排序的规律观察,得到类似2叉搜索树的解法 O(m + n) class Solution { public boolean findNumberIn2DArray(int[][] matrix, int target) { //判空 if(matri ...
分类:
编程语言 时间:
2020-12-17 12:41:42
阅读次数:
1
cc.Class({ extends: cc.Component, properties: { //speed accl:0, player:{ default:null, type:cc.Node }//}, }, // LIFE-CYCLE CALLBACKS: SetInputControl: ...
分类:
移动开发 时间:
2020-12-17 12:30:51
阅读次数:
3