3414 - (*) Ambiguous permutations   

Description

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

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss