Автор awoo, история, 2 года назад, По-русски

Привет, Codeforces!

В 16.01.2022 17:35 (Московское время) состоится Educational Codeforces Round 121 (рейтинговый для Div. 2).

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 6 или 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Владимир vovuh Петров, Иван BledDest Андросов и Максим Neon Мещеряков. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

Удачи в раунде! Успешных решений!

UPD: К сожалению, раунд будет нерейтинговый. Приносим свои извинения за причиненные неудобства. Вы можете дорешать задачи, используя архив Codeforces.

UPD: Разбор опубликован.

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

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

First educational round of 2022!

Wish everyone positive delta

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

Wish all people who are going to participate in this round good luck!

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

I hope this will be the best education round in 2022. Wish everyone positive delta

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

We always wait for the Educational Round.

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

When I go to register for the contest, it doesn't say that I'm "out of the competition" like it usually does. Is this an error?

UPD: Apparently this is just how edu rounds are, I guess.

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

The number of problems invented by these guys is more than the number of problems i solved so far. Just wanna say thank you, you guys are genius.

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

Is rating below 2100 belongs to division 2? If so what is rating range for division 3?

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

Hope To Be Pupil This Round

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

Why Codeforces is lagging when i switch to Wifi ??? Is happening with everyone ???

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

first time participating in 2022,and in first educational round of 2022.

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

[deleted]

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

I wish every green coder becomes cyan

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

yes, a new contest, can't wait to lose rating again!!!

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

Why haven't they listed the rating of problems ?

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

Hope to become pupil.

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

Does anyone else think Problem C statement is unnecessarily complicated?

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

    yes i do think , especially for newbies and pupils like us

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

      And for me too, after solving problem C for 30 mins I realised that I understood the question wrong lol

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

Is it unrated?

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

unrated...

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

Unrated?

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

unrated? (due to the breakdown of the website?)

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

Is it unrated? I hope it is as the site was down for a while.

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

I want my Delta back >:(

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

Is it rated?????

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

un rated?

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

Is it rated or not?

I wish it still rated :(.

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

I couldn't submit my solution for C in the last 40 minutes, and I believe others are experiencing a similar situation. Please, unrate this round.

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

I was not able to submit problem C on time as the website was down.

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

I was about to submit problem C and the website is down...

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

What the hell is the power company near Codeforces doing

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

How to solve E ???

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

очень печально, что за 3 минуты до конца, когда я засылал D, сайт упал :( не видать прироста рейтинга как своих ушей

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

    он упал у всех на последние минут сорок (

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

      ну я не заметил, увлеченно писал D-шку ладно, не обидно, всё равно WA3

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

pls dont get rated plssssssssssssssss

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

Just before I wanted to send a full solution to C, site crashed. If it is rated I am gonna be very very sad.

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

    Same, got B and C, wanted to submit, boom unavailable. 45 min later, website up again

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

Make it unrated or bring new contest. This is bujdili.

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

I submitted problem C with two minutes left, but CodeForces was down. I was not able to submit. Did this happen to others?

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

Any ideas to solve E ???

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

    Brute force

    let 2 ^ a, 2 ^ b, 2 ^ c be the partitions

    just check whether this partition is possible or not

    then the answer:

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

    The solution I wrote and could not submit due to website being down does the following:

    • First dfs from any root and determine for each subtree the number of black nodes in that subtree -> now we can determine the number of black nodes of any subtree using any root.

    • Now we BFS starting from all black nodes going outwards. — If current node u has neighbour v such that v number of black nodes of the subtree v when root is u is bigger than the distance of v to any black tree. Then mark u.

    Sorry for bad formatting :/

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

It should be unrated . Half of the time the server was down...

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

Obviously it will be unrated. Keep calm everyone.

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

Where are Codeforces servers hosted?

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

give us 30 more minutes

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

    Better to make it unrated. Otherwise, those who have read/downloaded all the problems will have an advantage. (Also a problem for those who are not available anymore)

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

Due to electrical problems, the site is temporarily unavailable. We expect him to be back in minutes 5-30 minutes.

This is there for last half an hour of the contest for me. Anyone else faced same issue?

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

Will this contest be unrated since the website crashed in the last hour for a lot of people?

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

guys the contest stopped in between:(

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

Is it rated or not?

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

    same bro :(

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

    LMAO this guy comment was:

    before edit

    but when he saw -13 votes he edit it to:

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

      I don't get what is wrong for me to wish if it was rated.

      As I was going to return to candidate master again and achieve new max rating.

      I think it's normal for me to want more than +100 delta and after all it's just a wish it can't change any thing.

      I don't get why I get down voted a lot.

      and to correct something when I edited the comment it was just -2 not -13

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

        I mean you knew that you are doing something wrong when you edited your comment so why u are asking again? Many people couldn't get +ve delta during the uptime and some of them could have reached +ve delta during the downtime so thats why its not fair for many participants, and btw my delta was 108 +ve but its better for it to be unrated :)

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

Unfortunately for the authors, the round didn't go smoothly but I enjoyed the problems. Thank you.

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

I did good. But it should be unrated (: almost 1 hour server probelm :3 Its huge ..

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

Unrated?

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

please let me submit!

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

undo this fuckshit!!

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

when i want to submit the new code,this contest is stop.So please unrated!

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

Downforces

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

Will this round be Unrated?

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

Please make it rated

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

It will be unrated?

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

CF everyday bomb.

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

People are so impatient. I mean, you need to give them some time to announce that it is unrated. Who knows, probably they cannot still access the site : P

edit: there you go

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

Kindly make this round unrated as the server went down for about 50 minutes. I had written the code for C but was unable to submit it due to the server issues. Many others might have faced similar problems.

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

I thought I would become CM then the atrocity happened. My disappointment is immeasurable and my day is ruined.

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

hope it will be unrated

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

i would become blue,almost

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

Didn't know electrical issues could screw up a contest. Well the round was supposed to be educational after all XD

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

Does the contest will be unrated due to technical failure?

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

People should stop down-voting the contest. It's not the fault of the authors, co-ordinators or testers that there was an electrical outage.

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

Unavailableforces

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

Probably going be to heavily downvoted but guys it might still be rated. Everyone got the same amount of time to submit their solutions. So effectively only the contest duration got reduced.

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

    And it became unrated just as I commented. Maybe I jinxed it lol.

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

      You said ... "it might still be rated" ...

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

        I wasn't expecting it to be rated but I wouldn't have been surprised if it would have been because effectively only the contest duration was reduced. And I get a feel, I haven't understood your comment.

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

ig a lot of people want this round unrated because who performed good is a small percentage and that's why they got positive delta

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

I had 10 minutes left but suddenly the web crashed. When the problem was fixed, I intended to get back to submit my code but the contest is over:((

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

Half of the people wants it to be rated other half wants it to be unrated. Good Luck awoo

UPD — Round is unrated.

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

Does the contest will be unrated now?

»
2 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится
Meanwhile Indians
»
2 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

i cant submit in the archive, why?

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

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

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

finally NON-NEGATIVE delta in Educational Round.

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

In my opinion, it should be rated. The server failure has affected equally everybody, and the site has run enough time to be able to submit several problems. It would be a shame to have lost all the time spent. But it is up to Mike of course...

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

    I quite agree, surely because I did well, for once.

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

    This is not how it works. Think about those who solved a question but could not submit and those who could not solve it at all. If the round is rated then it would be unfair to those who could solve it. You can't say it's a shorter version of the round coz the duration announced before the start was 2 hours and that's the duration everyone expected but could not get. So it's fair to everyone that the round gets unrated.

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

(* ̄3 ̄)╭

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

From where can I access codeforces archives?

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

First unrated contest of the year ! :|

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

It is officially unrated now.

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

First unrated educational round of 2022! :D

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

Peoples reaction when codeforces is unavailable during the contest  reaction

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

Why are people downvoting the blog? The authors can do nothing about codeforces's servers

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

since the contest is stuck at System Testing 100%, it is not completely over and we cant upsolve it in the archive :(

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

Wow! no one's lost any points this round.

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

Can we add another Educational round by end of Jan to make up this one ??

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

Why do unrated rounds always happen when I do well :sob:.

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

Unrated! Thanks UnavailableForces!

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

Anyway, I loved this round!

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

Any idea how I can submit solutions for contest problems ? I get 'Contest is over' popup message :/

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

I don't know whether speaking this will affect my contribution to become negative because some people may disagree. But yeah, whatever.

I just wanna "rant". But if the round will be unrated, I will be very upset because after a while, I feel like my performance is quite great in this round. So it feels like making the round unrated is quite unfair (at least for some people did their best for the first 1+ hour (before the electricity went out))

Yes, if I'm at the bottom, probably I will feel different and frustrated.

But when I try to see this objectivically, making the round rated is a fair thing to do. Why? Because in the end, all participants has a fair condition : 1 hour contest (and the electricity go back up after the contest ends anyway)

Yes there's a way of thinking like : "if you're good, you will keep enjoying problem solving — whether the round is rated or not". Yes I do agree with that, but emotionally speaking, it feels like this hits me hard personally (and probably some people might feel the same)

Yeah so that's my point of view. Feel free if you guys want to disagree and downvote for this, but I stand with my thought. And hopefully in the future, there will be some acceptable solution to mitigate this issue

Good luck Codeforces team

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

    This doesn't really make any sense. People choose to participate in the contest with the expectation that the rules/time constraints don't arbitrarily change during the contest. Do you really think someone who can eventually solve 5 problems should be ranked lower than someone who can only solve the first 3 quickly?

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

      In 2 hours contest, I agree with your opinion. And I think this incident is quite an unfortunate event I believe

      But I also believe that speed is also important for solving the first X problem quick. So in a way, I think given the equal circumstances to all participants (i.e. electricity went out until the end of the contest), should it still be a fair game?

      Unless if in the middle of the contest the server went back up, I think it's another story and when that's the case it's reasonable to make the round unrated

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

        Of course speed is important, that's why it's rewarded on the leaderboard. But in the cp community (in particular these educational rounds), there's a reason why the slowest solver of 4 problems is higher ranked than the fastest person who can only solve 3.

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

        I have to disagree with you — while we all got the same time, changing the duration of the contest can affect people's strategy. Consider the classic example of "I can't wrap my head around problem C, I'll try D and then come back". You'd never do something like this near the end of the contest, but people would consider it when there's plenty of time left. So by suddenly truncating the contest you punish people that are trying harder problems when they really shouldn't be.

        It's bad for a round to become unrated, but I think it's the only fair thing to do in this case

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

    I think that extending the contest time is a better way of dealing with server failures. Making a contest unrated is very frustrating and discouraging for those who have performed well. There is a reason why it's called 'competitive' programming. I don't think people here are truly indifferent whether a contest is rated or not :)

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

      Extending contest time is not always feasible. Many people only participate in a contest coz they were able to get free time in that duration. You gotta take care of all time zones.

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

      Hmm I think it's not a best thing because some people might think the contest is unrated and quit before they realize there's an extension :')

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

    1 hour contest is a fair condition, but only if you know the duration beforehand.

    Suppose you have written a solution for a problem and you're not so sure that it's correct. It might be due to different reasons — this can be an unproven greedy, the code can just be complex and there might be some bugs in it, etc. Should you submit right away?

    If there's a minute until the end of the contest, the correct decision is to go full YOLO, submit (maybe even without checking the samples!) and pray to whomever you worship that both your idea and your implementation of it is correct. But what if you have a considerable amount of time until the end of the contest? Then the better course of action is to wait with submitting the code (because you might get penalty) and test the solution, maybe even let the stress run for several minutes. When you know that you have time, being careful is better than just submitting the code outright.

    So, in a situation like today's one (when you assume that it is only the middle of the contest, but in fact it's only a minute), you get punished for doing the correct thing (if you verify your code once again, hoping to submit in 5-10 minutes, you instead can't submit at all). That's why these conditions are unfair, and that's why we chose to make the round unrated.

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

      I see. I think your argument is reasonable. Let's hope this unfortunate incident is minimized in the future :)

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

It was a terrible contest experience I have had before. Does this kind of problem usually happen during contest HERE?

I don't participate Codeforces contest so frequently, so I'm wondering if it is necessary to consider technical issues on platform.

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

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

Why did they make it unrated?

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

    cause it's not fair for many contestants, maybe not you, but still worth going unrated

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

    The contest only lasted an hour and twenty minutes when it should have lasted two hours. Even if I don't really agree with this decision, it is clear that it completely changes the competition, and that it may seem reasonable to cancel.

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

editorial?

»
2 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится
Happy Meme :)
Sad Meme :')
»
2 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Solved 4 problems but unrated.ಥ_ಥ

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

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

Are there are some thoughts about how to clever implement 1626D - Турнир боевого искусства?

I had for like one hour a more or less clear idea on how it should work (iterate possible group sizes, binary search possible number of partitipants), but was not able to write the code. I tried using lower_bound() for binary search, but did not get it right somehow. What here is the trick to get it right in time?

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

    I bruteforce the size of the small and medium group and check how many people I need to add to form a group with those sizes

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

    After the formation let the Light , Middle and Heavy Section have 2^i , 2^k and 2^j members respectively . Let's form two arrays pref and suff , pref[z] number of persons with weight<=z and suff[z] number of persons with weight>=z So our answer would be 2^i + 2^j + 2^k — n so if we fix i and j to minimize the answer k should be minimized so we should find maximum x such that pref[x-1]<=2^i , minimum y such that suff[y]<= 2^j. We can brute force over all pairs (i,j) and get the result . 2^k >= (n-pref[x-1]-suff[y]) thus to minimize k , pref[x-1]+suff[y] should be maximized

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

      Well, it is super obvious how error prone that is. And what you discribe by "get the result" is an additional binary search on the prefix array(s).

      The question is, how to make it more clear. Actually I am not able to simply write it down, it is to complecated. I need some kind of abstraction layer or whatever.

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

        I just said what I wrote in my already accepted code . The last statement in my comment is the reason behind why I chose for every i and j max x such that pref[x-1] <= 2^i and minimum y such that suff[y] <= 2^j

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

Was problem C easier than usual? Anyway, good problems.

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

for problem D, I have a O((log(A))^2 * log(n) + n) solution, is it wrong? submission

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

problem E was super nice. After a long time, an Edu problem E actually required some thinking. A shame that this was unrated...

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

I uploaded a screencast solving all problems here: https://youtu.be/XBqrXvMy3Is

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

I had a pretty clean solution to 1626E - Черно-белое дерево without any casework, so I'll outline it here.

  1. if you have an edge $$$(u, v)$$$, and there are 2+ black nodes on the side of $$$u$$$, then we say that $$$u$$$ is "easily reachable" from $$$v$$$.
  2. if you can "easily reach" a black node or an immediate neighbor of a black node, then you win.

Hence, we construct the reverse graph of "easily reachable" and multi-source BFS from the black nodes & their neighbors, and we're done!

(The intuition behind "easily reachable" is that we can take a step along this edge regardless of other moves, since we have 2+ black nodes to choose from.)

Full code (including IO/templates) is at 143016277, but the key part is below.

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

Can someone explains the dp solution for C.

I used greedy

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

Can someone explains the dp solution for C. I used ghreedy

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

Any approach for C ?

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

That's really sad that the round was unrated. It's one of the edu rounds that I enjoyed the most

ABCD were all interesting and fun to solve!

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

For problem C, does a spell stop once it hits a monster, or does it keep going? Edit: nvm, my question was stupid.

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

Really like the problems in this contest, the problem description is short.

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

Can someone please help me find the error in my code for problem C. I used a greedy approach of traversing the list in reverse order. Here is my submission

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

I am sorry for your loss. This Round is, absolutely, good(at least for me).

Looking forward to your future contests!

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

I figured the idea for the solution of problem F quite quickly after opening it.

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

Problem C what should be the output

1
2
3 10
2 8
  • »
    »
    2 года назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    45

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      But i think it is possible to get the lower answer
      because
      we can cast spell
      
      at 2 3 (cost 1+2=3)
      and 
      at 3 4 5 6 7 8 9 10 ( cost 1+2+3+4+5+6+7+8=36)
      
      total =39<45
      please tell me why it is wrong
      
      • »
        »
        »
        »
        2 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        you are casting 2 spells at 3, which is not allowed. Hence you are forced to cast spells (x + 1) at every second from 2 to 10

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

is there gonna be an editorial?

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

Will the tutorial be available or not?

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

Can anyone tell what is wrong in my solution 143108028 for problem D where a is size of lightweight, b is size of middleweight and c is size of heavyweight

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

    The only wrong part I could think of is in your code for a you're finding the smallest length bigger than 1<<j while you should be finding the biggest length smaller than 1<<j.

    Think of it as such.

    In problem it is given that the final partition would be of form $$$2^i$$$ so it would be more sensible to take the maximum number of elements in that partition from the array. So we can say that we take some $$$2^i-k$$$ from array. So we should minimize k right ?
    But what you did was, you considered that the number of elements from the array in final partition will be of form $$$2^i+k$$$ and you minimized k. See in that case you would have to add $$$2^i-k$$$ elements to the array. Now minimizing k will actually maximize the answer for a particular i.

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

I am not able to find where am I getting wrong in problem C. Anybody pls help. My submission 143125218 https://codeforces.com/contest/1626/submission/143125218

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

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

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

It's so sad that this round got unrated and i didn't become purple. But i love these carefully-prepared problems :)

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

It's a shame the round didn't go well, yet I'm glad to have participated.

The problems were all creative and unique, I enjoyed every one of them and loved the round.