IN which test case the given code is failing

Bhaiyaa ye wala code jo sample test case dia hai use work kar Raha par ans wrong dera can you plese tell error or the tets case where thos code is failing .

Thanks

hi @94217846kunal
Firstly

if(s>p)

here u had written s < p… it should be s > p

Secondly, ans should be printed in lexicographically sorted order… so instead of directly printing just store them in a vector, then sort and print…
corrected code -->

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.

If the check happened to be very close to the faulty code , a CC test case might serendipitously get categorized as failing . Given a failing test case.

myccpay