常规并查集 模板 #define Maxsize 100+1 int f[Maxsize]; void init(int n){ for(int i = 1; i <= n; i++) f[i] = i; } int find_f(int a){ if(f[a] == a){ return a; } ...
分类:
其他好文 时间:
2020-07-16 11:58:56
阅读次数:
105
npm 指令 查看npm安装路径 npm config ls 全局安装包 npm install package -g 查看全局安装的模块 npm list --depth=0 -g Cannot find Module xxx 1.书写错误,往往是写错了模块的名称,而导致无法加载 2.未安装相关模 ...
分类:
其他好文 时间:
2020-07-16 10:13:44
阅读次数:
68
problem 1394. Find Lucky Integer in an Array solution #1: 使用哈希表; 使用哈希表记录数组元素和freq,然后判断是否相等,且取最大值; 注意 1. 最大值可以由下标一次递减隐性表示; 2. 数值的范围是1-500; 参考 1. leetco ...
分类:
其他好文 时间:
2020-07-16 00:22:19
阅读次数:
51
重新做了一下这道并查集的题目,关键要点是抓住这种循环的关系和模运算的通性,进而利用加权并查集 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> using namespace std; cons ...
分类:
其他好文 时间:
2020-07-15 23:39:09
阅读次数:
63
public void testConnection1() throws SQLException { // 获取Driver的实现类对象 Driver driver = new com.mysql.jdbc.Driver();// 第三方的api; String url = "jdbc:mysql ...
分类:
数据库 时间:
2020-07-15 16:02:46
阅读次数:
100
执行报错如下: 20/07/15 14:02:34 ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly. 20/07/ ...
分类:
数据库 时间:
2020-07-15 15:29:36
阅读次数:
88
springcloud 使用eureka无法注入DiscoveryClient,可能因为是导包错误 导包情况 导入正确的DiscoveryClient即可自动注入 参考帖子:Could not autowire. No beans of 'DiscoveryClient' type found. ...
分类:
编程语言 时间:
2020-07-15 15:18:46
阅读次数:
79
Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non ...
分类:
其他好文 时间:
2020-07-15 01:12:51
阅读次数:
60
Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte ...
分类:
其他好文 时间:
2020-07-15 01:00:03
阅读次数:
73
1、find 用于查找文件或者目录 find path options [commad] 【options】: -size 按文件大小查找 -empty 查找空白文件或目录 -name 按文件名称查找 -iname 按文件名称查找,不区分大小写 -user 按文件属性主查找 -group 按文件属组 ...
分类:
系统相关 时间:
2020-07-14 21:54:07
阅读次数:
103