Chinese Remainder Theorem
Solves the system of congruences:
given two arrays and of length .
crt
Arguments
R: list[int]: array of remaindersM: list[int]: array of moduliMOD: int = 0: (optional) modulo for the solution
Returns
int: minimum non-negative solution (or if specified) to the system of congruences, or-1if no solution exists
