由于某种原因,我藏起来了原来自己写的中文题解。需要的同学可以私信我。
Feeling pretty good about this game, ah, got the questions roughly filled in.
Gave a quality scoring system of my own:
Scoring - Defense - Milk Dragon - okay - smart - -Goddess - can’t make it up
Will only rate questions that I don’t find that easy. It’s important to note that mending not moving doesn’t mean it’s any more godly than a godly question.
For example, many Ynoi questions I would consider to be scored and mended.
Problem A. Build a Computer
Build an automaton that recognizes all the numbers in .
. The number of automaton points does not exceed .
Score: milky dragon.
If you’ve studied a bit of automata theory, you know to go ahead and build a trie first, and merge two trie nodes if they both get the same state by going the same way. Just maintain it with a tree hash.
It’s even done with minimal nodes.
Problem B. Concave Hull
Find the concave bag with the largest area.
.
Score: milking the dragon.
Feel like I’m sugar pilling.
You start by building a convex bag for all the points, and another convex bag for the points that are not on the convex bag. Then the concave bag must be shaped like with an edge cut out plus a point at .
Scan the line for the edge of and double pointer to to deduct the point with the smallest area.
Problem C. Giving Directions in Harbin
Simulation.
Problem D. A Simple String Problem
Find the longest string in a grid of characters , each time the path goes down or right.
.
Score: Clever.
Consider the case, where the solution is to enumerate and then chunk it with as the block length. Just do lcp and lcs.
Then the case of is similar. Enumerate and chunk by and you’re done.
Time complexity: .
Problem E. Marble Race
Given a table of numbers. Guarantee that is odd. Take one at random from each row and find the expectation of the median.
.
Score: Clever.
Enumerate , treating as and as . Just consider how many cases there are where more than are selected.
It can be straightforward to dp or generate a function assuming there are and in the th row. The answer is .
Consider that only the pair changes as changes. So it’s straightforward to do the polynomial division and multiply back the complexity.
Time complexity: .
Problem F. 1D Galaxy
Score: complementary immobility.
Problem G. Welcome to Join thr Online Meeting
Direct dfs is fine.
Problem H. Subsequence Counting
Define to be a sequence of denoting numbers stitched together. Let .
Define to satisfy . Find the number of neutron sequences that are .
, , , .
Score: gods.
Suppose .
You first write it in matrix multiplication form, then we are asking for . where is composed of a number of consecutive segments.
Remember the form . Consider applying an Euclidean-like form.
- If . We invert in all but the first place to get . Then there is clearly .
- Instead, we can divide these things into segments and stack them to form a rectangle of rows and columns. Then is actually some sort of sequential right-multiplication of the entire column. So if we can find the composition of each column’s consecutive segments we have . Here the process of finding each column of consecutive segments is easy to maintain using a line tree. Easy to state: .
Time complexity: . Constant is extremely small.
Problem I. A Brand New Geomatric Problem
Given a reproducible set , you can perform two operations:
- Delete a number;
- add a number;
Given and . Find the minimum operand.
, .
RATING: Godsend.
We need only consider for all factors of .
First can be pushed out through and we leave it at that.
You find out that the burst search is actually quick for when it’s larger. But can be very slow when it contains a lot of small numbers like .
So, we do a dp on part of the line, for part of the explosion search will be very fast.
Time complexity: .
Problem J. New Energy Vehicles
Score: not bad.
Greedy for a bit.
Problem K. Farm Management
Rating: okay.
Greed is gone.
Problem L. A Game On Tree
dfs Gone in two swipes.
Problem M. Weird Ceiling
Check in.