随笔分类 - 图论
因为是蒟蒻所以负重前行
摘要:题意:有A>B A=B A<B 三种情况,是否能通过多次判断出各自排名 Sample Input 3 3 0 > 1 1 < 2 0 > 2 4 4 1 = 2 1 > 3 2 > 0 0 > 1 3 3 1 > 0 1 > 2 2 < 1 Sample Output OK CONFLICT UNC
阅读全文
摘要:以下是最小生成树+并查集 【HDU】 1213 How Many Tables 基础并查集★ 1272 小希的迷宫 基础并查集★ 1325&&poj1308 Is It A Tree? 基础并查集★ 1856 More is better 基础并查集★ 1102 Constructing Roads
阅读全文
摘要:杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线, 这个路线从A点出发并且最后回到A点,假设经过的路线为V1,V2,....VK,V1,那么必须满足K>2, 就是说至除了出发点以外至少要经过2个其他不同的景区,而且不能重复经过同一个景区。现在8600需要你帮他找一条这样的路
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstring> #include<vector> #include<map> #include<cmath> #include<cstdio> #include<queue> typedef long
阅读全文
摘要:图论 (菜的扣jio 啥也不会) 题目分析: A 签到题 注意向上取整 题面 sy总是喜欢做一些非常没有意义的事情,比如和Mannix比赛短跑。 众所周知Mannix是短跑冠军,所以他准备先让sy跑一会儿,但是此时会发生一些比较尴尬的事情,比如装B失败输掉了比赛。sy想知道Mannix装多大的B才能
阅读全文
摘要:等我研究出来链式前向星的写法再回来更新,先贴看了其他博客的 (棋盘的长宽 为集合A 和 集合B) 为保证 车不相互打架 集合AB二分匹配 删除其中一条边 如果与标准的结果相同 则不是重要边,反之sum++; #include<iostream> #include<algorithm> #includ
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstring> #include<vector> #include<map> #include<cmath> #include<cstdio> #include<queue> typedef long
阅读全文
摘要:#include<algorithm> #include<cstring> #include<vector> #include<map> #include<cmath> #include<cstdio> #include<queue> #include<iostream> typedef long
阅读全文
摘要:题面: 自1945年以来,当美国的曼哈顿项目小组引爆了第一颗核弹时,全球的核武器数量急剧增加。如今,FZU的一个名叫AekdyCoin的疯狂男孩拥有核武器,想要毁灭我们的世界。幸运的是,我们神秘的间谍网络已经得到了他的计划。现在,我们需要阻止它。但这项艰巨的任务显然并不容易。首先,我们知道,核武器的
阅读全文
摘要:删除正向不好处理,转为逆向,从最后一个删除的点开始插入 Greg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge betwe
阅读全文

浙公网安备 33010602011771号