System of Remainders — Solution & Editorial
Merge congruences pairwise with the general CRT: a solution to x≡r0 (mod m0) and x≡ri (mod mi) exists iff gcd(m0, mi) divides (ri − r0); combine into a single congruence modulo lcm(m0, mi).
Complexity: O(K log)
Watch out: Non-coprime moduli — the divisibility feasibility check is where naive CRT silently produces garbage.