22 September 2026 · Advanced track
Most Consistent Solar Array
Choose the highest-output solar array, using its reading range to resolve a tie.
A solar field logs array names and energy readings in matching lists. The name and reading at the same position belong to one report. Add all energy readings for each array. Return the array with the largest total energy. If arrays tie for the largest total: - Prefer the array with the smallest difference between its largest and smallest individual readings. - If that is also tied, prefer the array whose first report appears earliest.
Constraints
arrays and readings have the same length between 1 and 100000.Every array name is an ASCII string between 1 and 30 characters.Every reading is between 0 and 100000.
Function signature
def most_consistent_array(arrays, readings):