here’s my code. Please check what am I missing out. Is it something about the data type chosen? int instead of long long?
Wrong Answer in 4 test cases
errors;
- don’t sort the array it will change the ordering
- s=max element of array
- use ll instead of int
- final ans should be cout<<(((ans%10000003)*T)%10000003);
i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course
I did everything you asked. Except the 4th one. If I do 4th one too, then all my test cases show wrong answer. Still 2 out of 6 cases show wrong answer. Please check. Here’s the code https://ide.codingblocks.com/s/252794
there are few more mistakes in your code which i has not mention
see in the code given by me
line no 56