MAX Query - 1 ( Please help me to find problem with my code)

Please Tell me what is the problem with my code

@amangoel987357
Line 26
tree[index].push_back(b[j]);
you did b[i];

Replace condition inside line 51 to
return tree[index].end()-lower_bound(tree[index].begin(),tree[index].end(),k);

Hey i have modified the code but it is still not working

@amangoel987357
Line 42
Similar mistake like line 26

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.