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

Автор diskoteka, 9 месяцев назад, По-русски

☀ ☀ ☀ Привет Codeforces ☀ ☀ ☀

Лето заканчивается, а я и моя команда рады пригласить вас поучаствовать в Codeforces Round 894 (Div. 3). Раунд состоится 24.08.2023 17:35 (Московское время). В нём будет 7 задач, которые подобраны по сложности так, чтобы составить интересное соревнование для участников с рейтингами до 1600. Однако все желающие, чей рейтинг 1600 и выше могут зарегистрироваться на раунд вне конкурса.

Раунд пройдет по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-ти часовая фаза открытых взломов. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у многих будут падать решения после окончания контеста.

Вам будет предложено 7 задач и 2 часа 15 минут на их решение.

Штраф за неверную попытку в этом раунде будет равняться 10 минутам.

Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Как написано по ссылке — это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:

  • принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу)
  • не иметь в рейтинге точку 1900 или выше.

Независимо от того являетесь вы достоверными участниками третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.

Задачи были придуманы и написаны: diskoteka, pavlekn, playerr17. С идеей одной из задач нам помог Ivang.

Также хочется поблагодарить следующих людей:

  1. Vladosiya за координацию нашей работы

  2. MikeMirzayanov за прекрасные платформы Polygon и Codeforces

  3. feeder1, Xellos за красное тестирование раунда

  4. michao, induk_v_tsiane, Phantom_Performer, vladmart, dmkz, LordVoIdebug, vrintle за жёлтое тестирование раунда

  5. kzyKT, celin за фиолетовое тестирование раунда

  6. segment_tea, Egorsa, MADE_IN_HEAVEN, Thost, BF_OF_Priety, mewnya, natalina, Serik2003 за синее тестирование раунда

  7. i_love_penguins, tnaito, akwa_blue, Zeyad_Hekal, NgJaBach за бирюзовое тестирование раунда

  8. mkshh, myav за зелёное тестирование раунда

Желаем всем удачи и высокого рейтинга!

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

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

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

Привет!

Обожаю соревнования Vladosiya.

В последнем соревновании Vladosiya я апнул зелёного.

Надеюсь в этом соревновании тоже апну!

Спасибо Vladosiya!

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

As a tester, I really liked the problems. I wish you good luck and have a nice day!

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

As a participant I will participate and be pupil again: : : : :

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

do not have a point of 1900 or higher in the rating.

Should it be 1600?

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

    idk why, but it was always 1900

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

    no

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

    I guess you don't understand what that part means. First, you should probably read the last paragraph of this blog.

    From the blog:

    -- We will exclude from the official standings of Div. 3 rounds and put in a separate rooms all those who can’t be reliably called to be a real participant. Accounts that materially participated in less than 2 rating rounds (materially means solved at least one problem there) before the start of the Div. 3 rounds, and those who have ever gained 1900 or more rating units will not get into the official standings and will be assigned to separate rooms. However, this does not mean that there is no rating recalculation for them. Thus, the rating will be updated for all users whose rating is strictly less than 1600 at the time of the start of a round.--

    In short, everyone who has $$$< 1600$$$ rating will receive rating change after the round, but only some of these participants will be shown in the "official standings". Namely,

    • People who have participated in less than $$$5$$$ rated contests (originally $$$2$$$ as you can see) are excluded from the official standings.
    • People who have reached $$$\ge 1900$$$ rating, and later dropped back to $$$< 1600$$$ rating are excluded from the official standings.

    These rules are in place to try to make sure that everyone in the "official standings" is actually at Div.3 skill level and not someone much better just having low rating. I think it is more fair to make this rating upper bound at $$$1900$$$ than $$$1600$$$, since reaching $$$\ge 1600$$$ rating doesn't mean you are actually that good (you could've gotten lucky).

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

as a tester i will you all good luck >.<

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

As a tester, I demand my name in the blue testing list and can assure that problemset is very well balanced and no problem is a cakewalk and wish everyone good luck and recommend to read all the problems

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

What about Vika from your last contest

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

As a participant, I will participate and be pupil again

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

Wishing for this round will be the great round of Div.3. Best of luck to all contestants :)

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

I am also excited for this round...

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

wow , I am so excited to be involved , and hope I move on to pupil

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

I have the impression that the contest would take place on 8/26 (Sat.) Has it really been moved up, or did I get the date wrong?

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

I hope I can reach Master AFTER this round :v

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

    XD

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

    hi,i'm from vietnam too.probably i'm younger than you.can i chat with you about solutions,idea and ways to deal with problem?

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

      It's alright, I will provide support in my freetime. However if you want to discuss more actively, I suggest you joining Vietnamese Olympiad in Informatics (VNOI) community. At the moment, they are available on Facebook, Discord, ... There are many experts in CP so that you can ask for help

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

As a participant I will participate hoping to be an expert XD

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

Wish to be blue !!!

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

    I'm really grateful for the opportunity this contest gave me to reach the blue!

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

I hope to be blue after this contest.

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

Fingers crossed that this time around, the problems are easy to understand unlike your previous round.

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

Is that the girl in the blog Vika, which you mentioned in your last contest? Whoes stories were hard to decode >_<

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

Hope this is my final rated div3. Let's go!!!!!

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

Thanks for this round and good luck for everyone!

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

Let's go !! ORZ .

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

Ohh Shit Is this the sunflower round??

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

How is it going with Vika

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

No offense, but pls no Vika in this round

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

I am crying because of interactive problem will be in contest.

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

    Where is it written that there will be ?

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

      The post must've been edited for some reason, I'm also pretty sure that at first it said there was going to be an interactive problem.

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

hope I'll regain blue soon...

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

I hope to cross 1000 rating ^_^

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

ohh shitt..VIKA againnn

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

that's not yellow it's orange sir.

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

No offense, but pls no Vika in this round.

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

What does red/green/etc. testing mean? I thought, tests are the same for everybody

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

Hoping for great div3 contest__

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

Yall will like the problems.

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

waiting..............................

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

Hoping to cross 1300 mark

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

.

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

    Did you even read the announcement?

    If your rating is less than 1600, then the round will be rated for you.

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

Hope to become an expert!

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

I suffer Tle mostly....What will i do??

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

I am so excited

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

YOOOOO, Hope my color will change after this round !!

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

Hope my color will change after this round . Lets go !

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

Really hope to reach pupil this time!

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

good luck for everyone :)

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

((upvote) ? rating++ : rating--); I HO

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

:(

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

I can't wait, I'm so excited about Div 3

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

So many Yellow and Blue testers for a cyan, green & grey round

»
9 месяцев назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится
Hope to Solve 3 Problems
»
9 месяцев назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

diskoteka how is your vika now ? after reading last contest's problem statements

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

This is my first time being a tester, I am very excited and wish everyone perform well in the contest :D

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

Expert round?

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

I hope to learn many different concepts and ideas in this round. But yeah surely I want to increase my rating :)

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

I hope I will be cyan today.;)

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

As a particpant , i hope to be cyan again.

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

May Lord Krishna bless you all with +ive rating.

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

35k participants

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

why 'custom invocation' not working ? (: diskoteka

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

    he can't control that , even mike can't , it's not working as it is contest time and too much pressure on the judge

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

Good contest, enjoyed it !!

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

when it's bout div.3, diskoteka never disappoint us.

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

gg, this was my first contest and i didnt know what to expect from it. The questions were great, but my solutions aren’t(had to scour over StackOverflow for a few places...). but congratz!

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

Tough C.

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

For some reason my solution to A got all different outputs than what I got when I ran it on my PC, lost 2 hours because of that, is that normal during contests or was that some kind of bug? I switched to C#, wrote the exact same code and it got accepted...

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

    Your uzeli array is uninitialised so has random undefined contents on each run.

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

      then why did it always work on my PC? So basically I had to set all values of that array to false?

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

        You got lucky I guess (different compiler / optimisation settings may produce different results). It isn't worth trying to work out why it works sometimes when you have undefined behaviour, just fix the undefined part and it'll work everywhere.

        if you declare it as bool uzeli[m]{}; instead of bool uzeli[m]; it will be default initialized (which for bools is all false).

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

          Yeah i get you, i did do that in C# because i experienced problems before in C# due to that mistake its just that it never happened to me in C++ so yes it probably is because of the compiler, anyways what a shit way to lose that much time and rating, especially when C and D werent that hard... : Thanks for helping

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

Having spent lots of time for E because of the third test case, that's really confuse because of the note. I got AC because of predicting the actual problem LOL.

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

D is on oeis:(

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

what is error in this code For Problem F https://codeforces.com/contest/1862/submission/220289269

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

mid=(lo+hi)/2 forces

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

    Yes solved the problem D with quadratic and got WA, and I know it time to use bi-search

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

      D can be solved without binary search.

      Here's my submission — 220221455

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

        can you please explain you solution. thanks in advance :)

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

          If you observe carefully there is a pattern in the solution — 2,3,3,4,5,4,5,6,7,5... So it is like -

          2,3

          3,4,5

          4,5,6,7

          5,6,7,8,9

          and so on

          If you solve the equation nC2=r, where r=required number of different ice creams, you will get n = (1+sqrt(1+8r))/2, so just calculate this value if it is an integer it will be your answer, and if not, then it will be the first number of the row in which your answer is present so just add the diff between r and the value for which you got the answer which you can find by simply putting it back in the formula nC2 and that will be your answer.

          Sorry if I was not clear, but the main thing is finding the pattern and the quadratic then you can solve this question.

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

            bro but in sample test case 4 for 179 why do we need 27 , by nc2 it can be wo also right because 20 c2 is 190 more than 179

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

              In question D. it is given that exactly n type of ice-cream has to be made, not greater than that not less than that. for test case 4 answer is 27 because you need 19 unique ice-cream flavor and 8 repeating flavor. e.g. 1,1,2,2,3,3,..

              19c2 = 171.

              since you have repeated 8 flavor you can make 8 unique combinations of (1,1),(2,2) ....

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

              That’s what I thought too. I spent like half an hour tryna understand until the general announcement then got AC right away

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

    Extremely short solution without binary search: https://codeforces.com/contest/1862/submission/220208197

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

I cannot get the test details in E, can you help me what wrong with my code ? This is my code

:(( I know I cannot get more rating after this contest :(

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

Thank you Geothermal for this trick while using bitset.

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

I don't know if problem C was actually confusing or maybe I'm dumb enough not to understand it.

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

Can someone hack this F solution for the case when water and fire > 1e5? https://codeforces.com/contest/1862/submission/220284156

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

solved G after 2 min end of the contest(

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

for D i noticed it's . find the nearest lowest X for X choose 2 then add n-(X choose 2) . but since it failed on the last test since it's a very big number so is my logic correct and bad implementation? Edit: ok nvm i was an idiot and made r in the binary search n not 1e9 :).

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

Solving problems are way easier than reading them!

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

nice problemset and hoping for positive delta! almost got WA for F but luckly after brief reviewing, i did manage to solve it in the last 4 minutes.

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

Good problems!Thank you! And I want to know is there any brute force ways for F?I got wa using my brute force way :(

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

Problem D:

I used binary search on k, trying k choose 2. If I found kc2 == n, answer is k.

If such a k does not exist (for example, n = 7), I found the greatest k such that kc2 < n, and then added duplicate balls. So for 7, 4 choose 2 is 6, add 1 duplicate ball (e.g. {1, 1, 2, 3, 4}) to get 5 as the answer.

This strategy worked for test 1 but not test 2. During the contest I believed it was a binary search bug but now I wonder if this strategy is valid.

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

220284619 how is this wrong? can anyone tell?

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

Just got F a moment after the contest ...

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

C > D

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

Here is my Live Screencast of solving problems [A -> F] (with commentary in HINDI).

PS: Don't judge me by my current rating :(

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

Nice problemset. Thanks for listening to the feedback on last round and made your contests better . Loved D

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

can you guys tell me logic for [problem:C] and [problem:D]?

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

    C: I try to flip the fence, and compare with the input

    D: you should find the value X, where X * (X — 1) <= 2n < X* (X + 1). Because you get X * (X — 1) distinct pair (2,3) or (1,2), and some same pair (1,1) or (4,4)

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

Can someone hack my F. 220282299

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

How could problem E be approached? What I observed is that we optimally must select the shortest continuous subarray starting at 0 because we will always remove -d * len(a), where a is that subarray. Then we can pick maximum $$$m$$$ positive values, but how to determine the length of that subarray? Would a priority queue work and at each index check the maximum m values + -d * i?

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

    You don't need the shortest continuous subarray. The answer is maximum of: for each position sum of the greatest m positive elements to the left minus the position multiplied by d. If you get more than m positive elements to the left, you just erase the minimum of the set or the priority queue and update the sum.

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

F is an interesting dp problem. Unfortunately, I was not able to solve it for the limited time.

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

My F solution was Iterative dp with memory optimisation

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

lognforces

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

220296987

What is making my solution slow for G? (time limit exceeded) I would want to hear some advices on how to use sets and what to avoid to not get tle in the future.

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

Problem C solution using binary search Link

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

Thanks for interesting tasks! A was too hard for me)

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

As someone who's new to this stuff, I got slammed by the 3rd problem

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

Nice problemset.

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

Nice problemset.

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

Most confusing problem "D" :) && Besides lots of announcement increases the confusion level further except clearing.. ConfusingForces

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

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

    Hey Cheater, why have you inserted unnecessarily string/char etc. in your code of D.

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

      Could you point out the unnecessary string/chars you saw in his code? If you are referring to blank lines, they don't matter anyway. Could you clarify what part of the code made you believe the person you accused a cheater is actually a cheater?

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

        Nvm. Very my fault for commenting without checking the problem of the solution. Thought it was this Contest's D.

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

          I am not sure if you and the accuser are the same person. But accusing someone a cheater is not something we should take lightly. Your reasoning of accusing someone cheater because you thought the code was for this contest is not only unacceptable but also unforgivable. At least check the problem ID before calling out someone a cheater. Anyway, I hope you have learnt from your mistake and would take this seriously in future.

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

            I didn't accuse him. I literally specified it in the previous version that I neither accuse nor defend.

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

              If "Hey Cheater" is not accusing someone a cheater then I don't know what does accusing means. Anyway, I am not quite sure why are you replying? Are you and ccpp same person or distant cousins?

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

                I have no idea who he is, but I didn't say "hey cheater" in any of my comments, in the CF history of this account.

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

                  My bad then, I think you should have replied in the separate thread. Cause, my question was specifically to ccpp. And I did not get any answer. Your comment confused me.

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

                  Sorry, Actually I went to saw Sol of D in his profile (submissions) then I saw this soln. I did not realize that the soln was od another contest and presumed that he had done it to pass plagrasims. I am extremely sorry to have created this confusion.

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

      i knew that grays dont have brains. i was unaware that they cant even see properly

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

        I can see properly. I can clearly see your color is RED.

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

    Extremely sorry bro, I mistakenly thought you cheated. Sorry please forgive me. Sorry Again.

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

      It's Ok bro.. Understanding the coding aspect is enough.

      That's actually not unnecessary strings/char. That's called template. We mainly use it for writing code faster in contest time, Cause you already know your coding speed will impact your contest performance

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

        Actually I thought that the code was of this contest, but that was of some past contest. I thought that strings are unnecessary (due to my Assumption(wrong) that code was of this contest) even without looking at full code. Sorry Bro once again. Actually since there are a lot of cheaters, I get so angry at cheaters.

        But sorry you are NOT a cheater. Good luck

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

My solution for F is slight different from others, I binary searched on time, and got amount of fire and water. Now if any of these is greater than sum, this time works. Else, I try to fill knapsack of fire in most optimal way, (by optimal I mean, filling it in such a way that it has least remaining space possible) and check if remaining sum can be filled in water knapsack. Similarly, tried to fill water knapsack in most optimal way and check if remaining can be filled in fire knapsack.

Here is link to submission

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

    if((sum-dp[F]<=W)||(sum-dp[W]<=F))

    You only need to check one of these. Suppose sum-dp[F] <= W is true:

    dp[F] is the sum of a subset of monsters sum - dp[F] is the sum of the remaining set of monsters

    Since sum - dp[F] <= W, we can kill the remaining set of monsters with W. In other words, sum - dp[F] <= dp[W].

    Therefore, sum - dp[W] <= dp[F] <= F and the second statement is true as well.

    The same argument applies if you want to prove the second statement implies the first.

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

    i did the same

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

Can I get a hint for problem F ? I'm struggling with dp problems

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

Hello, can someone provide a hint for problem E

Thanks :pray:.

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

worst div3 contest

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

Video editorial for problems A&B&C&D: https://youtu.be/aEB8NXX-lxA

Thought would be useful

IN ENGLISH

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

Great problems, D and F were really interesting, and E was also nice. Hope to get to expert after the rating changes :)

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

In problem F, I've seen many solutions that use this bitset idea, but I'm just lost at what it does.

Can someone explain what it's supposed to be happening here?

bitset<1000001> dp;
dp.set(0);
for (int j = 0; j < n; j++){
    dp |= dp << s[j];
}
  • »
    »
    9 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

    this is the equivalent of

    for i from 1 -> n:

    for j from sum -> a[i]:

    dp[j] |= dp[j — a[i]]

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

    generates all subset sum which are possible.

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

    OK, I think I got it!

    For the interested:

    dp[amount] should be $$$1$$$ when we can form amount by summing some elements of s together, and $$$0$$$ when we cannot.

    Therefore dp should have enough size to store all possible different amounts. In this case, from $$$0$$$ to $$$10^6$$$.

    Initially dp will have all values set to $$$0$$$ (we don't know yet which values we can form), except for the $$$0$$$-th bit (we always can sum up to $$$0$$$, just choose no elements from the set).

    The line that sets the $$$0$$$-th bit to 1 is: dp.set(0).

    Then we iterate over all elements of our set. Say that our set s is {3, 2}.

    In the first iteration of the for, we know that we can form s[0] — that is, when we choose only the first element to form our sum — so we should set the s[0]-th bit of dp to $$$1$$$.

    After the first iteration, the $$$3$$$-rd (and $$$0$$$-th) bit of the bitset will be $$$1$$$:

    dp equals 00000 ... 0001001.

    In the second iteration, when considering s[1], we know that for each value we already know we can form, we can also form that value + s[1]. Since each bit already set in dp represents a value we know we can form, by left shifting each bit $$$1$$$ of dp by s[1], we get all new values we can form.

    In the example, since s[1] is $$$2$$$, by shifting all bits of dp by $$$2$$$, we have:

    dp << 2 equals 00000 ... 0100100 (now we know we can form 2 and 5).

    By using | between dp and dp << 2, we join all the values we already knew we could form and these new values we just learned we can form: dp |= dp << s[1].

    dp |= dp << 2 equals 00000 ... 0101101 (we can form 0, 2, 3 and 5).

    The same idea for s[1] is valid for any s[i] that comes after, and after the for, we know all values from $$$0$$$ to $$$10^6$$$ that can be formed, since they're set to $$$1$$$ in the bitset.

    There are probably better and shorter explanations elsewhere, but since this is a Div3, I think it means no harm putting mine here.

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

I found prblem F and C very cool.Nice contest

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

It's very unlikely that 1000 people will solve F during contest, I think heavy cheating is going on maybe those Unofficial Experts , CM, M.. provide these fellow cheaters the solution :(

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

    F wasn't that hard to be honest. I needed around 30 minutes to solve it(spent 10/15 minutes on E after solving C). I immediately had the binary search plus knapsack idea. But wasn't really sure if it would pass(I was thinking about normal knapsack not the bitset one). Then I was able to reduce it to only knapsack without the binary search.

    I participated virtually though!

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

      What's the t.c. of bitset idea? Is it O(sum + n)

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

        O((n * 1e6) / 32 + n)

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

          can you explain it please.

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

            performing an operation bitset has a time complexity of n / 32 or n / 64 depending on your computer, but in codeforces it seems like it is 32.

            we iterate through every number, then we take the whole bitset and we perform OR operation with (bs << val), this takes O(ceil(SIZE / 32)), SIZE in this case being sum which is 1e6.

            we do this n times, which gives us the total time complexity of O(n * ceil(SIZE / 32)) or O(n * 1e6 / 32)

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

    True :)

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

    I was also surprised

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

Python users, for Problem G anyone knows the source of this SortedList template 220199018? (huangxw, yuki_keshiki)

I was getting TLE with the PyRival implementation.

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

    I copy the SortedList template from someone's submission in Atcoder contest,it is crazy fast,prefect to solve this problem.

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

White spaces and endl seem no difference to checker. 220288316

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

    yeah , I never use " " , I always use "\n" and never had a problem.

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

      Cool! I knew that trailing spaces do not count. But never knew that new line is also fine. No more space handling from now, then.

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

Can problem E be somehow solved using binarysearch?

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

Hey everyone, I'm a newbie. I want to ask why this round is not rated for me. Thanks.

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

the observation, maximum difference between adjacent elements of the array for problem G is damn cool !!

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

Why are the rating changes not out yet, hacking is over right

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

    There is always the daunting 2-3 hour wait after system tests before rating updates. Hoping to get pupil, I’m at 1199 right now!

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

crazy queue

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

nice contest i like it , F problem is so goood

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

crazy queue

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

Is system testing done?

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

where is the systerm test?

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

    when will this queue end, I am facing this issue since last 4 to 5 hours

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

Can E be done using sliding window?

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

Hope to reach pupil after this contest. Solved 4 problems

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

А почему в рейтинг не засчиталось(

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

Why don't start system test immediately ?

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

Why don't start system test immediately!!!!!

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

Why don't start system test immediately ?

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

I am a python user but I dont know what is the alternative of multiset of C++ in python?

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

Good round in total, but problem A is very boring, problem D and F are a little boring, the others are interesting!

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

Now i have become expert the destroyer of division 3.

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

commented on a wrong round sorry

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

When do editorials of contests usually release? I am new here.

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

Lmao I binary searched on F and created a dp table every time not realizing I could've just created a big one to start. Oops.

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

Attention!

Your solution 220250441 for the problem 1862E significantly coincides with solutions wont_give_srsly/220246281, manvendrasinghshekhawat/220250441, bdyby11/220257824, pmqwerty/220262992, Swarupa/220264041, pranavkumarreddy567/220268055, DarkDreamin/220269225, nitiksharma/220269800, jvamshi36/220271912, jolly_79/220273460, Tintintani/220275635, absolute_07/220277807, jkoushik_iiitn/220278018, abhay5a/220278945, anjan_reddy/220279911, kunaltelangi/220280520, Mobbbbb/220281738, i_decided/220284890, Adityaraj834/220285184. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code).

I recently received this mail stating that I was accused of plagiarism for a problem 1862E. I didn’t know any of these people nor did I share my code with anyone or use any online ide. I am 100% sure that this violation has not happened from my end.

I have personally looked at all the other submissions and none of them match exactly with mine other than using ‘multiset’ and the problem logic. I request you to please check again MikeMirzayanov.

My Submission: 220250441

Other Submissions:

220246281 220257824 220262992 220264041 220268055 220269225 220269800 220271912 220273460 220275635 220277807 220278018 220278945 220279911 220280520 220280520 220281738 220284890 220285184

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

I hope you are doing well and reading this. In relation to my most recent Codeforces entries, I'm writing to discuss a worrying problem. The resemblance in my replies to those of other participants is simply coincidental, I tell you. I have not cheated in any manner.

I am entirely committed to following the platform's standards because I recognize how crucial it is to keep it honest. I take the responsibility for my Codeforces account and reputation very seriously, and I would never act dishonestly. I think the similarities in the solutions can be traced to the nature of the issues and the typical approaches taken by participants. For clearly stated situations, it is not unusual for numerous people to come to the same conclusion independently.

Please evaluate my submissions and give my justification some thought. Please don't hesitate to get in touch with me if you have any further questions or concerns so that I may provide clarification or more details. I am more than prepared to help and offer any proof required to prove my innocence.

I respect the Codeforces community and its dedication to fair play, and I look forward to finding a solution that preserves these values.

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

I recently received this mail stating that I was accused of plagiarism. I didn’t know any of these people nor did I share my code with anyone or use any online ide. I am 100% sure that this violation has not happened from my end.

I have personally looked at all the other submissions and none of them match exactly with mine other than the problem logic. I request you to please check again.

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

Attention! Your solution 220205849 for the problem 1862C significantly coincides with solutions Team1_QuangDat/220205849, Lo_Mid_Hi/220259007. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked. I recently received this mail stating that I was accused of plagiarism for a problem 1862C. I read the code from the Lo_Mid_Hi account and it is 100% identical to my code and I do not know this person. It can be seen that this account copied code from many different people in the contest. He copied my code, he didn't even delete the comment at the top of my code. I request you to please check again MikeMirzayanov. My submission: 220205849 His submission: 220259007

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

please update the problem ratings, it has been more than 20 days since the contest is finished and yet problem ratings are not updated.