← All problemsSign in

Modulo Equality

You have two arrays A and B, each containing N integers. Elements of array B cannot be modified. You may perform an arbitrary number of operations (including zero number of operations). In one operation, you can choose one index i (1 ≤ i ≤ N) and increment Ai by 1. Each index can be chosen any number of times. Find the minimum number of operations required to modify the array A such that for ev

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start