Find all unordered pairs satisfying modulo conditions
Filed under Hyperverge
The question
Given an array A and integers B, C, D, find all possible unordered pairs (i, j) such that 1 <= i < j <= N, (A[i] + A[j]) % B == C, and (A[i] * A[j]) % B == D.
No write-up yet. Related questions below have one.
Related Hyperverge questions
Collected from public candidate posts and coding forums. Updated Nov 2026.