← All problemsSign in

Fantastic Four

CodeChefRating 2533Open on judge ↗

Given an array A consisting of N integers, you have to perform Q operations on it. These operations can be of following two types. - Type 1 is update operation in which you update the value of a particular element of the array - Type 2 is range query from L to R in which you have to decompose the product of the elements in this range as sum of 4 square numbers. All these operations should be do

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start