Cubic Product
CodeChefOpen on judge ↗
Shivam got an array A of N positive numbers. He can choose some numbers from that array and put them into a box. He hate cubic numbers and he want to ensure that if Ai and Aj(i!=j) are two numbers present in the box, the product Ai*Aj is not a cubic number. For example if Ai=1 and Aj=8 then he can not put both the numbers into the box. Find out the maximum numbers he can put into the box. Input
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