码迷,mamicode.com
首页 >  
搜索关键字:topsort    ( 74个结果
POJ - 3249 Test for Job (DAG+topsort)
Description Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job, since there are swelling numbers of the...
分类:其他好文   时间:2014-07-27 23:57:39    阅读次数:630
topsort
#include #include #include using namespace std;#define N 505int ma[N][N],ans[N],indegree[N];int main(){ int i,j,n,m; while(~scanf("%d %d",&n,&m)...
分类:其他好文   时间:2014-07-22 22:44:52    阅读次数:141
hdu 1285 确定比赛名次
Problem Description有N个比赛队(1#include#includeint indegree[505],map[505][505];//indegree记录每个节点的入度和。map记录那些边是相关联的int tp[505],k;//记录拓扑序列。void topsort(int n...
分类:其他好文   时间:2014-07-17 21:35:58    阅读次数:219
ZOJ 3780 Paint the Grid Again(topsort)
ZOJ Problem Set - 3780 Paint the Grid Again Time Limit: 2 Seconds      Memory Limit: 65536 KB Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black ...
分类:其他好文   时间:2014-05-09 02:00:35    阅读次数:506
74条   上一页 1 ... 6 7 8
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!