on my computer it is giving the correct answer
Why is it not passing test cases
Here Height of each bar in histogram can be 10^10…
so you have to increase the size of integer variable as “long long int” :
#define int long long int
int32_t main(){
Modified Code is:
i Hope this helps…