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

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

Hi everyone!

The second round of COCI will be held tomorrow, December 3rd 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 dorijanlendvaj, ppavic, Bartol, mkisic, mlicul and me.

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

Hope to see you and good luck!

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

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

Looking forward to trying interesting problems and not being able to solve any :D

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

Good luck to everyone participating including me :)

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

Reminder: the contest starts in one hour.

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

I didn t receive confirmation e mail. Any problem with the server ?

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

    I am not certain, I do not have the authority to check that, but I asked and are waiting for responce.

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

How to solve E? I guess it should be solved with euler's formula...

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

    I thought the same but it led me nowhere. Commenting so that if anyone posts solution i'll be notified.

    • »
      »
      »
      17 месяцев назад, # ^ |
      Rev. 2   Проголосовать: нравится +31 Проголосовать: не нравится

      Hi, author here, the solution goes as following:

      Yes indeed, we can use the Euler characteristic of the surface, mainly $$$V - E + F = 2 - 2g$$$ where $$$g$$$ is the number of holes. Now we have to count $$$V$$$, $$$E$$$ and $$$F$$$. To count $$$F$$$ we can simply do a dfs on the faces, marking each face we visit. The number of visited nodes is exactly $$$F$$$. Because each face has degree exactly $$$4$$$, by the handshaking lemma $$$E = 2F$$$.

      The trickiest part is counting the vertices. For each face you can actually calculate the degrees of the four vertices forming the side. Let's say you are trying to calculate the degree of the left vertex of the edge you are pointing at. You can mark the current face and start a "left cycle" until you return to the marked face. The number of faces you visit is exactly the degree of the vertex, you can easily see this by "flattening" out the part around that vertex, it essentially looks like a flower with either $$$3$$$, $$$4$$$ or $$$5$$$ petals. Now you can easily infer the total number of vertices and then the total number of holes!

»
17 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I got only 13/50 points on Tramvaji, how to get all 50 points?

  • »
    »
    17 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится -6 Проголосовать: не нравится
    My approach
  • »
    »
    17 месяцев назад, # ^ |
      Проголосовать: нравится +15 Проголосовать: не нравится

    Let's call a[i] the distance from station 1 to station i. When Patrik says something on query i you assign integer T to a[i+1]. If it is Josip, then you assign a[y]+T to a[i+1]. This always works because when you reach query i, you have already found the answer for all indices 1 through i. Now to find the shortest path you have to see which two consecutive stations have the shortest distance between each other

»
17 месяцев назад, # |
Rev. 6   Проголосовать: нравится -8 Проголосовать: не нравится

The contest has ended! I scored 120 in total. Here's my approach homemade editorial for "Ekspert".

Approach for Subtask 1
Approach for Subtask 2
Approach for Subtask 3
  • »
    »
    17 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    "We don't need too much thinking to do this."

    Funny enough, your approach for Subtask 1 is wrong, I think you thought $$$C$$$ $$$C$$$ $$$D$$$.

    Btw, I liked problem Ekspert so much! So happy I solved it during contest.

  • »
    »
    17 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    How does this work for subtask one? x<=50 and y<=50 means xy<=2500. Btw I solved first two subtasks. My method is that xy<=10⁴so always one of them is smaller than or equal to 100. So depending on which of x or y is smaller you can keep adding them to C

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

      Wait it was that both x and y are equal or less than 50? I thought it was $$$x \cdot y \le 50$$$ I think I'm blind ;-;

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

        No I guess I'm the blinnd one. I first read the second subtask x,y<=10^4 then I noticed it was a multiplication dot. Probably the same happened here

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

How to solve "Lampice"? Thanks!

  • »
    »
    17 месяцев назад, # ^ |
      Проголосовать: нравится +18 Проголосовать: не нравится
    My approach
»
17 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi, how can I see problems?

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

Great contest for me! I managed to get 200

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

Hints for Prijateljice? Seems like it is not too hard according to the number of solve in the leaderboard. I thought of some dp but it leads to nowhere. Thanks~!

  • »
    »
    17 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится
    Hint
  • »
    »
    17 месяцев назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    do $$$dp[n+m]$$$ where $$$dp[i] = true$$$ if the guy who has $$$i$$$'th smallest string wins by starting with $$$i$$$'th smallest string, $$$dp[i] = false$$$ otherwise.

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

    The basis of "game DP" kind of problem is "If you can reach a losing state, then it's a winning state. Vice-versa, if you can only reach winning states, then it's a losing state".

    Let $$$dp[i] = true/false$$$ be whether this is a winning word. We want to check the $$$dp$$$ all words that can immediately follow word $$$i$$$. There are two ways:

    • The reachable words on the opponent's side forms a continuous range of sorted words.

    • We only check three words: (1) the opponent's immediate larger word starting with the same letter, (2) the opponent's largest word starting with the next letter, (3) the opponent's smallest word starting with the next letter

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

When will we be able to upsolve the problems? Thanks!

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

Why were the last three problems (Lampice, Prijateljice, Kruhologija) not sorted alphabetically by their names as stated in https://hsin.hr/honi/pravila.html ?

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

    For this round, we made an exception. Croatian version of the contest HONI is made for elementary and high school students. We did not want the younger contestants to get stuck on reading the interactive problem because they probably did not see that type of problem before.

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

Could you please make it possible for us to upsolve the contest? vito1036