Hello again Codeforces 👋,
We are excited to invite you to TOKI Regular Open Contest #24!
Key details:
- Contest link: TLX
- Time: 18th December 2021, 13:05 UTC
- Writers: errorgorn, maomao90, oolimry
- Duration: 150 minutes
- Problems: 7, but one of the problems will have a subtask
- Scoring distribution: 100 — 200 — 400 — 600 — (600 + 200) — 900 — 1000
Many thanks to:
- prabowo 👨❤️💋👨 for 🕒 coordinating the 👦🌷 contest and translating our 💰🅱 stupid 😕💩 jokes into ➡ Indonesian 🇮🇩.
- icypiggy for helping 💻 us 🅱👍 to prepare testdata.
- Our 💩🏽 army of 😫👩 testers dantoh, tqbfjotld, -rs-, jamessngg, iLoveIOI, pavement for testing the problems and
making us delete a problem 😡🤬giving useful feedback 🥰😇. - hocky for drawing beautiful diagrams 👌😍 for our problems.
- fushar for the wonderful 🌈 TLX platform and fixing TLX after 🔜💯 we 😀👦 broke it multiple times.
Please 😩 register for 👍 the 🚪🅱 contest, and we hope you will 😘 enjoy 😋💋 the contest! Good 👌 luck 😄 have 😏😝 fun!
P.S. Please note ✏️📔 the unusual 🤪 duration 🕐⏱️🕝 I recommend 👍 not reading 🙈📖 all the problems 💀💀 to lose rating❗❗
UPD: contest is over! (no more emoji spam sadly)
Congratulations to our top 5:
Congratulations to our first solvers:
Rating has been updated.
You can upsolve the problems here.
Editorial is available in the upsolve link.
Thank you for participating and see you in the next contest!
😱😱😱😱
Please consider adding rust to the list of available languages
We have just added Rust 2021 support. Please do try it out. Looking forward to your participation!
Thanks. I'll try to
I am consistently getting weird compilation errors. I was able to get one submission through, but all others are CE, supposedly due to internal compiler problem. Are you sure about that linker option?
We apologize for the compilation errors in Rust. Looks like we have not tested this new language thoroughly. For now, please use a different language.
I asked Snark about what commands are used to run rust in OpenCup, will get back to you with reply
"finally a TROC round"
"finally a TROC round"
"finally a TROC round"
"finally a TROC round"
What a unique TROC!!! Authors are Singaporean and there are subtasks too? WOW!!!! It isnt something you can see a lot on TROCs these days. Looking forward to joining this special contest. :)
C++20 support when
I got CE on TLX when i was using lambdas because of this :(
now 😎
:o
I think the contest will clash with CF education round.
I hope there are survivors.
you really lack hoping skills
errorgorn Can you please try to avoid the collision between Educational round 119 and this contest by preponing or postponing this round?
yea I have talked with the edu round setters and they are willing to postpone edu round 119 :)
so TROC 24 will remain at the same time
I think the time schedule is still not very good. A 2hr contest right after another 2.30hr contest. No time for discussion.
The problemset is very interesting. thx
I guess I'll just write on how I generated the testdata for problems D and E since I think they are quite interesting. I will not write it on the editorial since prabowo will have to translate this entire chunk of text into Indonesian.
Here is the strategy for generating testdata for D. Notice that if we have an even number of rows, we can generate a "snake".
So, we can combine $$$4$$$ snakes to create a loop.
But, such generation only allows us to use certain values as our missing point. So I tried something else. We make concentric loop around the grid that wraps around the point as shown below.
Then, now we want to make the loops more unorganised, so we perform double edge flips.
After performing all these flips, we are guaranteed to have a bunch of cycles, we can just try to do double edge flips on different components. This may sometimes not work, so we will run this randomisation until the entire loop is connected.
Here are some examples of our (pretty) testcases.
For problem E, there were 2 main ways to create testdata, I will only discuss the method of generation that made a loop on the grid. We make some spanning tree on the grid, then we make our ninjas follow that line.
The spanning tree is in red and the path the ninjas take is in blue.
Here are some example testcases (the blue line is the initial line of ninjas).
We can also extend this ideas and force holes in our spanning trees.
You can see the implementations here
for problem C , can someone explain if this greedy approach works : Taking always the leftmost 1 that minimises the resulting number of inversions or the rightmost 0 that minimises the resulting number of inversions , and in tie we take anyone.
There isnt a nice way to explain why this doesnt other than providing a counter case.
Countercase: $$$S=\texttt{101100}, K=2$$$ Changing $$$S[1]=\texttt{0}$$$ and $$$S[6]=\texttt{1}$$$ both reduced the inversion count by $$$3$$$ so according to the greedy strategy, both is fine.
However, if we do $$$\texttt{101100} \to \texttt{001100} \to \texttt{000100}$$$ and get inversion count $$$2$$$. But the minimum inversion count is actually $$$1$$$.