Please read the new rule regarding the restriction on the use of AI tools. ×

n0b0dy01's blog

By n0b0dy01, history, 5 hours ago, In English

Can any body tell me what i am doing wrong in the 285754797. I tried solving 2022B - Kar Salesman problem using max-heap but it is failing against test 2

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
34 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Consider this case, n=3 x=2 and the array given is 2 2 2 output for this test case should be 3 but your code gives 4.