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

Автор paula, история, 4 года назад, По-английски

Hi everyone!

The 15th season of COCI is starting soon! If you are not familiar with COCI contest format, we encourage you to read the announcement. The biggest news this season is the new judging system and full feedback! You can access the judging system here. There you can also find problems from the previous seasons.

The first round will be held this Saturday, October 17th at 14:00 UTC. The round was prepared by Gabrijel, mkisic, pavkal5, satja, stjepanp, dpaleka and me.

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

Hope to see you on Saturday!

(We are aware that the round overlaps with Codeforces Raif Round 1, but the time sadly cannot be changed. Sorry about that.)

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

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

Expected difficulty? CF Div1 or 2 or 1.5?

  • »
    »
    4 года назад, # ^ |
    Rev. 3   Проголосовать: нравится +68 Проголосовать: не нравится

    It should be somewhere between CF Div. 1 and Div. 2. You can also check out last year's problems and solutions here to get a feeling for the difficulty.

    Keep in mind that the last three problems are worth the same number of points, and are sorted alphabetically, not by difficulty. But, they have different difficulties. This is to train our students to recognise easier and harder problems, a useful skill for IOI and similar contests.

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

Friendly reminder: the contest starts in one three hours.

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

Will be there editorial ? How to solve Bajka and Papričice ? I got partial points only (20,50).

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

Was there some registration deadline? when I was late for an hour there wasn’t an active event in the UI..

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

    I'm sorry you missed it :(. Registration was open until 14:10 UTC (10 minutes into the contest).

»
4 года назад, # |
Rev. 4   Проголосовать: нравится +23 Проголосовать: не нравится

can anyone give a good test case for Patkice?

my idea was to check N,E,S,W from 'o' then check the path that leads to 'x' then to add the start direction and the distance/steps taken in an array or else if the path leads to '.' then add 1e6 to the array with the start direction, then sort the array of four elements if they have equal distances then sort them with smallest(direction('N','E','W','S')-'A') .

my code doesn't seems to work or i'm missing something ... my code works on sample cases but fails on real tests (0) :(

my code

or is there a way to download the test data paula?

Thank you.

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

    One bug I faced in contest was that I didn't account for the case where the current pushed me back to the initial island (o). Maybe you have a similar bug?

    Edit

    It does seem to have a similar bug. Try this case:

    4 10
    ..........
    .vo>>>>>x.
    .>^.......
    ..........
    
    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +18 Проголосовать: не нравится

      OHH(face palming).. thank you so much . i'm so dumb because i spent so much time on this problem figuring why my solution doesn't work... That was the bug. got accepted 50/50. once again thank you socho.

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

The editorial is published! link

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

How to prove |S(y) − (n+S(x)) / 2| in task papricice?

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

    Intuitively, we want $$$S(y) - S(x)$$$ and $$$n - S(y)$$$ to be "as equal as possible", so we should minimise their absolute difference, which is equal to $$$\lvert 2S(y) - (n + S(x)) \rvert$$$.

    A formal proof: Let $$$d = \lvert 2S(y) - (n + S(x)) \rvert$$$. Component sizes are $$$S(x)$$$, $$$\frac{n - S(x) + d}{2}$$$ and $$$\frac{n - S(x) - d}{2}$$$. Maximum of the three numbers is equal to

    Unable to parse markup [type=CF_MATHJAX]

    , and it is minimised when $$$d$$$ is minimal. Minimum is equal to $$$\min \left( S(x), \frac{n - S(x) - d}{2} \right)$$$, and is maximised when $$$d$$$ is minimal. So the difference between the max and the min is minimised when $$$d$$$ is minimal.