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

Автор albert96, история, 7 лет назад, По-английски

Artboard_1

Hello everyone!

We are happy to announce the Christmas Polyglot Marathon held by CodeFights on Saturday, December 23 at 22:00 GMT+4. Polyglot Marathon is a two-hour-long fun competition where you are given 12 tasks each one of which should be solved using a different language (but it is up to you to chose the language for each task). The top 10 participants will all receive a $50 Amazon gift card and 500,000 CodeFights coins (equivalent to a bitcoin :D CodeFights T-shirt). You can register for the competition here.

To prepare for the marathon and get more familiar with the rules you can participate in the Training Polyglot Marathon.

Have fun and CodeFight on!

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

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

How to properly return an empty (zero-length) dynamic array in pascal?

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

So I took the third place and there is only 125k prize. Wasn't it mean that each of top 10 participants gets the 500000?

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

What's the correct solution for C? I implemented a greedy one in Haskell and it gets 75 points by failing three tests. Probably there are some extra cases I didn't care enough about..?

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

    Oh, I see eatmore's comment on Codefights:

    In task C, apparently you can't break a line after a letter. So, if at some point 77th character is a letter, and 78th character is a space, you can't break a line between them. Otherwise, some tests don't pass.

    After fixing that, all tests pass.