Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Katu Puzzle
Description Katu Puzzle is presented as a directed graph X (0 ≤ _{i}X≤ 1) such that for each edge _{i }e(a, b) labeled by op and c, the following formula holds: op X = _{b}cThe calculating rules are:
Given a Katu Puzzle, your task is to determine whether it is solvable. Input The first line contains two integers Output Output a line containing "YES" or "NO". Sample Input 4 4 0 1 1 AND 1 2 1 OR 3 2 0 AND 3 0 0 XOR Sample Output YES Hint X_{0} = 1, X_{1} = 1, X_{2} = 0, X_{3} = 1.Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator