A clique is a complete graph, in which there is an edge between every pair of the vertices. Given a graph with N vertices and M edges, your task is to ...
分类:
其他好文 时间:
2018-11-01 18:27:19
阅读次数:
202
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp ...
分类:
其他好文 时间:
2018-10-31 23:22:07
阅读次数:
191
【问题描述】 1.从myslq(5.7.19-0ubuntu0.16.04.1)中导出sql脚本,导入到mysql(5.5.27)中,报如下错误:Row size too large. The maximum row size for the used table type, not countin ...
分类:
数据库 时间:
2018-10-29 19:58:25
阅读次数:
347
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segme ...
分类:
其他好文 时间:
2018-10-28 11:16:28
阅读次数:
135
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F ...
分类:
其他好文 时间:
2018-10-27 21:19:10
阅读次数:
178
Counting Stars http://acm.hdu.edu.cn/showproblem.php?pid=6184 题意:求这样图形的个数。 分析: 三元环计数。 两个三元环可以组成一个那样的图形。于是直接枚举一条边,然后求这条边所能构成的三元环。 三元环的求法和更优的做法。 代码: ...
分类:
其他好文 时间:
2018-10-27 17:10:36
阅读次数:
146
传送门 题意:给出一个$N$个点、$M$条边的无向连通图,求有多少组无序数对$(i,j)$满足:割掉第$i$条边与第$j$条边之后,图变为不连通。$N \leq 10^5 , M \leq 3 \times 10^5$ 竟然随机化,歪果仁的思想好灵活qwq肯定是数据结构做多了 看起来很像割边,考虑$ ...
分类:
其他好文 时间:
2018-10-27 00:01:13
阅读次数:
255
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=4397 [算法] 树状数组 时间复杂度 : O(QlogN) [代码] ...
分类:
其他好文 时间:
2018-10-25 00:09:25
阅读次数:
156
这道题开10倍左右一直MLE+RE,然后尝试着开了20倍就A了。。。窒息 对于这道题目,我们考虑使用线段树合并来做。 所谓线段树合并,就是把结构相同的线段树上的节点的信息合在一起,合并的方式比较类似左偏树什么的。 我们对于每个节点用权值线段树查询大于它的子节点数量,然后把当前节点并到它的父亲上面去。 ...
分类:
其他好文 时间:
2018-10-24 10:44:11
阅读次数:
209
Python的GC模块主要运用了“引用计数”(reference counting)来跟踪和回收垃圾。在引用计数的基础上,还可以通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用的问题。通过“分代回收”(generation collection)以空间换取时间来进一步 ...
分类:
编程语言 时间:
2018-10-14 19:03:14
阅读次数:
227