235D Graph Game】的更多相关文章

传送门 题目大意 https://www.luogu.org/problemnew/show/CF235D 分析 我们先考虑它是树的情况 我们设$event(x,y)$表示删除点x是y与x联通这件事对答案贡献的期望 我们设x到y这一条链的长度为$len$,$x$和$y$所属联通块的大小为$n$ 则我们可以猜测$event$的值为$\frac{1}{len}$ 我们可以用数学归纳法证明 我们知道直接选到$x$的概率为$\frac{1}{n}$ 先选到其它点再通过若干步选到x的概率为$\frac{n…
最近做了好多CF的题的说,很多cf的题都很有启发性觉得很有必要总结一下,再加上上次写题解因为太简单被老师骂了,所以这次决定总结一下,也发表一下停课一星期的感想= = Codeforces 261E Maxim and Calculator 描述:有两个变量a和b,初始值为1和0,每次有两种操作,一个是a=a*b,另一个是b++,求有多少个l<a<r能在p步内达到(p<=100,r<1e9) 首先观察到p最大为100,也就是说最大质因数小于p,打表可得一共大概只有300万个数 考虑d…
TimeWall is a graph databases github It be used to apply mathematic model and social network with graph algorithms and so on... Features: 1. C/S structure 2. compute in memory 3. dynamic add and remove nodes on the graph db 4. with lots of algorithms…
Source: Connected Brain Figure above: Bullmore E, Sporns O. Complex brain networks: graph theoretical analysis of structural and functional systems.[J]. Nature Reviews Neuroscience, 2009, 10(3):186-198. Graph measures A graph G consisting of a set of…
Destroying The Graph Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8198   Accepted: 2635   Special Judge Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that B…
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected components in an undirected graph. Example 1: 0          3 |          | 1 --- 2    4 Given n = 5 and…
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make up a valid tree. For example: Given n = 5 and edges = [[0, 1], [0, 2], [0, 3], [1, 4]], return tru…
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separator for each node, and , as a separator for node label and each neigh…
Influence maximization on big social graph Fanju PPT链接: social influence booming of online social network 一, Application:viral marketing 1, identify influence customers: seeds. 2, convince them to adopter product. other application: Rumor monitoring…
关于zabbix的API见,zabbixAPI 1item批量添加 我是根据我这边的具体情况来做的,本来想在模板里面添加item,但是看了看API不支持,只是支持在host里面添加,所以我先在一个host里面添加,然后在将item全部移动到模板里. 具体步骤就不说了,直接上代码: 为了快速完成,代码写的有点乱,也没怎么处理异常,算是第一版吧,有时间在优化  1 #!/usr/bin/env python #-*- coding: utf- -*- import json import sys i…