(Sorry for my poor English. >_<)
(Sorry for my poor English. >_<)
(Sorry for my poor English. >_<)
First of all, here are some links about CERC2016:
[1] The contest page in CF: https://codeforces.net/gym/101173
[2] The official tutorial: https://cerc.hsin.hr/2016/tasks/cerc2016_presentation.pdf
The text I put below is from page 117 of the official tutorial.
Finally, we'll revise our gap-finding algorithm, not to visit both children when the split would result in two tiles that look > the same with respect to intersecting with the polygon. Instead we visit only one children, but create twice as many gaps in that branch. It can be shown that this way we'll only visit $$$O(nm^2)$$$ states. ...
It mentioned that "this way we'll only visit $$$O(nm^2)$$$ states".
I have spent several hours on trying to prove this. However, I can't prove it. And it seems to have some counterexamples.
Maybe it is a counterexample:
Let's assume $$$m \approx 2 ^ 8 \times 4, n \approx 32$$$ first. This will make it more convenient to describe the counterexamples.
Let's construct a polygon. It looks like the picture showed below.
This polygon is made up of many vertical or horizontal sticks. The width of each stick is 1.
Firstly, a vertical stick is put into the leftmost part of the $$$2 ^ n \times 2 ^ n$$$ rectangular grid. Then $$$m$$$ horizontal sticks will be put in while the conditions below holds:
The left endpoint of each stick is next to the vertical stick.
For two adjacent sticks, the distance between them is about $$$2 ^ 8$$$ and the stick below is $$$2^{24}$$$ longer than the one above.
Let $$$x$$$ be a integer so that $$$x \in [16,24)$$$(approximately).
Given the polygon above and an $$$2^x \times 2^x$$$ rectangular tiling of the plane, there will be $$$O(m)$$$ different tiles with respect to intersection with the polygon. To solve the problems bounded by rectangles in the following figure, we need to visit $$$O(m ^ 2n)$$$ states. But don't forget that there're $$$O(n)$$$ valid values for $$$x$$$. So it will be $$$O(m ^ 2n ^ 2)$$$ states to visit.
I wonder that whether my counterexample is right and whether there is a proof for the unproven conclusion in the tutorial.
Can anyone help me?
Thank you in advance!