Passing game (problem solution)

example

topic

Ideas

There is no code for this topic

This question seems to be very simple. Think of people with restrictions as dots, and other consecutive segments as a dot (in fact, unlimited people). At the same time, 1 11 is also regarded as a point. (The standard practice is to treat all free people as a single point, which I think is complicated).

Then every mmEnumerate all m rounds, judge the limit alone, and then the time complexity is:O (mk) O(mk)O ( m k ) , but my practice has an extra 2 constant, QAQ, I didn't dare to write code.

And why is this question DP? ? ?

Shouldn't it be called thinking? ? ?

Guess you like

Origin blog.csdn.net/zhangjianjunab/article/details/103954151