Блог пользователя ToniB

Автор ToniB, история, 16 месяцев назад, По-английски

Hi everyone!

The third round of COCI will be held tomorrow, December 7th at 14:00 UTC. You can access the judging system here. If you are not familiar with the COCI contest format, we encourage you to read the announcement.

The round was prepared by keko37, cel.in, fbabic, vito1036, psruk, mkisic and me.

Feel free to discuss the problems in the comment section after the contest ends.

Hope to see you tomorrow!

  • Проголосовать: нравится
  • +41
  • Проголосовать: не нравится

»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

MY FAVORITE OLYMPIAD!!!! I LOVE CROATIA!!

»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

how difficult are the problems?

»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

for Karte I have a code but im not sure it should work

code

I always take the M cards however there can be a case where one of the M cards is completely useless and dosent do a combo with any other card and thus is never optimal to take

»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

How to solve E?

  • »
    »
    16 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Let's call the elements added in a query a block. For each block create a segment tree where values in the nodes are the positions of the minimum in the range that that node covers. Construction for each block is $$$x_i - 1$$$ queries. You will find the minimum by doing divide and conquer on the blocks in similar fashion. When you find a minimum and remove it from its block you will need to recalculate the tree which will take at most $$$\log_2{x_i}$$$ queries. I also added memoization in my code just in case.

    Rough estimate of the number of queries in the worst case: $$$2000 + 40 \cdot \log_2{2000} + 40 \cdot \log_2{40} \leq 2700$$$.

    My implementation(it can be done much better, I know)
»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

Image of clarification

Why is it not specified whether the grader is adaptive or not?? I believe it is very important for a question like this since randomized solution could exist. In fact, I think the grader is not adaptive because my solution is randomized (using quick select), and it obtained 75 points. If the grader was adaptive, my solution would probably have gotten 15/0 points. If someone decided not to implement his randomized algorithm because he assumed the grader is adaptive, it would have cost the person a lot of points.

  • »
    »
    16 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится -10 Проголосовать: не нравится

    Hi, the grader is not adaptive, and you are right.

    I didn’t include it in the statement because I didn’t anticipate that a solution could pass under much tighter constraints using quickselect. The intended solutions for each subtask are entirely deterministic.

    Normally I would assume the grader is adaptive if not specified, but the assumption would've been wrong here. We apologize for the inconvenience.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is coci happening this year?