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

Автор luogu_official, история, 7 месяцев назад, По-английски

We will hold Luogu Round 273 on Luogu. This is a Div.1/2 round. English statement will be provided officially. You can click the button to change language.

We are looking forward to your participation!

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

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by luogu_official (previous revision, new revision, compare).

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by luogu_official (previous revision, new revision, compare).

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится +51 Проголосовать: не нравится

The editorial for Div.1 C seeems to claim that the problem is reduced to counting vertex colorings of a chordal graph, but I have a case

1
4 2 10
1 0 1 0

which I think has a $$$4$$$-cycle and the answer is $$$6570$$$. Am I missing something?

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

    Oh no I think it's right.

    But the conditions for achieving this situation are more demanding, I will try to improve the solution.

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

    Oh I know what happened.

    There will be only one vertex which represents the character $$$t_{k+1}$$$, where $$$k$$$ denotes $$$\max p_i$$$, it will be connected to all the vertices $$$s_{i+p_i}$$$, where $$$p_i=k$$$. This may make the graph to have $$$4$$$-cycles.

    I will try to find out if we can solve this problem.

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

    One possible solution is to set $$$m$$$ to $$$\max p_i$$$, and I think the solution will be all right.

    For the original version, maybe it's hard to find out a good solution. It's my fault.

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

    Maybe the problem is simple. If there is some $$$p_{i+k} \gt 0$$$ where $$$p_i=k$$$, then we have $$$t_{k+1}\neq s_1$$$, so the graph is still a chordal graph. Otherwise, we have $$$\forall p_i=k,p_{i+k}=0$$$, that is, we can first count vertex colorings while $$$t_{k+1}\neq s_1$$$, where we can construct a chordal graph. Then as $$$s_{i+k}\neq s_1$$$, so we can set $$$t_{k+1}=s_1$$$, and count the colorings of the rest part, this is a chordal graph as we proved in the editorial.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

qpqpqpqpqp