1270 -- Following Orders This problem involves neither Zorn's Lemma nor fix-point semantics, but does...

Please Visit: http://ift.tt/1ajReyV



1270 -- Following Orders

This problem involves neither Zorn's Lemma nor fix-point semantics, but does involve order.

Given a list of variable constraints of the form x < y, you are to write a program that prints all orderings of the variables that are consistent with the constraints.

For example, given the constraints x < y and x < z there are two orderings of the variables x, y, and z that are consistent with these constraints: x y z and x z y.

InputThe input consists of a sequence of constraint specifications. A specification consists of two lines: a list of variables on one line followed by a list of contraints on the next line. A constraint is given by a pair of variables, where x y indicates that x < y.

http://poj.org/problem?id=1270

http://massivealgorithms.blogspot.com/2014/09/1270-following-orders.html



1270 -- Following Orders







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com https://plus.google.com/101157854606139706613/posts/2rqaT97SdjE

via LifeLong Community

No comments:

Post a Comment