Ganesh and Kartik
CodeChefOpen on judge ↗
Kartik and Ganesh are brothers. They both like mathematics a lot. Being an elder brother, Kartik gives a problem to Ganesh. The problem is - There is an array of $N$ positive integers. You have to find **magical subarray of maximum length** possible. **Magical subarray** is an array such that there are no two numbers (on different positions) in that array, whose product results in a perfect squa
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