My solution in 100651A - ALPHACODE - Alphacode got WA on test 2 .. and this is my code : http://ideone.com/GwzmWe can anyone provide me a test case to drop this? thanks on advance.

Before contest

Codeforces Round #606 (Div. 1, based on Technocup 2020 Elimination Round 4)

20:08:22

Register now »

Codeforces Round #606 (Div. 1, based on Technocup 2020 Elimination Round 4)

20:08:22

Register now »

*has extra registration

Before contest

Codeforces Round #606 (Div. 2, based on Technocup 2020 Elimination Round 4)

20:08:22

Register now »

Codeforces Round #606 (Div. 2, based on Technocup 2020 Elimination Round 4)

20:08:22

Register now »

*has extra registration

# | User | Rating |
---|---|---|

1 | tourist | 3556 |

2 | wxhtxdy | 3520 |

3 | Radewoosh | 3409 |

4 | Benq | 3368 |

5 | mnbvmar | 3280 |

6 | ecnerwala | 3278 |

7 | LHiC | 3276 |

8 | sunset | 3264 |

9 | maroonrk | 3159 |

10 | TLE | 3145 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 189 |

2 | Radewoosh | 177 |

3 | tourist | 173 |

4 | antontrygubO_o | 172 |

5 | Vovuh | 168 |

6 | PikMike | 166 |

7 | rng_58 | 157 |

8 | majk | 156 |

9 | farmersrice | 153 |

9 | Um_nik | 153 |

My solution in 100651A - ALPHACODE - Alphacode got WA on test 2 .. and this is my code : http://ideone.com/GwzmWe can anyone provide me a test case to drop this? thanks on advance.

↑

↓

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/13/2019 17:56:38 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Can you please explain your solution's logic? I know only another solution.

Ok , now i got why it was WA , because of zeros like 101 , 100 . it's accepted now :)) actually My idea comes due to some observations ! if we have something like that 25925925 .. let's call the number of possible chars to get from a segment X .. now it's cleat that 25 gives us 2 different chars {2 5 , 25} .. so by combinations ans = X * 3 = 2 * 2 * 2 so what about that 1111 ? it's fib[5] why ? i don't know ! so for n consecutive chars you have X = fib[n+1] the result becomes X1 * X2 * ... I'm trying to find a proof for that ! :( final code : http://ideone.com/nkIXN5

My solution is similar, may be it will help you to prove your:

Let dp[i] be the answer for prefix of length i.

At first dp[i] = 0. Then:

You can see that this formulas has something similar to Fibbonacci numbers

Thanks a lot , it helps me