Error in my code

Hey, I have written my code for SEQ and it is here- https://ide.codingblocks.com/s/155608
whereas prateek bhaiya’s code is here - https://ide.codingblocks.com/s/2215.
I think there is slight mistake but i’m unable to figure it out!!!

PS - the only difference in the concept of my code and prateek bhaiya’s code is that I wanted to keep the size of vectors as k itself.