Comments

I could not understand keeping only prime divisor part. I think by maintaining only one prime, we might miss some numbers because we have to satisfy the condition gcd (a, b) > 1.

This was essentially my algorithm but it was running for 2-3 seconds on my PC and got TLE on the Codeforces. Can you please suggest some modification in my code. http://ideone.com/YqhwZV

got accepted by your idea, Thank you very much mate :)

Any idea for solving C? I tried some simiple generation idea which took around my 2-3 seconds on my system but it gave me TLE on the first test case :(

Test case 2 in problem J was evil. I could not figure it out during the contest. Only thing that I could figure out was that this test has longest string length = 0.

what was the logic for solving problem B?. My idea was to dp (i, lastPosition) lastPosition denotes position from the strings [1..m]. Now I iterate over all the characters and try taking creating new Possible valid transitions.

Complexity: l * m * 26 * log m. My solutions gets TLE??

OFFTOPIC: Could anybody tell me how to find number of test cases in the problems ??

On gojira → Codeforces Round #196, 13 years ago
0

As we have to minimise the number of times, score get doubled, so we try to make maximum number of "k-1" blocks (k-1 consecutive correct answers), so we can find the maximum number of "k-1" blocks one can have using binary search, and after that, remaining answers will be correct consecutively, we put this block in thw beginning to minimise the score...

On Serega → Codeforces Round #193 (Div. 2), 13 years ago
+4

How to do C?