https://www.codechef.com/viewsolution/27221426

THIS IS MY SOLUTION GIVING RIGHT ANSWER TO ME ,BUT UNABLE TO FIND WHERE IT IS GETING WRONG PLS HLP

If n is odd and k>n/2 then a[n/2] i.e. middle element always remains zero

3 Likes

thanks bro for helping !!

bro ,but in the solution i inserted 0 in middle if no. of elements are odd and k>n/2 on line no. 103 and 117

pls can you tell me ?which test case is giving wrong answer in my solution,again thanks for help!

Picking one at random - your program fails the following testcase:

```
1
27 93
642 424 865 356 33 504 691 881 460 121 154 661 598 520 110 274 430 197 666 547 881 118 504 365 288 231 209
```

(answer should be:

```
595 335 577 9 473 398 450 338 854 188 308 903 598 0 110 274 430 197 666 547 881 118 504 365 288 231 209
```

)

2 Likes

Thanks bro for helping!!

1 Like