Hello Codeforces!

I am pleased to invite you to participate in 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams), which will be held on Nov/16/2025 04:50 (Moscow time). This is an online mirror contest for the 2025 ICPC Asia Taichung Regional Contest. The duration of the contest will be 5 hours and the contest is best for teams of three people. The mirror will use the ICPC format.
We have an excellent judge team (Regional Contest Director Ling-Ju Hung, Chief Judge Peter Rossmanith, baluteshih, henotrix, ToxicPie9, marmot0814, kasuistry, cthbst, leo900807, olmrgcsi, hank55663, alan8585, waynetuinfor, CindyLinz, samsam2310, ltf0501, LFsWang, Jeffrey, tmt514), outstanding task authors not from the judges (for both the preliminary contest and the regional: Jinn-Shyong Yang, Shik, smallbird, Shenghui Chen, Kuroni), and strong tester teams (nikilrselvam, Vince729, applepi216, qq11123334, LiuYun40066, SorahISA, -1e11, rgnerdplayer, 2qbingxuan) this year! The judges greatly appreciate the testers for their valuable feedback!
Last but not least, we would like to give a big shout-out and express our gratitude to MikeMirzayanov for creating the incredible Codeforces platform, and to Mike and Vladosiya for all their support in making this online mirror contest possible!
On behalf of the 2025 ICPC Asia Taichung Regional Contest Judge Team (with Regional Contest Director Ling-Ju Hung, Chief Judge Peter Rossmanith), we hope you enjoy this contest and have fun!
Of course, this contest will be unrated.
For more information about the regional contest, please see the contest website. There will also be live streams!
UPDATE: The contest will be postponed for 15 minutes as the contestants are still entering the contest hall. We are very sorry for the delay.
UPDATE2: The full list of the judge teams, task authors, and the tester teams are up! We will upload solution hints in the next few days, please stay tuned :)
UPDATE3: We have a YouTube playlist covering solutions to most problems. Solution hint documents will be updated soon.









Auto comment: topic has been updated by tmt514 (previous revision, new revision, compare).
orz
Didn't liked it
Auto comment: topic has been updated by tmt514 (previous revision, new revision, compare).
Maybe the most educational and probably-widely-solvable problem is L, unfortunately I don't know how to solve it.
Half of today's problems are easy to solve but interesting, so I love it.
J is also interesting btw
Any hints for J ?
dsu + prefix sum
could you elaborate further please?
Considering enumerating all the layers from the bottom to the top, you'll find that different columns merges in a decreasing order of height of the walls, and tiles disappears in an increasing order of height of the columns. In all connected components, all the existing tiles are aligned to the right.
When at some column, a tile exists from the $$$i$$$-th second to the $$$j$$$-th second (inclusive), then if you only consider the total sum, it's equivalent to subtract $$$i$$$ and add $$$(j+1)$$$ at this column. Use prefix sum to optimize this procedure.
Honestly I'm surprised by how few solves there are for J. Here's a very simple solution. You first imagine that blocks fall towards the right. You go left to right and maintain a map as follows:
map[y]is the difference between the number of blocks in row at height $$$y$$$ versus row at height $$$y-1$$$ (basically a sparse difference array). So, to add a column you simply add value $$$1$$$ at $$$0$$$ and subtract $$$1$$$ ata[i]. Then you must remove the values from the map up toh[i]. You do this by just traversing the map from the beginning, removing values, and adding them to another difference array, swapping x and y coordinates. Implementation: 356265068I solved it yesterday and I'm pleasant to give a hint.
If R= $$$1$$$,B= $$$0$$$,let $$$t_i=s_{i-1}\oplus s_i$$$.Then the answer is the number of 1 in $$$t$$$.
Hoping that is helpful.
Auto comment: topic has been updated by tmt514 (previous revision, new revision, compare).
Auto comment: topic has been updated by tmt514 (previous revision, new revision, compare).
Solution hints https://www.youtube.com/live/HtTNcNqn76Q
Is there have any answer?
The link of above comment have rough discussion for each problem
How to solve H?
On a high level view it is brute force in 8 different directions and record the counts in a hash table. Then for each direction, suppose it has a length L, we can't directly recompute as it would result in L^2, so we have to design a finite-state-machine to record the previous operation/sum/current sum/etc along with some conditional flows.
It's K, not H bro
Auto comment: topic has been updated by tmt514 (previous revision, new revision, compare).
good E ^^;
would you provide tutorial?
$$$O\left(n\log\left(n\right)\right)$$$ solution for L: 350131602
https://cses.fi/problemset/task/3402
Constant factor is really slow though which is why its slower than the fast $$$O\left(n^2\right)$$$ solutions.
I didn't saw the L task, but if it's similar to cses task, you can do lazy deletion using priority queue.
Cool.Thanks for sharing.
Problem J Editorial, it was mentioned that we can use segment tree to maintain the segment value and frequncy.
How to implement it, do we maintain map in each node?
can someone share problem L solution
wonderful F question , after i understood that pref suff logic