如果你 WA on #5
请检查一下是否取模勤快,或者在取模的时候前面打上 (__int128)。
(__int128)
例: A%mod×((l+r)%mod)%modA \% mod \times ((l+r)\%mod)\% modA%mod×((l+r)%mod)%mod