Stuck in this since forever

Revision en1, by yyyvvvyyy, 2018-12-21 21:21:51

Given n integer positive numbers ,find the minimum numbers of operations such that no two numbers have their product making a perfect square. In 1 operation you can pick any number and add or subtract one from it. All the numbers must be positive after all the operations are performed. 1<n<=100 and value of numbers are in range of 1 to 100000. Any help/discussion will be appreciated!!

Tags #dp, #mincost flow, greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English yyyvvvyyy 2018-12-21 21:21:51 424 Initial revision (published)