The Two test cases of painters problem are not passing

The code for the painter problem is attached.
Please check the code and please tell me the error in the code.

everything seems fine, I have tried your code on hackerblocks and it runs fine! try to download the testcase which shows wrong answer and run it manaully!

I tried on my complier but the input file size is too large. The input test case file is not running properly for that size

Your code is fine don’t worry

Hey @mayankA47 I just changed my datatype of int to long long and its is working fine now.
I think there is a problem in the question input because we donot need to use long long data type for taking input of n,r,t. but if we change it then all the test cases are passed

good work. it’s a good practice to use long long everywhere to avoid anykind of possible overflow.