Histogram problem

every input is giving correct output but still all test cases are failed

Check now ->

what is int32_t main() ???
kya h??
kyu use kiya ??
kab use krte h ye ??
why does it even matter ??

okay, constraints bhot jyda hai easily int ki jgha hume long long int use krna hai
easily maine explicitly int ko define krdiya hai as long long int. Ab jha bhi you will write int, it means long long int.
toh tumhare code mai int main joh function hai uska mtlb ab long long int hogya hai, jiska return type integer ni ho skta , long long int define krne ke baad. toh we have used int32_t main(), yeh kya hai neeche explain krdiya hai

Plain int is quite a bit different from the others. Where int32_t each have a specified size, int can be any size >= 16 bits. At different times, both 16 bits and 32 bits have been reasonably common (and for a 64-bit implementation, it should probably be 64 bits)

ab iski jgha tum int main bhi kr skte ho, pr fr sare variable declarations mai tumhe int ki jgha long long int use krna pdega.

case 1:
matlab humara normal int 32 bit ka yani 4 byte ka hota h
to int main() isme ye int 4 byte ka h

case 2:
ab long long int ko int bol diya
toh isiliye humne specify kiya int32_t main() 32 bit wala int chahiye

toh case 1 wala int aur case 2 wala int32_t same h kya ??

m poora shi samjha kya ???

int is 32 bit, that is 4 bytes
int32_t is 4 bytes signed integer
this is the only difference.
Return type change ho gya.
int32_t long long int ke equal ni hai, pr int long long int ke equal hai.

isme int or int32_t same hue, dono ka return type 4 bytes ka hai

ab int ko long long int krdiya na? toh ab agar int main rkhoge toh long long int ka return type bejhna pdega. Yanni 8 bytes? haina
Pr agar int32_t krdoge toh 4 bytes ka integer bejh skte hai.

thank u very much buddy

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.