When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Morphy's blog

By Morphy, history, 5 years ago, In English

CodeChef October Mega-Cook Off 2018 starts in ~48h, (sunday 21 11:00 PET).

You will have 2.5h to solve 5 puzzles. My last contest was April Cook-off, ussually I only set one contest per year, so this year I broke the curse!

The character of the contest is Chef Ada, she is the most intuitive girl I have ever met. Sometimes she can solve a problem before I finish telling the statement!

Hope you enjoy the problems. See you in the ranklist!

Upd. This time there will be also statements in spanish. Spanish is a complex language, let's hope I didn't miss any accent mark:)

Contest log:

  • 11:08 many WAs in PUMPWAT. MaddyThakker takes the lead in div2.

  • 11:13 MegaBidoof ACed PUMPWAT, even tester had a couple of WAs in this problem

  • 11:24 kingofnumbers frightened me, numbers of equal height in the tests of PUMPWAT? false alarm, only the sample had a repeated element. Actually in the original version there was hills with equal height, but I decided to made the problem easier, and forgot to fix sample input.

  • 11:30 I just noticed zemen is in div2! with two div1 problems solved, he could be first in div1 in this moment.

  • 11:49 user:AlexDmitriev solved PWRTREE, he is still first

  • 12:00 zemen finally solved PWRTREE in div2

  • 12:31 KrK and uwi solving only two problems in a cc contest after 90 minutes? that is not often seen

  • 12:45 riadwaw solved ADASHOP, IMHO it took him too much time, there are no submissions for ADAFARM yet.

  • 12:56 The blue coder (3 stars) zemen :) got perfect score in div2, wondering if he could get perfect score in div1.

  • 13:22 hatter from belarus solved ADASHOP skipping PWRTREE, that was an wise decision, I think PWRTREE is harder. Now he is 4th in div2.

  • 13:27 ADAFARM has only one submission, and unfortunately it is RE (sorry Golovanov399)

  • 13:35 Congrats to the winners!

Div 1.

  1. riadwaw

  2. isaf27

  3. nuip

Div 2.

  1. zemen

  2. receed

  3. Januzaj497

  • Vote: I like it
  • +99
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there pasta or pizza?

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it -16 Vote: I do not like it

    There’s spaghetti.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +17 Vote: I do not like it

    There will be 5 delicious dishes (puzzles), and for dessert the editorials and some bonus problems.

»
5 years ago, # |
  Vote: I like it +48 Vote: I do not like it

Hopefully "mega" won't bring the servers down, like the last time :)

»
5 years ago, # |
  Vote: I like it +5 Vote: I do not like it

what does "MEGA" means this time?

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Morphy (previous revision, new revision, compare).

»
5 years ago, # |
  Vote: I like it +18 Vote: I do not like it

Thanks for the PWRTREE task. I really loved it!

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Without any spoilers (I'm still planning to upsolve it :) ), does one need to know some facts about tournament graphs or some fancy stuff to solve the power tree task?

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      No. It has completely elementary solution.

      • »
        »
        »
        »
        5 years ago, # ^ |
          Vote: I like it +16 Vote: I do not like it

        Here is my solution:

        Solution
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What was the intended solution for BINIM2?

»
5 years ago, # |
  Vote: I like it +20 Vote: I do not like it

Editorial for some of the problems in my blog: https://aleigorithms.wordpress.com/2018/10/19/874/

»
5 years ago, # |
Rev. 3   Vote: I like it +16 Vote: I do not like it

What is your solution to ADASHOP if you think that it is easier than PWRTREE?

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    the problem can be reduced to the case when the bishop is on the first column, then is just to find the pattern and count the number of cells of a given color in a triangle. Maybe ADASHOP is longer to code, but PWRTREE required more creativity.

    • »
      »
      »
      5 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      As for me, ADASHOP was both harder to come up with and to implement. Certainly, PWRTREE required an idea, but it was rather straightforward: it's logical that you need to create PT(n) from something smaller, and 2 PT(n — 1)s is natural candidate given the size of PT(n) is 2^n. ADASHOP, on the other hand, required some case analysis and understanding some unusual structure (btw, I actually am not sure why my solution works fine for r = 1, I thought to special case it, but it passed bruteforce)

      Of course, problem difficulty is subjective, just my two cents.

»
5 years ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

What is the general difference between a regular cook-off and a mega one?