Hi everyone!
The fourth round of COCI will be held tomorrow, February 11th at 14:00 UTC. You can access the judging system here. If you are not familiar with COCI contest format, we encourage you to read the announcement.
The round was prepared by ppavic, jklepec, Gabrijel, mlicul and me.
Feel free to discuss the problems in the comment section after the contest ends.
Hope to see you and good luck!
Good competition to join
Reminder: the contest starts in one hour.
please delay, It's clashing with turkish competitors travel back to home from OI Training Camp
He is right.
+1, Please delay it. I can't partipicate from a bus.
Me 2
+1 Please delay it , i can not participate from bus
I cannot even solve NP problems from bus, how can I solve COCI from bus.
If you will compete Formatci I will compete too. Please detay the contest!..
This challange would be amazing. Please delay...
Sorry I did not see the message on time. :((
Are there any prizes in this contest?
Unfortunately, no prizes.
how to solve D ?
Parallel binary search.
We are going to use parallel binary search.
For each query, we need to check if we can make all edges on the path $$$>= x$$$ within given budget or not. We can classify edges in the path into three types
1) The current speed $$$v$$$ $$$>=$$$ $$$x$$$
2) $$$v < x$$$ but upgraded speed $$$s$$$ $$$>=$$$ $$$x$$$
3) The upgraded speed $$$s$$$ $$$<$$$ $$$x$$$
We can see that we do not have to consider edge of type 1) and the budget required is just summation of type 2 edges in the path. For edge of type 3, we just need to check their existences in the path.
All the operations are supported by HLD or euler tour tree. (We only need to find sum in the path.)
So for each phase of parallel binary search, we can sort the event by the initial speed and upgraded speed. Maintain the sum of only type 2 edges and existence of type 3 edges on the path.
The time complexity is $$$O((n+q)log(n)log(MAX))$$$
You can check my code for more details. Code
There is also an $$$O((n+q)\log{}n)$$$ solution with Parallel Binary Search on Persistent Segment Tree.
You can practice the same technique on this problem
could you share a source code please ?
code
Note: I haven't submitted this code during the contest, so I'm not sure if it is bug free or not. Works on samples.
Thanks !!
How to solve B?
Could you please make it possible for us to upsolve the contest? vito1036
It should become available during this week. Sorry for the late reply.
The round can be uspolved now on this link under HONI/2023/4.kolo
I got 226! Best score in COCI for me so far
when will the round be available to upsolve ?
How to solve C ?
how to solve the task c*
The tests in Mreza were so good! My solution with heavy path decomposition failed the last test on every subtask:)))) Very nice round though.
Every morning I go to link COCI to see solutions of the contest #4 published but unfortunately it not. When will solutions published of contest #4?!?!
The solutions are finished for a few days already, I was not aware that they are not published. I will check why they are not published.
They are published now! :)
sorry for inconvenience
🤣👉🤡
don't be too absurd