重新做了一下这道并查集的题目,关键要点是抓住这种循环的关系和模运算的通性,进而利用加权并查集 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> using namespace std; cons ...
分类:
其他好文 时间:
2020-07-15 23:39:09
阅读次数:
63
论文链接:https://arxiv.org/pdf/1701.08546.pdf 先上个大图吸引眼球 关于model generation:Assisted generation:In most of the cases domain knowledge is partially availabl ...
分类:
其他好文 时间:
2020-07-15 23:01:06
阅读次数:
71
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
在使用YOLO v5进行自己数据集的训练的时候(python3 train.py),报了如下的错误: Traceback (most recent call last): File "train.py", line 402, in <module> tb_writer = SummaryWriter ...
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
//线程池创建,线程池提交任务使用Callable int corePoolSize = 3; int maximumPoolSize = Runtime.getRuntime().availableProcessors() * 2; BlockingQueue<Runnable> queue = ...
分类:
编程语言 时间:
2020-07-14 16:20:51
阅读次数:
63
给定一个范围在 1 ≤ a[i] ≤ n ( n = 数组大小 ) 的 整型数组,数组中的元素一些出现了两次,另一些只出现一次。 找到所有在 [1, n] 范围之间没有出现在数组中的数字。 您能在不使用额外空间且时间复杂度为O(n)的情况下完成这个任务吗? 你可以假定返回的数组不算在额外空间内。 示 ...
分类:
编程语言 时间:
2020-07-14 00:33:56
阅读次数:
60
Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). 找最长连续上升子序列 class Solution(object): def f ...
分类:
其他好文 时间:
2020-07-14 00:26:48
阅读次数:
59
字符串相关函数 *capitalize 字符串首字母大写 *title 每个单词的首字母大写 *upper 将所有字母变成大写 *lower 将所有字母变成小写 *swapcase 大小写互换 *len 计算字符串的长度 *count 统计字符串中某个元素的数量 *find 查找某个字符串第一次出现 ...
分类:
其他好文 时间:
2020-07-14 00:26:15
阅读次数:
67