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.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 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.
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