POJ 1094 Sorting It All Out
来源:互联网 发布:淘宝客服经典对话 编辑:程序博客网 时间:2024/05/15 16:41
POJ1094-Sorting It All Out
原题地址
参考链接 poj1094 zhengnanlee
这题做的真是心碎,做了好几个小时就是不知道哪里错了。后来上网查了一下,发现这题的判断顺序和我想象中的不一样。。。。
我以为是先从头到尾先判断是否有矛盾完了之后再来拓扑排序。结果这道题目是每读入一个数据就进行判断:
- 到目前为止的输入是否构成矛盾
- 到目前为止的输入是否可以推断出变量的大小顺序
若读完了所有数据,1、2都不成立就输出“Inconsistency found after xxx relations. ”
并且拓扑排序我也是敲得不太好,代码变得非常难看,写起来用掉的时间也太多了。
就不贴代码了。
0 0
- poj 1094 Sorting It All Out
- poj 1094 Sorting It All Out
- poj 1094 Sorting It All Out
- [POJ] 1094 Sorting It All Out
- POJ-1094 Sorting It All Out
- POJ-1094-Sorting It All Out
- POJ 1094 Sorting It All Out
- POJ 1094 Sorting It All Out
- POJ 1094 Sorting It All Out
- poj-1094-Sorting It All Out
- POJ 1094 Sorting It All Out
- poj 1094 Sorting It All Out
- POJ 1094 Sorting It All Out
- POJ-1094-Sorting It All Out
- poj 1094 Sorting It All Out
- poj 1094 Sorting It All Out(图论)
- poj 1094 Sorting It All Out
- POJ 1094 Sorting It All Out
- 给程序员新人的一封信
- MySQL 中的自定义函数和存储过程 简单实例
- [leetcode] Construct Binary Tree from Preorder and Inorder Traversal
- linux驱动中的链表操作
- wxPython源码编译和安装
- POJ 1094 Sorting It All Out
- 页面的缓存与不缓存设置
- 如何让一个div跟随鼠标移动
- Administrator privileges required for OLE Remote Procedure Call debugging: this feature will not wo
- Oracle 数据泵使用详解
- hdu 4412 DP
- #pragma clang diagnostic
- HDUOJ贪心算法Repair the wall
- Oracle 格式化数字