question -https://codeforces.com/problemset/problem/1312/C
my solution -https://codeforces.com/contest/1312/submission/92993692
as my compiler giving correct ans the values of v[i]<k but codeforces giving me incorrect ans
please tell me why this is happening and how to correct this error