WA in SEACO(Sept 17)

I am Getting WA in SEACO From Sept Long Challenge 2017

Need TESTCASE for which my code is Failing.

Link to Problem : https://www.codechef.com/SEPT17/problems/SEACO/

Link to solution : https://www.codechef.com/viewsolution/15400470

Modular subtraction does not work the same way as modular addition. Try this function below instead. That is how i did it.

long long sub(long long a, long long b) {
    return (a % mod - b % mod + mod) % mod;
}
2 Likes

Yeah !!
It Worked .
Thanks!!

1 Like