We will hold AtCoder Regular Contest 207 (Div.1).
- Contest URL: https://atcoder.jp/contests/arc207
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20251005T2100&p1=248
- Duration: 150 minutes
- Number of Tasks: 5
- Writer: camypaper
- Tester: maroonrk, snuke
- Rated range: 1600 ~ 2999
The point values will be 800-800-800-800-800.
Please note that the rules against generative AI were updated on October 3, 2025. Please make sure to read this post and the rules.
We are looking forward to your participation!








but meanwhile, down here:
so what's the true duration.
Interesting score distribution.
When you decide to participate in tonight's ARC:
Why (Do you live in Japan?* -> No) still need Date of birth* ?
Just type 10/6/2025.
I write 123123 and it is ok.
AtCoder's point values sum (×)
Another ACM-ICPC mode (√)
Imagine the easiest problem on E and the hardest on A :skull:
That one guy who has the best strat to get most points: WHY IS EVERYTHING 800 >-<
I am the opposite of that one guy :)
horrible 800
When you want to decide your order of solving problems: 800-800-800-800-800
Yet another ICPC round.
ICPC * 800.
Welp I failed. Gj to those who even did 1 Q
For D, a better way of thinking is to observe that, assume $$$n$$$ is odd, then the winner of the medium row always wins the whole game. In this way, one can naively write a simple dp to calculate the result of the medium row without any further thinking needed.
upd: this solution is not correct, we should keep the medium $$$3$$$ rows and do the dp.
On this test:
Second wins on the medium row. However, if First starts by eating a column, they can repeat whatever Second does after, and win the game.
Oh sorry, the 1 column case should take $$$3$$$ rows into consideration. We should keep the medium $$$3$$$ rows instead of $$$1$$$.
Actually I proved the $$$3$$$ row case in contest and implemented it. I naively thought this could be brought to the $$$1$$$ row case as well, but it seems not.
I reduced Problem A to the following task:
Clearly $$$w \lt n^2$$$. Since we are counting permutations, this can be converted into counting matchings in a bipartite graph between $$${a_1,a_2,\dots,a_n}$$$ and $$${0,1,2,\dots,n-1}$$$. So I place these $$$2n$$$ numbers together, sort them in nonincreasing order, and decide them one by one. I design a DP state $$$f_{i,j,k,l}$$$ meaning that after processing the first $$$i$$$ elements, there are $$$j$$$ unmatched $$$a_i$$$-type elements and $$$k$$$ unmatched index-type elements; the transitions are:
This is $$$O(n^5)$$$. However, if I record which DP states are nonzero and only perform transitions from those states, it surprisingly passes.
Does anyone know why that is? Thanks.
Submission record: https://atcoder.jp/contests/arc207/submissions/69911719
There is a relation between j and k depending on i (for non-zero), so it is n^4 states. But also n^5 can be fast enough for n <= 100
Because the variables j and k can actually be compressed into a single variable M: the number of matched pairs in the prefix.
How I solved D...
I got stucked on C and went to D.
I remembered that in the 1D version we only need to look at the (at most) $$$3$$$ characters in the middle.
Then I guessed that we also can just look at the central $$$3\times 3$$$ area in the original problem.
I submitted that algorithm but got WA.
I was disappointed. I thought my algorithm was completely wrong and hopelessly changed the area to $$$4\times 4$$$ then submitted it again.
...Then I got Accepted!
I solved D in the same way.
I knew the condition is related to the central grids, and I just took a central rectangle(the size was big enough, like $$$16 \times 16$$$) and run brute force and passed.
So can anyone prove what size of rectangle is enough?
When $$$n$$$ is even, keep the middle $$$4$$$ rows; when $$$n$$$ is odd, keep the middle $$$3$$$ rows ($$$m$$$ is same). This should be the minimal rectangle.
According to the official editorial, when exactly one of $$$n$$$ and $$$m$$$ is odd, the answer depends only on the central $$$2\times 3$$$ rectangle.
When both $$$n$$$ and $$$m$$$ are odd, if the center cell is
0or the three middle cells are010, then the second player wins. That means that answer is related to the cross in the middle, which is a central $$$3 \times 3$$$ rectangle; otherwise, by shrinking from one of the four directions to reach a situation where only one side length is odd, one finds that the central $$$2\times 3$$$ rectangle after shrinking corresponds to a contiguous subrectangle of the original central $$$3\times 3$$$ rectangle.When both $$$n$$$ and $$$m$$$ are even, we shrink from one of the four directions to obtain a one odd one even case; in that case the central $$$3\times 3$$$ rectangle after shrinking corresponds to a contiguous subrectangle of the original central $$$4\times 4$$$ rectangle.
Therefore, keeping the middle 4 rows when $$$n$$$ is even and the middle 3 rows when $$$n$$$ is odd is sufficient for this problem.
I wrote a strange solution for C and it got AC.Can anybody tell me why the probability of WA is sufficiently low?
Here is the code:
For Problem C, I have a solution with a superior time complexity of O(n log V), where V represents the value range, which is more efficient than the one provided in the Editorial. For details, please refer to: https://atcoder.jp/contests/arc207/submissions/69905415
Hello.
In line 44,
if (f[j - 1] > t[j] && f[j - 1] <= (t[j] | a[i])). Why you addf[j - 1] > t[j]? :thinking:After testing, i found that remove
f[j - 1] > t[j]still can pass.You're absolutely right. This really isn't necessary. The reason I did it this way is that I initially used a set to maintain 'mx' in a complicated manner, but later removed it.
In problem B, I wrote a brute-force to get an answer from 2 to 8. And I find it can be solved by bipartite graph.
It could be less rating critera
In problem C, I used a very simple approach: let $$$f_i$$$ denote the length of the longest non-decreasing subsequence ending at $$$i$$$, and $$$g_i$$$ denote the minimum value of the last segment in such a subsequence. Then, I performed direct transitions using binary search. This solution passed all test cases, and I want to ask about the correctness of this approach.
Code
It's even $O(n\log n)$,by using Sparse Table.