摘要:
由于实在不想拆点,写了个这样的代码: 不过很可惜,这份代码是过不去的,具体原因我还没有找到。 只好乖乖拆点了... 阅读全文
posted @ 2015-08-05 19:53
hxy_has_been_used
阅读(197)
评论(0)
推荐(0)
摘要:
很久以前做过的题,那个时候不知道为什么总是RE,现在没什么问题了,不过题目还是挺坑的,套了个实际的背景我还以为是有向边+起点终点不相同,实际上是无向边+起点终点可以相同... 1 #include 2 #include 3 #include 4 #include 5 #includ... 阅读全文
posted @ 2015-08-05 19:30
hxy_has_been_used
阅读(148)
评论(0)
推荐(0)
摘要:
题意和方法都很简单,只是需要注意的地方很多,例如加边时起点终点可能在一个集合内,还有既冲突也不全的情况优先判断冲突。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const in... 阅读全文
posted @ 2015-08-05 17:05
hxy_has_been_used
阅读(562)
评论(0)
推荐(0)
摘要:
简单的拓扑排序,要求字典序最小的话用优先队列来维护入度为0的点即可。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int N = 501; 8 const int M = 1000... 阅读全文
posted @ 2015-08-05 14:49
hxy_has_been_used
阅读(132)
评论(0)
推荐(0)

浙公网安备 33010602011771号