2019.10.1 UOJ Easy Round #1 A:一开始就想偏了,从不等式角度来看,其实就是一个均值不等式。 B:字典树水题,记录一个指针指向真正的目录即可。 C:可撤销并查集+离线算法。 顺便学习了一下可持久化并查集,就是一个按秩合并的可持久化数组(用可持久化线段树实现即可)。 ...
分类:
其他好文 时间:
2019-10-01 20:54:39
阅读次数:
104
fasffasfa 108. Convert Sorted Array to Binary Search Tree Easy Easy Easy Given an array where elements are sorted in ascending order, convert it to a ...
分类:
其他好文 时间:
2019-10-01 18:54:01
阅读次数:
108
107. Binary Tree Level Order Traversal II Easy Easy Easy Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, fr ...
分类:
其他好文 时间:
2019-10-01 12:19:17
阅读次数:
104
正解:图论 解题报告: 传送门$QwQ$ 发现最大团不好求,于是考虑求最大独立集.也就把所有$gcd(i,j)\cdot gcd(i+1,j+1)=1$的点之间连边,然后求最大独立集. 发现依然不可做,不妨猜结论:这张图一定是张二分图. 其实猜到了证明还是挺$easy$的$QwQ$ 发现连边的点之间 ...
分类:
其他好文 时间:
2019-09-30 21:53:41
阅读次数:
101
Q1:anaconda没有pip3 首先移动到anaconda下面的文件夹Scripts中,在cmd下输入:cd C:\Users\10942\Anaconda3\Scripts 然后在执行如下指令:easy_install.exe pip Q2: OpenCV Python安装 pip3 inst ...
分类:
编程语言 时间:
2019-09-30 21:52:23
阅读次数:
70
# 时间## 时间和周数 ## 获取下周的时间范围 easy! ...
分类:
编程语言 时间:
2019-09-29 21:30:58
阅读次数:
203
104. Maximum Depth of Binary Tree Easy Easy Easy Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longe ...
分类:
其他好文 时间:
2019-09-29 15:39:53
阅读次数:
112
100. Same Tree Easy Easy Easy Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same ...
分类:
其他好文 时间:
2019-09-28 09:14:13
阅读次数:
93
LeetCode树模板 TreeNode 先序遍历 层序遍历 中序遍历 LeetCode 100 相同的树 这种递归形式几乎算是树的基本模板,三条件并列的尾递归。 LeetCode 101 对称二叉树 先序遍历一次左子树,交换先序遍历的左右子节点顺序遍历一次右子树,比较两次遍历得到的序列。 用不可能 ...
分类:
其他好文 时间:
2019-09-27 22:44:07
阅读次数:
121
The only difference between easy and hard versions is the number of elements in the array. You are given an array aa consisting of nn integers. In one ...
分类:
其他好文 时间:
2019-09-26 23:09:11
阅读次数:
63