Chef and medium problem 2
Chef has an array containing N integers. You have to make M queries. Each query has one of the two types: - 1 l r p - Select all the numbers having indices between l and r (inclusive) that are divisible by p and divide them by p, where p is in set {2, 3, 5}. - 2 l d - Modify the l-th number in the array to d. Please help Chef in finding out the array after all the M queries. Input The first l
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