Introduction
It’s the problem list of 01/22/2026 class, about construct problem, that’s a tricky part in OI, know we will see some.
A - QOJ-4913 子集匹配
Transfer problem statement:
: All subset which exactly have ones.
: All subset which exactly have ones.
One edge from to equal to change a 1-node in to 0 then equal to .
This problem require different cannot contact same .
Construct Idea:
let 1 equal to add 1 and 0 equal to minus 1.
then find the max position of prefix sum.
flip 0&1 in position .
Prove: Why it is a injection?
assumpted there is a mapped same with .
we can find that have places which or is but now is , so must have ones, it’s not satisfy difinition of , so this mapping must be a injection.
Good problem, it’s take me 1 day to understand.
B - Adjacent Difference
For this kind of construction problem, we can try to solve it using some special subtask.
If this matrix just have 0/1, and equal to , how to modify it? It’s not difficult to find that answer must be below form:
010 | 101101 | 010010 | 101We can calculate answer in each situation, get the mininum. Then try to expand this special solution to whole problem. We can enumerate a then difine odd and even be below rules:
Using above solution, time complexity is .
C - Make SYSU Great Again II
We call the cell which:
- is Black Cell.
- is White Cell.
So we need promise the bitwise and value of each close Black and White cell equal to 0. Then we can start our constructing.
First we have below guess:
- Assign unique number in Black Cell.
- Then put avaliable number in White Cell.
We need find a way to calculate the number in cell quickly.
For black cell:
high bits = gray( (i + j) / 2 )low bits = gray( (i - j + (n-1)) / 2 )
value = (high << K) | lowYou can proove that different cell map different gray code number.
Maybe four neighbors can generate at most 4 same number, and add one of black cell, at most 5 same number, statisfy the problem requirement.
D - Tournament Construction
According to the Landau theorem, we sort the original sequence and define as representing a graph of size with vertices and edges .
According to the theorem, always holds true.
We enumerate and the state at . If is feasible, then is also feasible.
We also record at this point.
This allows us to construct the original out-degree sequence.
Let the out-degree sequence established in step 1 be , and the one established in step 2 be . First, assume , and all edges are in the direction . Then .
Each time, find a triple such that , and there exist edges and .
In this way, we can reverse these two edges, achieving the effect that .
By continuously repeating the above steps, u can gradually approach d, eventually becoming exactly the same.
E - LGP10441 [JOIST 2024] 乒乓球 / Table Tennis
We have a classic conclusion: the struction of tournament just depend on in-degree array, and triple circle will add one more when we change a pair to .
So we can use this to construct it.
Find the smallest which can statisfy the maximum triple circle less than , then change the triple circle quantity on it.