Didn't getting why i am getting wrong answer

Didn’t getting why i am getting wrong answer…please help

use long long int as int will led to overflow. If this didn’t work let me know. Will help you with it.

not working sir even after making long long int

Submit now


Iosbase is just for fast input and output cause test cases are strict.
Keep it in a single array ,So that calculating it would be easy.
What we are doing in this is
For max, A={12,10} , B={-3,0} , max= (12-(-3))+(10-0)=25
For min, A={12,-3} , B={10,0} min=(12-10)+|(-3-0)|=5

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.