How do we solve the KIRLAB Problem asked 12 Dec '16, 15:16

Here is the detailed approach atulac  KIRLAB Explained. Comment to get your doubts cleared. answered 13 Dec '16, 09:40

The admins will soon upload them but you can have a look at my approach. I used prime factorization to solve the problem. First for any pair of numbers to have a gcd greater than 1 signifies the fact that both of them have at least one common prime factors. So what id did was i maintained a DP array to store the longest length of each subsequences. Basically you have to solve in the following way: Let us suppose a certain number of prime factors have already been mapped in the DP array. Now when you get another element in the array suppose Now you can ask what if we get a number whose none of the prime factors are previously mapped, for this also just maintain a flag to check for it. I know it would be hard to understand the concept by only reading this, but the editorial would be much more neat and readable. you can check my code at : THIS LINK answered 12 Dec '16, 17:07

Here's my approach  answered 12 Dec '16, 18:36

It's been more than a month now, still the editorials of December Long challenge are not posted. Even the Jan Long challenge's editorials are posted now. If there is one thing that separates Codechef from other sites is the editorials. How unprofessional from Codechef.. answered 18 Jan '17, 18:01

Please stay calm, admin ll upload editorials soon answered 12 Dec '16, 16:38
