五四三原則意思就是網路上最多只能有﹕     5個網段(segment)。所謂segment就在物理連接上最接近的一組電腦,在一個BNC網段裡面最多只能接30台電腦,且網線總長不能超過185m。            4個增益器(repeater)。也就是將信號放大的裝置。 
543
转载 精选 2012-12-15 08:53:00
484阅读
As the DBA, you run the following query on your ASM instance.What is the implication of the results of the query? (Choose two.)SQL> select group_numbe
转载 2017-11-08 13:49:00
28阅读
2评论
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNode left; * public TreeNode right; * public TreeNode(int x) { val = x; } * }
转载 2017-04-19 11:32:00
25阅读
A题 题意比较难懂,其实就是查一下他给的k个哪些不是学校的最大值 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pll; const int N=1e5+10; str
转载 2020-12-17 22:40:00
50阅读
2评论
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a bin
原创 2022-08-03 15:47:40
14阅读
思路: 一开始以为求最大深度,求下去提交发现错误。 求的是直径,意思是找到最长的一串连接的节点。但和最最大深度的方法类似,我们任然需要求出左右子树的深度,只是多了一个变量res用来存储直径长度。 对于每一个节点的最大深度,我们会求他的左右子树的深度,然后左右子树相加和res变量比较,如果大就更新re ...
转载 2021-04-24 16:28:00
55阅读
2评论
    决定以后多做一些TC,即使做不了比赛,也要多做一些TC上的题,顺便写一些结题报告什么的。不过像我这种在Div2混的弱菜,也写不出什么高质量的结题报告,而且1000pt的题,我基本都不用看了,尽量把250和500的题写一下,1000的题目,能做出来的话就写一下。 250: 题意:给一个字符串,由‘C’和‘V’组成,一个人只能从‘C’到‘V’,或者从‘V’到‘C’,且可以从任意一个‘C’到达另
转载 2012-05-20 10:41:00
99阅读
2评论
543. Diameter of Binary Tree* https://leetcode.com/problems/diameter-of-binary-tree/
原创 2022-05-30 10:35:29
74阅读
The diameter of a binary tree is the length of the longest path be...
ide
转载 2020-11-16 11:44:00
130阅读
2评论
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe
转载 2020-07-20 10:45:00
189阅读
2评论
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe
转载 2019-06-19 18:50:00
71阅读
2评论
我们考虑可并堆维护,从深到浅贪心选取。 用priority_queue启发式合并的话,是60pts: #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<queue> #incl
原创 2021-07-16 14:00:22
89阅读
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe
转载 2019-05-20 01:39:00
55阅读
2评论
本题: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath between any two nodes in a tree. This path ma
原创 2023-03-07 12:59:52
96阅读
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe
转载 2019-09-03 23:08:00
70阅读
Description "题面" Solution 分块套分块,分别对时间和位置进行分块 差不多是一个定期保存信息的方法 对于询问我们不妨求出 $ =x$ 的答案,然后用 $m ( =x)$ 的答案,避免了严格小于带来的麻烦 暴力做法是把数字从大到小加入,然后每一次做区间修改,主席树维护一下,但空间
转载 2018-07-15 11:37:00
109阅读
2评论
int dfs(root): the max. length of one of substree.i.e. dfs(root): if(root == null) return 0 left += dfs(root->left) right += dfs(root->right) res = max(res, left + right + 1)...
原创 2023-08-23 09:15:19
48阅读
直接枚举公共路径。。。。。注意细节(i->j,j->i)。。
转载 2016-10-08 09:39:00
54阅读
2评论
Road ImprovementTime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:543D64-bit integer IO format:%I64d Java ...
转载 2015-07-21 10:33:00
78阅读
2评论
[1] 关于cv2.imread()读取图像为BGR问题 [2] OpenCV笔记02:用cv2.imread函数读取图片 cv2.imread在不加第二个参数的情况下默认将图片转换成了一个三维数组,最里面的一维代表的是一个像素的三个通道的灰度值,第二个维度代表的是第一行所有像素的灰度值,第三个维度 ...
转载 2021-08-12 15:19:00
2932阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5