Editorial for AYJCC24 P1 - Can Jimmy Cut?


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: totallyAugustus

The intended solution was to take the sum of all \(a_{i}\) as Jimmy's calorie intake and to subtract \(NK\) from it to account for Jimmy's metabolism.

Subtask 1 was meant for users who forgot to take into consideration the limits of 32-bit integers. 64-bit integers are needed for full points, as the bounds on the problem will overflow 32-bit integers.

Time Complexity: \(O(N)\)


Comments

There are no comments at the moment.