Блог пользователя rng_58

Автор rng_58, история, 4 года назад, По-английски

We will hold Dwango Programming Contest 6th.

The point values will be announced later.

We are looking forward to your participation!

  • Проголосовать: нравится
  • +123
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hope this contest isnt unrated too.

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

How do you solve task B? I didn't even understand the statement.

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

How to solve D?

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +22 Проголосовать: не нравится

    I was adding numbers one by one from postion $$$1$$$ to position $$$n$$$. Let's say we are adding currently element at position $$$i$$$ (there is $$$n-i+1$$$ possible values). In case some element can not be right for all other elements (rest $$$n-i$$$ elements have same $$$a_i$$$ value), then put that element on position $$$i$$$. Otherwise put smallest or second smallest element on position $$$i$$$.

    Obviously we can not get smaller lex permutation than this one, but also it is possible that last two elements are bad in the permutation:

    For example case:

    $$$ n = 5$$$

    $$$a = [2, 3, 1, 5, 4]$$$

    My algorithm will give result: $$$[1, 3, 2, 4, 5]$$$ and it is incorrect result. But we can make it better, just pick last three elements and try every permutation — at least one of permatutions will be valid (that is reason because there is no answer just for $$$n = 2$$$).

»
4 года назад, # |
  Проголосовать: нравится -64 Проголосовать: не нравится

I would had much apreciated to get a "warning" or something before haveing submitted A. Because then I would had read the other problems beforehand, and propably would not have participated at all.

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

How to solve C?

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    There is an editorial available. editorial

    Edit: Just saw that the english version is not available for all problems, sorry.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Here's a nice analogy: you can interpret the problem as follows- There's a $$$k\times n$$$ grid. First you have to distribute $$$a_i$$$ black hokey pucks among the $$$n$$$ cells of the $$$i$$$-th row (for each $$$i$$$). Then you have to distribute $$$n$$$ red hockey pucks on top of the $$$\sum a_i$$$ black pucks such that every column has exactly one red puck. Count how many ways are there to do that.

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

How to solve B , i did not understood the editorial

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Did it say that the English version of the Editorial would come out today?

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Hi, it's been more than a day and the editorials are not out, as promised. It would be great if you could upload them since the questions were interesting :)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Where can we see the data? I found that it isn't in the dropbox...

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

can someone please explain the solution for problem C? I am not able to understand tutorial for the problem