图论
文章平均质量分 73
utoppia
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
sgu 122 The book
题目描述:122. The booktime limit per test: 0.5 sec. memory limit per test: 4096 KBThere is a group of N (2<=N<=1000) people which are numbered 1 through N, and everyone of them has not les原创 2012-10-31 21:17:33 · 682 阅读 · 0 评论 -
sgu 101 Domino
题目描述: 101. Domino time limit per test: 0.5 sec.原创 2012-10-23 19:15:29 · 866 阅读 · 0 评论 -
sgu 103 Traffic Lights
题目描述:103. Traffic LightsTime limit per test: 0.5 second(s)Memory limit: 4096 kilobytesinput: standardoutput: standardIn the city of Dingilville the traffic is arranged in an un原创 2012-10-23 21:02:38 · 948 阅读 · 0 评论 -
sgu 172 eXam
172. eXamtime limit per test: 0.5 sec.memory limit per test: 4096 KBinput: standardoutput: standardIn Russia school pupils must do some exams before leaving school. Among others, t原创 2012-11-06 17:29:24 · 561 阅读 · 0 评论 -
sgu 194 Reactor Cooling
194. Reactor Coolingtime limit per test: 1 sec.memory limit per test: 65536 KBinput: standardoutput: standardThe terrorist group leaded by a well known international terrorist Ben原创 2012-11-10 11:01:48 · 547 阅读 · 0 评论 -
最大权闭合图 zoj2930
#include#include#include#include#includeusing namespace std;int const nMax = 310;int const oo = 0x7fffffff;int first[nMax],now[nMax],f[nMax*nMax],to[nMax*nMax],nxt[nMax*nMax];int n,m,e;in原创 2013-03-26 22:46:16 · 629 阅读 · 0 评论 -
极大强联通图Tarjan hdu3594
hdu3594典型的Tarjan 算法,代码如下:#include#include#includeusing namespace std;int const nMax = 20010;int const maxm = 50010*2;int first[nMax],to[maxm],nxt[maxm],dfn[nMax],low[nMax],vis[nMax];int n,原创 2013-03-27 00:07:49 · 708 阅读 · 0 评论 -
POJ 3710 Christmas Game
POJ 3710 Christmas Game图的删边游戏:由于这个图比较特殊,我们推出如果环是奇环,则相当于加一条边,偶数环就相当于删除环,变成一个点。不会缩环的默默YY了一个多小时才勉强搞定。#include#include#include#include#include#include#include#include#includeusing na原创 2013-08-19 15:02:34 · 697 阅读 · 0 评论 -
Ural 1210
最短路神马的最有意思。。。/************************************************************************* > File Name: 1210.cpp > Author: utoppia > Mail: utoppia@163.com > Created Time: 2013/12/20 9:原创 2013-12-20 09:32:27 · 799 阅读 · 0 评论 -
模板,无向图强连通缩点,tarjan
int first[nMax],nxt[nMax],to[nMax],e;void addadge(int u,int v) { to[e]=v;nxt[e]=first[u];first[u]=e;e++; to[e]=u;nxt[e]=first[v];first[v]=e;e++;}int low[nMax],dfn[nMax],dep,belong[nMax],vis原创 2014-04-17 16:48:45 · 2708 阅读 · 1 评论
分享