Two Array Average
You are given two arrays of n integers. Your task is to select a nonempty prefix from both arrays such that the average of all selected numbers is as large as possible. Input The first line has an integer n. The second line has n integers a_1,a_2,\dots,a_n: the numbers in the first array. The third line has n integers b_1,b_2,\dots,b_n: the numbers in the second array. Output Print two numb
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.
Sign in to chat with the tutor and save your progress.
Sign in to start