Road 题目: JSZKC is the king of his kingdom. His kingdom has N cities, numbered from 0 to N?1. And the cities are connected by some roads which means yo ...
分类:
其他好文 时间:
2019-04-20 00:13:58
阅读次数:
149
There are nn cities and mm roads in Berland. Each road connects a pair of cities. The roads in Berland are one-way. What is the minimum number of new ...
题意 Language:DefaultMaking the Grade Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11192Accepted: 5201DescriptionA straight dirt road connec ...
分类:
其他好文 时间:
2019-04-07 12:45:10
阅读次数:
103
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=2750 [算法] 考虑计算每个点对每条边的贡献 对于每个点首先运行SPFA或Dijkstra单源最短路 , 建出以该点为根的最短路树(图) 由于最短路图是一个DAG(有向无环图) , 我 ...
分类:
其他好文 时间:
2019-03-15 23:03:34
阅读次数:
207
In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to s ...
分类:
其他好文 时间:
2019-01-31 00:09:11
阅读次数:
148
HYSBZ - 4991 题意: 第一列 1-n的排列 ,第二列 1-n的排列。 相同数字连边 ,问 有多少组 数字 是有交点的并且 绝对值之差>K思路:处理一下 1-n 在第一列的位置,1-n在第二列的位置。按照第一列的位置从小到大排序,然后 进行cdq分治,因为现在第一列已经是递增序列了,如果在 ...
分类:
其他好文 时间:
2019-01-13 01:48:23
阅读次数:
236
比如时间为 “2014-12-11 13:12:01”修改为“2014-09-26 13:12::01”修改内容为修改yyyy-mm-dd为对应的日期,时间不变。UPDATE result_road_saturationSET BEGIN_TIME = ADDTIME( date('2014-09- ...
分类:
数据库 时间:
2018-11-29 12:39:08
阅读次数:
370
我也不知道该写啥。。。记录一下自己的刷题记录吧。。。 首先做了 "[Usaco2017 Feb]Why Did the Cow Cross the Road II (Platinum)" ,这个系列就差这一题了,得把这题切了。。。优化二维dp吧,由于线段端点权值差的绝对值不超过4,直接枚举,然后把二 ...
分类:
其他好文 时间:
2018-11-12 21:19:59
阅读次数:
212
Conditionals Conditional expressions allow your programs to make decisions and take different forks in the road,depending on the value of variables or ...
分类:
其他好文 时间:
2018-11-08 01:16:50
阅读次数:
173
题目大意:给定一个无根树,给每条边黑白染色,求出每个点为根时,其他点到根的路径上至多有一条黑边的染色方案数,模$1e9+7$。 题解:树形$DP$不难想到,记$f_u$为以$1$为根时,以$u$为根的子树的方案数,$f_u=\prod\limits_{v\in son_u}(f_v+1)$ 换根也很 ...
分类:
其他好文 时间:
2018-11-04 15:45:02
阅读次数:
179