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

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

Hi everyone!

The 19th season of COCI is starting soon! The first round will be held tomorrow, October 5th 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 jklepec, Agnus, cel.in, fbabic, mlicul and me.

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

Hope to see you tomorrow!

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

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

What happened to vito1036

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

is it clashing with meta hacker cup

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

I know you guys are busy and everything but on the announcement page the years for the previous 2 seasons are wrong and the current contest page says 2023/2024

good luck on the contest)

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

Hey, its clashing with Meta Hacker cup. Can the coci contest be shifted to another time?

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

How to solve Učiteljica?

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

    What I did in contest was like this: try to calculate how many good subarrays we have ending in each r (right end), for increasing r. To do that, for every nonempty mask of {1, 2, ..., k} I try to see how many indexes i <= r have no values that occur some frequency that is part of mask. With these, the answer is just calculated by principle of inclusion-exclusion: r minus the number of subarrays not having some frequency i plus the number of subarrays not having the frequencies i and j and so on. Now, for every mask I try to keep some v[i] = the number of good values (that is, with frequency in mask) for subarray [i..r]. When moving from r — 1 to r, we must update some v[i] values. Well, let's look, from right to left, at the positions of the value a[r] (since only its frequency changes): let them be p[1] = r, p[2], p[3], and so on. Considering some frequency f (and the masks containing it), we can see how all i between p[f + 1] + 1 and p[f] considered the value a[r] as bad before (since it had frequency f — 1 and we are looking for r) and now consider it good, while all i between p[f + 2] + 1 and p[f + 1] considered this value as good before and now consider it as bad (for frequency f, since it now has frequency f + 1). So we can use a lazy segtree to put some +1 and -1 on these ranges, and then query how many 0s we have, which is actually equivalent to asking about what is the minimum value and what is its frequency. This works in something around 2^(k — 1) * k * N * logN, which passed without having to optimize stuff.

    code (it is written in contest so it isn't really nice to read but maybe it is helpful): https://pastebin.com/jEnKEWHU

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

When we can upsolve the problems, if we can, how? It seems I am unable to submit any code?

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

Why does it take so long to publish the results?

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

The editorial has the same problem title twice)