#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
列一下hdu,poj,CF上常见的Stirling数相关的习题(补充完善中): hdu2643 hdu3625 hdu4372 hdu4045 POJ1430 POJ2621 CF932E CF961G CF960G ...
分类:
其他好文 时间:
2020-07-12 16:52:18
阅读次数:
64
##题面 Problem Description Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x ...
分类:
其他好文 时间:
2020-07-12 16:40:31
阅读次数:
59
https://ac.nowcoder.com/acm/contest/6046/C 二维线段树+区间异或+区间求和 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 usi ...
分类:
其他好文 时间:
2020-07-12 12:31:15
阅读次数:
68