This is my Solution: CodeChef: Practical coding for everyone
New solution: Still gives WA for some test cases : CodeChef: Practical coding for everyone
Consider the test input:
1
1 1
1
Edit: No, wait - need K \ge 2. Hmmm.
Here we go:
1
2 2
1 2
2 Likes
I changed for that, still WA for some cases though.
1 Like
Please link to your updated submission.
The link : CodeChef: Practical coding for everyone
I’ve added that in the original post as well.
1 Like
Consider the test input:
1
9 2
1 2 2 1 2 2 2 2 2
2 Likes
Thanks a lot! I got it working!
1 Like