SkyHawk's blog

By SkyHawk, 12 years ago, In English

Today, Saturday, September 1, 2012 at 20:00 (Moscow-time).

Good luck && have fun!

  • Vote: I like it
  • +20
  • Vote: I do not like it

»
12 years ago, # |
Rev. 9   Vote: I like it -14 Vote: I do not like it

прикольные задачи, если не считать, что я ушел в минус по взломам, то раунд удался

»
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it

47 to all.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How to solve 1000 div2?

    • »
      »
      »
      12 years ago, # ^ |
      Rev. 3   Vote: I like it +2 Vote: I do not like it

      Dynamic dp[h+1][first][second][third][fourth][bad_cubes] = (dp[h+1][first][second][third][fourth][bad_cubes] + dp[h][first1][second1][third1][fourth1][bad_cubes-q]) % mod

    • »
      »
      »
      12 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The question is still open :)

      • »
        »
        »
        »
        12 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Actually it's quite easy. Our subproblem is: How many ways can we build the tower if its height is H and the last four pieces have the color a, b, c, d and we are still allowed to have k adjacent cubes. Answer: dp[H][k][a,b,c,d] += dp[H-1][Q][w,x,y,z] where [w,x,y,z...C(all permutations)] // C number of colors and Q is the number of adjacent cubes. Base case dp[0][k][abcd] = 1

        Look at my source code in the practice room :)