You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, when (r0, r1) = (4, 0) and (m0, m1) = (5, 3), we have (x, g, u0, u1) = (-2, 1, 5, 3). So x*u0*g % (u1*g) is -1 (or 2 if we consider non-negative mod), but (r1-r0) is -4.
Anyway, the code itself seems correct.
The text was updated successfully, but these errors were encountered:
ac-library/atcoder/math.hpp
Line 57 in c9838af
I think this should be:
For example, when
(r0, r1) = (4, 0)
and(m0, m1) = (5, 3)
, we have(x, g, u0, u1) = (-2, 1, 5, 3)
. Sox*u0*g % (u1*g)
is-1
(or2
if we consider non-negative mod), but(r1-r0)
is-4
.Anyway, the code itself seems correct.
The text was updated successfully, but these errors were encountered: