Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Need help in this ques!!!

Правка en1, от _wannacry_, 2024-07-15 13:12:07

We are given an array of integers of size ’n’. There is an infinite supply of each integer of the array. Now, for each index in the array, the task is to calculate all the possible ways in which the integer present at that index can be obtained by adding up 3 integers from arr[0], arr[1]…arr[i-1] (considering the calculation is being done for the index ‘i’). Since, there is infinite supply, repetition of one element is allowed, i.e., all the three integers can come from the same index of the array.

Constraints: Size of array could be as large as 10⁵

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский _wannacry_ 2024-07-15 13:12:07 583 Initial revision (published)