luogu_official's blog

By luogu_official, history, 7 months ago, In English

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!

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

»
7 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
7 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
7 months ago, hide # |
 
Vote: I like it +51 Vote: I do not like it

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 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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 months ago, hide # |
 
Vote: I like it -26 Vote: I do not like it

qpqpqpqpqp