UPD 1: added hints, problem credits, more specific acknowledgements and some remarks. Implementations are on the way, sorry for making y'all wait!
2207A - 1-1
Author: awang11
Preparers: awang11, IceSerpent
Analysis: awang11
Hint 1If there are two consecutive zeroes, can you ever change either of them?
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207B - One Night At Freddy's
Author: awang11
Preparers: awang11, IceSerpent
(Cool) analysis: awesomeguy856
Hint 1Which animatronic should you choose with your flashlight?
Hint 2How many animatronics are worth incrementing when there are $$$k$$$ flashes remaining?
Hint 3Write an expression for the ending danger level in terms of the night length and the danger levels of the animatronics that get flashed.
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207C - Where's My Water?
Author: awang11
Preparer: IceSerpent
Analysis: IceSerpent
Hint 1Solve the case of one drain first! You should aim for $$$O(n)$$$.
Hint 2If you pick two drains, what's the shape of their overlap?
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
Remark 1There are tons of ways to do this problem, and chances are you found a different one than most other contestants! This problem is solvable in subquadratic time however, can you do it?
Remark 2Also, the diagrams in the problem, as well as the ones in all editorials and other problems, are completely drawn natively in tikzpictures. Did you know you can cram 3-D plots onto 2-D to make textured filling?
2207D - Boxed Like a Fish
Author: awang11
Preparers: awang11, IceSerpent
Analysis: awang11
Hint 1Let's first think about path graphs. For some $$$k$$$, what are the $$$n$$$ for which an $$$n$$$-path wins for Cyndaquil?
Hint 2Between every pair of Cyndaquil-winning nodes a distance of $$$k$$$ apart, all the nodes on the path between them also win. How can we find these efficiently?
Hint 3Why did we ask for only vertex $$$v$$$, and not for all nodes?
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207E1 - N-MEX (Constructive Version)
Author: awang11
Preparers: awang11, IceSerpent
Analysis: awang11
Hint 1Write some bounds for the $$$a_i$$$. What's the biggest/smallest each one can be?
Hint 2Try to pick only numbers that aren't in the $$$a_i$$$, and $$$+\infty$$$.
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207E2 - N-MEX (Counting Version)
Same credits as E1.
Hint 2There are actually a very well-constrained set of working solutions. How many times do we pick each number not present in the $$$a_i$$$?
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207F - Hanabi
Author: IceSerpent
Preparers: awang11, IceSerpent
Analysis: awang11, IceSerpent
Hint 1Think about how you'd play in the case of only one color. Once you have that, how would you do two colors?
Hint 2Each color has some sequence of clues that will get them to be played correctly. How do we coalesce them into one string of clues?
Hint 3Some rank clues must be given for all cards to be played. If two consecutive forced rank clues are for ranks $$$a, b$$$, is it ever optimal to only rank clue some of the ones between $$$a, b$$$?
Hint 4There is an $$$O(n^2)$$$ dp. How can we speed it up?
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
Remark 1As suggested by the editorial, this problem was originally about Squid Game! Until we made the round about the 2010s, that is.
Remark 2There's actually a way to do this in $$$O(nm \sqrt{nm})$$$ or faster with flows! Can you represent the problem as a flow or matching instance?
2207G - Toothless
Author: awang11
Preparer: awang11
Analysis: awang11
Hint 1Use Pigeonhole to first solve for the case of no needy cells.
Hint 2How can you adjust your solution when there are needy cells?
Hint 3The graph is planar. Recall the Euler characteristic formula.
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
Remark / ConjectureIt is open to us whether the following cheese is actually provably correct:
First attempt to fill in the cells (blind to whether they are special or not) in reading order, adding if it doesn't form a cycle.
Second attempt to fill in the cells, but with special cells first, in reading order, adding if it doesn't form a cycle.
We conjecture that one of the two always passes.
2207H1 - Bowser's Castle (Easy Version)
Author: awang11
Preparer: awang11, IceSerpent
Analysis: awang11, IceSerpent
Hint 1Use 0-1 sorting to make the structure a little simpler. What's a concise way to visualize a min max function?
Hint 2The min max function is a tree that alternates min/max across depths. Can you determine the type of the top operation?
Hint 3You will need to try a good number of schemes, but try to find a point where you can split $$$f = \min(g, h)$$$ or similar. Then, divide and conquer will win.
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
2207H2 - Bowser's Castle (Medium Version)
Same credits as H1, main solution due to 244mhq.
Hint 2Go for $$$O(n \log n)$$$; how can we optimize the previous approach?
Hint 3Determine the top node in $$$O(\log n)$$$ time.
Hint 4Scan for your split point from both ends simultaneously.
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
RemarkThe music choice across H1, H2, H3 actually follows the level of the final castle in World 8 of New Super Mario Bros Wii.
2207H3 - Bowser's Castle (Hard Version)
Same credits as H1, main solution inspired by IceSerpent and awesomeguy856.
Hint 2What is $$$f(1, \dots, n)$$$?
Hint 3If $$$t = f(1, \dots, n)$$$, then $$$x_t$$$ is the leaf at an alternating path from root (max goes right, min goes left.)
Hint 4What is $$$f(x_1, \dots, x_t, +\infty, \dots, +\infty)$$$? How does it relate to the tree structure of $$$f(x_1, \dots, x_n)$$$?
Hint 5You know the number of variables in each child of $$$f(x_1, \dots, x_t, +\infty, \dots, +\infty)$$$ and $$$f(-\infty, \dots, -\infty, x_t, \dots, x_n)$$$. Can you use these children to assemble $$$f(x_1, \dots, x_n)$$$?
Hint 6Work from the inside (two nearest pieces to $$$x_t$$$) to the outside with two pointers. How many queries do we use? The recurrence may look quite terrifying, but...
Rate the problem!
Awesome!
Okay...
I would have rather watched cricket world cup
Remark 1The solution due to awesomeguy856 and incidentally the one in contest found by ecnerwala actually uses only $$$2n$$$ queries!
Remark 2A naive entropy bound gives a lower bound of $$$n / \log n$$$ queries; can we push this to linear so our upper bound of $$$O(n)$$$ queries becomes asymptotically tight?
We apologize for the unexpectedly difficult B, but we hope you enjoyed thinking about the problems regardless!
Special thanks to Hori, nik_exists, awesomeguy856, shcal for their assistance with problems F through H3. We also acknowledge Amazed, chromate00, defnotmee, Noobish_Monk, awoo, misteg168, cduckling for sticking with us in copy-editing and improving statements up until the contest. Once again, a huge thanks to flummoxedfeline for making our round look beautiful. Without them this round wouldn't be complete.
Implementations will be added soon.