Descomposició en cicles X44445


Statement
 

pdf   zip

Public test cases
  • Input

    6
    4 2 1 5 3 0
    3
    0 1 2
    10
    7 2 8 6 1 3 0 9 5 4
    

    Output

    0 4 3 5
    1 2
    ----------
    0
    1
    2
    ----------
    0 7 9 4 1 2 8 5 3 6
    ----------
    
  • Information
    Author
    Salvador Roura
    Language
    Catalan
    Official solutions
    Unknown. This problem is being checked.
    User solutions