CF736D Permutations
Description
Ostap Bender is worried that people started to forget that he is the Great Combinator. Now he wants to show them his skills in combinatorics. Now he studies the permutations of length $ n $ . He has a list of $ m $ valid pairs, pair $ a_{i} $ and $ b_{i} $ means that he is allowed to place integers $ b_{i} $ at position $ a_{i} $ .
He knows that the number of permutations that use only valid pairs is odd. Now, for each pair he wants to find out, will the number of valid permutations be odd if he removes this pair (and only it) from the list.
Input Format
N/A
Output Format
N/A