2013年10月11日

Following Orders

摘要: uva124:http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=60题意: 第一行给出字符串(小写字母),表示出现的字符类型第二行是约束关系,a1 b1 a2 b2 a3 b3.....ai bi,表示ai必须在bi前面按照字典序输出所有满足约束条件的序列题解:题解:由题意会想到用拓扑排序,但是题目要求是字典序输出,所以可以用dfs来处理。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #inclu 阅读全文

posted @ 2013-10-11 18:04 天依蓝 阅读(266) 评论(0) 推荐(0) 编辑

导航