Giving WA in pcycle
What is wrong in my code? please help

From the Problem Statement:

The first line of the output must contain a single integer k denoting the number of cycles in the permutation.

You’re also printing an extra blank line at the end, but I don’t know if the Online Judge is strict enough to class that as a failure.

Oops !! Thankyou so much

1 Like