DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes t...
分类:
其他好文 时间:
2015-08-11 09:48:31
阅读次数:
127
题意:有n个点在一个圆上,标号0~n-1,有m条线段告诉两个端点的标号,每条线段可以在画在圆内也可以画在圆外,问这m条线段能否不向交。
思路:2-SAT模板题,把每条线段当做节点,每条线有两种状态(圆内和圆外,两者只能取其一),建图后求强连通,看 i 和 i‘ 是否在同一个连通分量,若在则无解,否则有解。
参考:由对称性解2-SAT问题 还有 kuangbin神牛的总结点击打开链接...
分类:
其他好文 时间:
2015-08-10 14:55:58
阅读次数:
149
DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes t...
分类:
其他好文 时间:
2015-08-09 20:33:06
阅读次数:
105
D -DTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uDescriptionHere is a famous story in Chinese history."That was about 2300 years ...
分类:
其他好文 时间:
2015-08-09 20:27:54
阅读次数:
138
//给一个有向图,每个点都有权值(可能有负权),从任意起点遍历一遍这个图,
//走每一点都可以选择得到和不得到这个权值,问最多能得到多少权值
//先用tarjan进行缩点,得到一个森林,从这个森林的每棵树的根节点开始
//dfs搜一遍得到最大的一条路
#include
#include
#include
#include
usin...
分类:
其他好文 时间:
2015-08-09 17:11:33
阅读次数:
88
描述
Here is a famous story in Chinese history.
"That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others."
"Bo...
分类:
其他好文 时间:
2015-08-09 00:27:18
阅读次数:
128
给一棵点带权的图有这样一个操作:使树上某一条路径所有点权值增减每次询问某个点现在的权值。树链剖分完以后,就是线段树的成段更新了。这题感觉A不了了,无限RE,手动开栈也没卵用。还是把我辛辛苦苦写的代码贴一下吧。 1 #include 2 #include 3 #include 4 #in...
分类:
其他好文 时间:
2015-08-06 14:47:52
阅读次数:
139
Avoid The LakesTime Limit:1000MSMemory Limit:65536KTotal Submissions:7023Accepted:3735DescriptionFarmer John's farm was flooded in the most recent sto...
分类:
其他好文 时间:
2015-08-05 20:10:36
阅读次数:
134
_references.js背后的故事 _references.js是在VS的WEB项目中,提供智能提示的关键技术。 在VS2010发布之后,作者还是ASP.NET小组成员时,小组想把js编辑器的功能迁移到一个新的“客户端平台小组”。这个小组将要为...
分类:
Web程序 时间:
2015-08-04 17:31:14
阅读次数:
224
1 var taskId; 2 var __sto = setInterval; 3 window.setInterval = function(callback,timeout,param){ 4 var args = Array.prototype...
分类:
其他好文 时间:
2015-08-03 20:54:02
阅读次数:
112