Hello Codeforces!
I was solving this problem
http://codeforces.me/contest/810/problem/C
and it gives me a lot of WA, here is my code
but after that I got an AC, because i just implemented this "+Mod" in this line
-- Sum=(Sum-der)%Mod;
And finally I stay like this
-- Sum=(Sum+Mod-der)%Mod;
why does it happened?