poj 1270 Following Orders
摘要:
// 给出一个字母表和一些字母对(c1,c2)表示c1<c2// 求出所有满足要求的排列,并按照字典序输出#include<iostream> //拓扑排序 + dfs#include<algorithm>#include<string>using namespace std;int dict[30],edge[30][30],vis[30],rear,path[30],in[30];void topo_sort(int pos){ if(pos==rear) { for(int i=0;i<rear;++i) cout<<char( 阅读全文
posted @ 2011-07-22 22:29 sysu_mjc 阅读(183) 评论(0) 推荐(0)
浙公网安备 33010602011771号