Problems > Sum of the Others > Editorial

Sum of the Others — Solution & Editorial

Back to the Problem

Compute the total once; each output is total − ai.

Complexity: O(N)

Watch out: The total needs 64 bits at full constraints.