图论
文章平均质量分 81
Flintx
鲜衣怒马少年时
展开
-
CodeForces 510B Fox And Two Dots(图论-回路判定)
Description Fox Ciel is playing a mobile puzzle game called “Two Dots”. The basic levels are played on a board of size n × m cells, like this:Each cell contains a dot that has some color. We will use原创 2015-03-04 11:30:51 · 788 阅读 · 0 评论 -
CodeForces 25C Roads in Berland(图论-最短路径)
Description There are n cities numbered from 1 to n in Berland. Some of them are connected by two-way roads. Each road has its own length — an integer number from 1 to 1000. It is known that from each原创 2015-03-02 22:47:46 · 868 阅读 · 0 评论 -
codeforces 24A Ring road
今天写个题解。 一个图论的水题,当然,对我来说简直一筹莫展。 codeforces 24AA. Ring roadNowadays the one-way traffic is introduced all over the world in order to improve driving safety and reduce traffic jams. The government of Be原创 2015-03-01 17:13:32 · 823 阅读 · 0 评论 -
Gym 100342J & Gym 100345H (bitset在图论题的应用)
bitset bitset在某些常数优化以及状态保存方面被称之为神器并不为过,主要表现在以下几个方面: 1. 状态表示。试想,用一个数来表示状态的极限是64位,而bitset可以保存任意位二进制数,并且修改简单,统计方便,并且支持批量操作。 2. 常数优化。图论的题,尤其涉及不带权的邻接图,算法经常动辄 n2,n3n^2,n^3 ,这个时候我们可以用n个bitset存储每个点的邻接情原创 2015-08-30 23:24:26 · 1063 阅读 · 0 评论