Buying fruit showing wrong answer

its showing wrong answer
code-https://ide.codingblocks.com/s/229176
sample case passing
please help

@S18LPC-OL0078,
Are you sure that you even understand the problem,

How do you ensure that condition is satisfied, by just choosing the minimum cost fruit at each shop…??