Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

RAD's blog

By RAD, 14 years ago, translation, In English
Hello everyone on Codeforces Beta Round 31 (Div. 2, Codeforces format)

Round was prepared by: Mike Mirzayanov, Dmitry Matov, Max Ivanov and me.

Good luck!
Artem Rakhov and Codeforces team

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I was getting PE on the problem D, I cant figure it out why! Can I put end lines on the outputs?
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    I received PE at first problem, when actualy it was an WA. Maybe the same happened to you. 
    • 14 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      Yup, me too, i got PE but it was actually WA. Admins should fix that.
      • 14 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        me too, i was typing a[i] instead of indexes i, you should fix it 
        it was WA and not PE
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    I got many PE when I submitted via uploading source file, and got AC using CTRL-C + CTRL-V. I think it is a terrible bug.
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
i failed D at test 9. does anyone have some test case?
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Some big test. The answer is 0.
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    WA at test 4....

    The text say, Breaks are given in arbitrary order.

    will some test case like this?
    2 2 2
    0 1 1 1
    1 0 1 2
    • 14 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      Yes...
      I make one more for loop to calculate by force, then i got an Accept.
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Hello! I have a question. Can somebody give me some "difficults" test cases for problem E? I have Wrong Answear on test 11 and I have no ideea why. Thank you very much
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Do you use 64-bit type?
    • 14 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      I don't know how you solved the problem, but in my solution there was no need for 64-bit integers(because i didn't keep the numbers in any variables). Anyway, i'm not very sure if my solution is right, this is why i am asking for some tests:) Thx
      • 14 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        Test #11
        10
        89959999998998796989
        • 14 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it
          What would be a correct answer for:

          3
          000999

          ?
          • 14 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it
            HHHMMM for a total of 999
            • 14 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it
              My code fails on the 4 test case, I tried a lot of test cases here and they seem to be correct :/
              The input example:
              1234
              The total is: 12 + 34?
        • 14 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it
          Can you give me a possible valid solution or the the total sum aquired by those 2 because i still can't find the error?
          Thx:)
          • 14 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it
            Test:
            10
            89959999998998796989
            Possible solution is (sum = 18995998865):
            HHHHHHMMMMHMMHHMHMMM


            • 14 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it
              My algorithm gives the same solution and its failing on test 4 :/, anyone got any other test?
            • 14 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it
              Hehe, i finally solved the problem. Thx man!! By the way: what is the official complexity of the problem? O( n^2) ?
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Hey can someone give test num 26 for problem E. Thanks :)
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I cant figure what is wrong with my D :/, tried a lot of tests here and all of them are ok, does anyone knows the test number 4? (its giving me PE, but I guess its WA)
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
D test 9....anyone have the test case ?
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Some big test. The answer is 0.
    • 14 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      How can it be 0?

      "It is guaranteed that the set of breaks is correct, i.e. there is some order of the given breaks that each next break divides exactly one part of the bar into two non-empty parts.
      Output

      Output n + 1 numbers — areas of the resulting parts in the increasing order."

      N is at least 1, and you cant break it on empty parts!

14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Can problem D be done with DFS/BFS ? We have a break as a wall between two pieces .
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    You could simplify the problem int the following way: 
    extend our map to the sizes (2N)x(2N). Now you may use the whole rows and columns for a walls.

14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Can anybody explain how problem E is solved please?

I'm using DP. The parameters are (index, player1 result, player2 result, nTurns for player1, nTurns for player2)

but I'm memorizing only on index and player1 result, as the rest can be calculated through those two. Player1 result is too large so i'm memorizing in map. Sure that gives me TLE on test case 14.

What can I do? Thanks very much.
  • 14 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Try DP: d[nTurns1][nTurns2] = maximum_possible_sum. Note that we can rid of the other parameters: at current step d[nTurns1][nTurns2] we select whom to give (nTurns1+nTurns2)-th digit of the number. It's easy to understand that following strategy doesn't depend on current digits, so we can add 10^{n-nTurns1} * s[nTurns1+nTurns2] to the value d[nTurns1+1][nTurns2] to best answer if we give current digit to Homer. Similar formula is in the case of Marge. Select maximum of these two values to obtain value for current d[nTurns1][nTurns2].
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
what is the test case 8 of problem b????? please give with its answer too. :(
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
what is the test case 11 of problem E?????