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

Автор Ormlis, история, 5 часов назад, По-русски

Спасибо за участие!

2024A - Выгодный процент придумала и подготовила Андреева Елена Владимировна при участии Artyom123

2024B - Покупка лимонада придумал Endagorion, а подготовил sevlll777

2023A - Склеивание массивов придумал и подготовил Mangooste

2023B - Пропуск придумал и подготовил adepteXiao

2023C - Ч+К+С придумал и подготовил yunetive29

2023D - Много игр придумал и подготовил Tikhon228

2023E - Древо жизни придумал isaf27, решил и подготовил Ormlis

2023F - Холмы и ямы придумал и подготовил glebustim при участии vaaven

Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
  • Проголосовать: нравится
  • +53
  • Проголосовать: не нравится

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

Ormlis when will hidden test case and source code of others be visible?

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

    Only administrators can do this, not me.

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

      Oh sorry I didn't know. Btw great contest Thank you

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

Hi, I cannot prove my solution for div1D nor hack it I hope someone can hack or prove it.

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

i swear i can't figure out for the life of me why my solution to B isn't correct, and i'm not allowed to look at the failing test case either.

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

    I dont know about the formulas, but you should use long long instead of int.

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

    Bro your code won't return any output if k is equal to sum of all elements of the array.

    Try

    1

    3 6

    1 2 3

    Comment if you want me to fix it

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

then $$$c_p \cdot q^{c_p} > (c_p - 1) \cdot q^{c_p - 1}$$$; otherwise, the smallest element can definitely be removed.

why?

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

then $$$c_p \cdot q^{c_p} > (c_p - 1) \cdot q^{c_p - 1}$$$; otherwise, the smallest element can definitely be removed.

why?

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

C is a piece of dogShit,i mean why it had to be based on some crap observation.It could have been improved by giving a formal proof of why does that always work. Disappointed...

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

    What's wrong with the proof provided?

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

    Another solution is to sort the arrays by comparing pairs $$$(min(a_{i,1}, a_{i,2}), max(a_{i,1},a_{i,2}))$$$. We can observe that if we move the array with minimal element to the left (and among these with the least maximum), the number of inversions cannot increase, so that's optimal order

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

did someone solve div2B with a multiset ?

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

Ormlis In D2C, how can we solve the problem for arrays of sizes three or more? I tried to solve it by comparing inversions of ab and ba for sorting but it seems this condition is not transitive and thus doesn't work for arrays of twos either, so I had to use some other min/max technique, which doesn't seem to generalise for sizes more than 2.

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

got IGM but still cannot solve A during contest, isn't weird?

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

    A simpler solution for 1E:

    When you choose a node as the root node, our answer is at least $$$\sum_{i=1}^n \frac12 s_i(s_i-1)$$$, where $$$s_i$$$ is the number of children of node $$$i$$$.

    However, such a construction may not be able to satisfy some edges that pass through both the son and father at the same time. Let's consider the contribution of this situation to increasing the answer.

    We set a dp state $$$f_i$$$ to represent the number of residual paths that can be uploaded through the parent when the node $$$i$$$ calculates the necessary contribution internally (i.e., the above equation).

    Transfer as follows:

    $$$f_u = \sum_{v\in son_u} \max(1 - [u\text{ is root}], f_v - (s_u - 1))$$$

    After calculating $$$f_ {root}$$$, we must pair the extra paths pairwise, and when we choose the node with the highest degree as the root, we can prove that there must be a match to make the scheme valid:

    [tbd, prove is hard]

    So we can calculate $$$f_ {root}$$$ and add it to the equation at the beginning.

    using translator.

    287001804

    code