题目链接:https://ac.nowcoder.com/acm/problem/19810 题意看了好久才明白什么意思_(:з」∠)_ 一开始以为只有最底部的节点需要传递信息,但其实是每个官员都要传递信息。 比如这个图,红色是国王,蓝色的三个是非重儿子的节点(还有其他节点没画),传递信息的时候,蓝 ...
分类:
其他好文 时间:
2020-07-17 13:38:51
阅读次数:
55
Tom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there are nn ...
分类:
其他好文 时间:
2020-07-17 09:30:42
阅读次数:
82
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a ...
分类:
其他好文 时间:
2020-07-17 01:14:23
阅读次数:
90
#J 数学/找规律 ##题意: 给定正n多边形,现在要你通过顶点连线的方式,将它划分完全划分成若干个三角形。我们定义两个三角形的距离为,两者相隔的完整的三角形数+1。 如下图,a与d的距离为3,a与c的距离为2 现在你要让所有两两三角形的距离中,最大距离的最小。求该最小值 (数据范围n为3-1e6) ...
分类:
其他好文 时间:
2020-07-16 21:37:57
阅读次数:
71
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:
其他好文 时间:
2020-07-16 10:11:53
阅读次数:
74
链接:https://leetcode-cn.com/problems/subsets-ii/ 代码 class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int>> subsetsWith ...
分类:
其他好文 时间:
2020-07-16 00:27:10
阅读次数:
75
Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. ...
分类:
其他好文 时间:
2020-07-15 23:20:22
阅读次数:
96
题:https://ac.nowcoder.com/acm/contest/5667/H 题意:给定空的容器multiset:MS,有q个操作,操作一为向MS中加入x,操作二为在MS删除x,操作三为询问在MS是否存在a,b与x能形成一个不退化的三角形。 分析:对于询问操作,有俩种情况,情况一是x作为 ...
分类:
移动开发 时间:
2020-07-15 15:46:43
阅读次数:
92
题:https://ac.nowcoder.com/acm/contest/5667/G 题意:给定n个数的数组A,m个数的数组B,问在A中有多少个子数组满足Si>=Bi 分析:我们可以考虑记录合法子数组以数组A中的一个位置代表一个合法子数组(因为长度固定为m); 设bitset 的ans和tmp, ...
分类:
其他好文 时间:
2020-07-14 16:42:37
阅读次数:
289
##题面 Problem Description Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our dai ...
分类:
其他好文 时间:
2020-07-12 17:05:48
阅读次数:
132