Fraction
CodeChefOpen on judge ↗
You have two arrays A and B of equal size N containing positive numbers. You have to maximize the following expression where S is a non-empty subset of the set {0, 1, 2, ..., N-1}: Input The first line of each test case contains a single integer N denoting the size of the two arrays. The second line contains N space-separated integers A1, A2, ..., AN denoting the numbers of array A. The third
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