Best Out Of All
CodeChefOpen on judge ↗
You are given two arrays each of length $N$ that are array $A$ and $B$. You are allowed to make atmost $K$ operations such that in each operation you can increase or decrease any of the element of the array $A$ by one.(+1 or -1 one of the $A[i]$ ). You need to find the maximum value of sum of $A[i]*B[i]$ for each $i$ in range of 1 to $N$. Input: => First line contains two space separated inte
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