Array And The Indices
CodeChefOpen on judge ↗
You are given array 'A' of postive integers of size n.You need to make another array 'B', size of n such that B[i] = f(A[i]) for 1<=i<=n where f(x) is function which gives the sum of the factors of the number 'x' (see example for explanation). In the array you need to find the count of all the pairs (i,j) (call it M1) such that the following conditions hold , i.e. i < j and B[i]+j-i=B[j]+i-j whe
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