Sort from largest to smallest, with answers shaped like: (\dots,a_5,a_3,a_1,a_2,a_4\dots).
Problem B. Binary Arrays and Sliding Sums
Score: 6/7;
Assume that d=\gcd(n,k) is a group that divides the ring into \dfrac nd groups. Call the corresponding positions within a group identical (i.e., all 0 or all 1) to be of the same class of bits.
We find that two b are identical if different classes of bits are identical and there are the same number of 0/1 similar bits. We conclude that the above case must also be satisfied for two b to be identical (since we can infer from b_i,b_{i+1} that the difference between two numbers with k neighboring differences).
We enumerate the number of similar bits, and the answer can be \mathcal O(d) calculated. You need to apply some basic combinatorial constants to \mathcal O(1) the solution.
Problem C. Counting Hamiltonian Cycles
Score: 7/8;
Consider i\to i+1 that has been passed through \max (1,left_i-right_i) at least once. where left_i,right_i denotes the number of \texttt{B},\texttt{W} in [1,n], i.e., s_i=left_i-right_i.
Maintaining the current set of chains from front to back, then consider the effect of adding a \texttt{B}:
If s_{i-1}>0, then it is equivalent to one more \texttt B chain.
If s_{i}=0, it is equivalent to being able to receive either the head or the tail of the current chain.
If s_{i}<0, then it is equivalent to letting the two chains fit together.
Considering an undirected graph would introduce some duplication, so consider a directed graph, and answer /2.
Problem D. Distance Parities
Score: 5/7;
Join the i,j edges of s_{i,j}=1. Determine if for each s_{i,j}=0 there exists a k such that s_{i,k}=s_{j,k}=1 that is.
Problem E. Excellent XOR Problem
Score: 3/5;
If the overall \text{XOR} is not 0 it is done.
Otherwise, judging whether a prefix-suffix can be divided is done.
Problem F. F*** 3-Colorable Graphs
Score: 5/7;
Connect at least two edges. (Otherwise if there is only one (u,v), coloring u to color 1, the left part of the original graph to color 2, and the right part to color 3 does not satisfy) We only need to construct K_4.
If there exists u,v\in \textbf{L},p,q\in\textbf{R} and (u,p),(u,q),(v,p),(v,q)\in\textbf E then it can be solved 2 times.
Otherwise, since there is necessarily a 3- chain of connectivity, it can be solved 3 times.
Problem G. Graph Problem With Small \bm{n}
Score: 6.5/6;
Suppose f_{S} denotes the set of possible final endpoints starting from 1 and having passed the set of points S. The complexity of finding f_S directly is \mathcal O(2^nn).
Consider the Hamiltonian of i\to j, then enumerating the set of points S for i\to 1, 1\to j should be U/S. This is equivalent to asking if there are two sets of i,j that merge into U. We can do \mathcal O(\dfrac{2^nn^2}{\omega}) by putting it in bitset.
Problem H. Help Me to Get This Published
Rating: 9/10;
Thesis Question.
The K_n side staining of a first heterochromatic triangle is called: Gray staining. The sufficient property about the heterochromatic degree d(n) of Gry's staining was only unearthed through this question. Thanks to Anton Trygub.
[Property 1] In Glay staining, if the number of colors \geq 3, there must be a disjunctive graph of color sheets.
The proof is simple and left to the reader.
Assume later that color a is disjoint and that A is any connected branch of a. Assume below that c(u,v) denotes the color of the u,v edge.
[Property 2] In Glay coloring, suppose u,v\in A,w\not\in A, then c(u,w)=c(v,w).
Proof: if c(u,v)=a because c(u,w),c(v,w)\not =a (otherwise w\in A) then it follows that c(u,w)=c(v,w). Since A is a connected branch of a, the conclusion holds.
[Property 3] In Glay coloring, \sum \dfrac{1}{2^{d(u)}}\geq 1.
PROOF: Generalize to n if n\leq3 is obvious.
If there are only fewer than or equal to 2 colors in the graph, then \sum \dfrac{1}{2^{d(u)}}\geq \dfrac n4\geq 1.
If there are more than or equal to 3 colors in the graph, then by [Property 1], take A and assume that k is the number of distinct numbers in c(u,w) (u\in A,w\not\in A), then:
If A is reduced to a point, by induction there is: \sum_{u\not\in A} \dfrac{1}{2^{d(u)}}+\dfrac{1}{2^k}\geq 1.
If we look only inside A, by induction: \sum _{u\in A} \dfrac{1}{2^{d_A(u)}}\geq 1.
This is a sufficient condition for the sequence of Gladius numbers to be legal.
Proof: Notice that the number of different colors of k edges to 1\sim k-1 cannot exceed d(k-1), and it is sufficient to use [Conclusion 3] for subgraphs of k\sim n.
The construction is roughly the same as staining the n-1 grays, pulling out any i, cloning i to an i', and then adjusting the color between i,i' can be done to one of the two:
In this problem, dp is designed according to Property 5, and f_{i,j,k} denotes the current number of points enumerated to i, the j points already used, and the current number of programs for [\sum 2^{i-d(u)}]=k. Can do \mathcal O(n^4).
Problem I. Increasing Grid
Scoring: 5/7;
Clearly a_{i,j}\in\{i+j-1,i+j\}, we label the former red and the latter blue, then for the partition line dp that is.
Problem J. Jewel of Data Structure Problems
Score: 6/6;
Notice that the answers are between -1,n-2,n-1,n.
If the current permutation is 1,2,\dots,n, then the answer is -1;
If the current permutation is legal, the answer is n;
If everyone's contribution to the reverse-ordered pair is even, the answer is n-2;
Otherwise the answer is n-1.
The parity of a reverse-order pair is equivalent to the parity of n-cycle, where cycle is the number of cycles of p.
The parity of each individual's contribution to the reverse-ordered pair is the parity of i-p_i.
This allows for linearity.
Problem K. King of Swapping
Score: 4/5;
Legitimate equivalence to the original graph strong connectivity.
Problem L. Least Annoying Constructive Problem.
Score: 7/8;
If n is even, then it is sufficient to construct n perfect matches as in K_n.
If n is odd, it is also correct to isolate a point for perfect matching.
Problem M. Most Annoying Constructive Problem
Score: 10/5;
The problem is, as the name suggests, annoying.
It can be shown that there are more than [\dfrac{n-1}2] non-trivial even segments.
Then it's followed by an inductive construction, which I don't quite understand.
Problem N. No Zero-Sum Subsegment
Score: 7/8;
A very annoying question.
Consider prefix sums, equivalent to a,b,c,d jumps in the -2,-1,1,2 direction, requiring a scheme that cannot pass through duplicate points.
Consider how you can depart:
Depart using k pieces of -2, 1 pieces of -1, and k+1 pieces of +2;
Use k pieces of -2, 1 pieces of 1, and k pieces of +2.
The same thing happens at the end.
The middle walk is necessarily:
These combinations can be counted quickly by combining numbers.
We just need to enumerate roughly 4 cases to do the math.