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

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

Привет, Codeforces!

Во 19.12.2023 17:35 (Московское время) состоится Codeforces Round 916 (Div. 3) — очередной раунд для третьего дивизиона. В этом раунде будет 6-8 задач, по сложности подходящих для участников с рейтингом до 1600 (во всяком случае, мы надеемся на это). Но, конечно же, участники с рейтингом 1600 и выше могут зарегистрироваться на раунд вне конкурса.

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

У вас будет 2 часа и 15 минут на то, чтобы решить 6-8 задач. Штраф за неверную посылку будет равняться 10 минутам.

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

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

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

Раунд основан на задачах муниципального этапа Всероссийской олимпиады школьников в Саратове и Саратовской области 2023/2024, поэтому если вы участвовали в нем — пожалуйста, воздержитесь от официального участия в этом раунде.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Иван BledDest Андросов, Максим Neon Мещеряков, Роман Roms Глазов и Александр fcspartakm Фролов. Отдельное спасибо Владиславу Vladosiya Власову за отличную координацию.

Большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces, без которых этот раунд бы не состоялся!

Наконец, спасибо тестерам раунда FBI, Kalashnikov и SonOfHonor за ценные советы и предложения!

Удачи в раунде! Надеюсь, задачи, которые мы подготовили, вам понравятся.

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

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

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

    yet another youtuber whose streams i like :D

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

    Really Informative. Thanks. Keep these Discussions coming...

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

    Improve your internet connection before doing live streams and change your microphone. how someone supposed to understand whatever you are explaining in the live stream :')

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

Wow, a div 3 round with edu round setters. Excited to see how this goes

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

Hi guys, I'm sorry to bother, I'm kinda new in this website, I just voted downside by accident, so please remove it, also, how can I unregister from a contest? I'm really really sorry, but I registered before 1-2 days, and I just remembered that tomorrow I have school so I can't participate, please is it possible to remove my registration from the codeforces round 916 ? thank you very much, I'm just worried that my rating would decrease incase I don't attend

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

First unrated contest Hope to see some good problems. (POV: frequency of contest at CF in this month is amazing)

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

hope to get positive delta :)

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

back to back cf round , yayyyy

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

Excited for the contest. Hoping To Solve 4 problems fast in this round. got -ve delta in education round :( .. hoping to become expert this contest

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

Удачи Всем!

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

Please have more div2s or I'll lose a lot of money to pk_27. (;_;)

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

Me every time I do a div 3 contest:

look through first 4-5 problems
if(is_math_related) 
   leave contest;
else 
   finish solving A, B, and C in first 40 minutes;
   give up because D too hard;

plsnomath

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

In last div-3 I bricked in $$$C$$$ , hopefully today I will have my revenge

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

Yes div3, hurrah!

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

After solving A, B & C:

There is nothing we can do...

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

    After solving A, B, C, D, E1 & E2:

    There is nothing we can do...

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

thank you for new pain generator!))))

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

Hoping to fast solve first three!

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

When will the rating of yesterday's edu round be updated? I was hoping to become specialist in that and then give today's div3 as a rated round.

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

i will be demoted to less than 1600 after the rating drops for the last div 2 contest that was yesterday. currently i'm unrated for the div 3. if i participate now will i be considered rated or no ?

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

i hope i'll get expert

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

My advice as a last-minute tester, don`t forget reading and thinking about every problem for at least 5-10 minutes, because all of them are nice

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

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

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

awoo can you please give some update regarding the rating calculation?

Whether for people who would be upgraded to Expert, the round will be rated or not?

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

Will bhediya sir is the solves 6 problems today?

Upvote: Yes

Downvote: Yes

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

Queueforces

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

please fix the queue

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

please fix the queue

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

Nice problemset. I wish the queue had been a little faster

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

i got tilted after round

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

E1 is a bluff. The exponential time brute force solution is more difficult than the greedy optimal solution I think.

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

    What's the greedy optimal solution?

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

    I couldn't figure out greedy solution even thought I tried for so much time. Finally had to submit E1 with brute force solution

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

      sort the array by sum of their i-th marble

      every turn:

      they will select the most sum

      and the color they selected cant play anymore

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

        yeah, makes sense. I don't know why during contest I tried sorting on basis of (a-b) and take from alternative ends. I thought alice would maximize (a-b) and bob would minimize (a-b), though it didn't work.

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

F was an interesting problem for me... still not sure how to approach it but came up with this proof-by-AC solution lol

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

    can you explain it

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

      I did a lot of drawings of the sample cases, and observed that a good strategy seemed to be greedily pairing the employees at deepest depth with the deepest available employee. So we go through the employees from deepest to highest, always pairing the employee with the deepest available employee. Two employees at the same depth are always compatible, and we know that an employee at a higher depth is compatible as long as there is more than 1 employee at that higher depth, so we keep track of all depths with more than 1 available employee.

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

        Good approach, thanks for sharing

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

        i thought of exact same logic ...but was unable to implement it.. can't we do with only storing employees at particular levels then pairing??

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

          How would it work with tree like this?

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

I do not believe how badly I performed... any advice on improving at game problems? I swear they are my kryptonite.

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

E1, E2 < D for me as i couldn't think of the easier solution and overkilled D.

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

    I think C>E1,E2>D, C take me a lot of time, while D is my first submission

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

      Same ..E1,E2,D have more trick parts and easy coding parts than C . And this contest had submission issues too which affected the performance of many of us for sure..

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

    make a 3x3 matrix of the activities with the most friends, and do recursion to find the optimal 3 days, sum of whose is our answer.
    Code: 238064464

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

what's the idea of d?

i can do both E how easy and hard version matter?

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

    Try all 3*3*3=27 combinations of the largest 3 values of a,b,c

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

      It is right.But how stupid i am that i solved d a few minutes after the game.

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

      You don't have to try 27 combinations even comparing 9 triplets works

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

        Can you explain how it's working? I'm not still getting it properly.

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

          You can sort all the 3 types of activities and preserve their indices. Something like $$$Element, Id[Element]$$$ for each of activity individually. Now you can sort all three activities. The ways you can form combinations are

          $$$max(A)$$$, $$$max(B):(id[B] \neq id[A])$$$, $$$max(C): id[C] \neq id[A], id[C] \neq id[B]$$$ or $$$max(A)$$$, $$$max(C): id[C] \neq id[A]$$$, $$$max(B): id[B] \neq id[A], id[B] \neq id[C]$$$ then you can do this for each of the arrays individually giving a total of 9 combinations

          • »
            »
            »
            »
            »
            »
            5 месяцев назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится
            bad implementation brute force but doesn't take that long to type
  • »
    »
    5 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I did it by trying all permutations the order of choosing, and when its ones turn to choose they just choose the biggest one where the day isn't chosen before, and just getting the max of all permutations.

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

    It can be done using dp with bitmasking. Here's the code: https://codeforces.com/contest/1914/submission/237970710

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

RIP my rating

should have not participate this round

couldn't solve E on time

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

nice round, me first time done 3 proplem in 1 round XD

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

Did decent in this round but unfortunately is unofficial because the changes for last round isn't updated. Can't enjoy the free rating :( Does anyone know how pF works? I solved G1 and have ideas for G2 but I couldn't think of how to solve pF at all...

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

    You can greedily try to to match for each vertex vertices only from different subtrees and then you are left with maximum 1 subtree with unmatched vertices where you can recurse.

    EDIT:

    238056332

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

    BFS and pair teams height wise (bottom to top) I think. If there are any remaining players (which happens when they are along a path of the tree), pair them up with players at a higher level with highest priority.

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

I think C > D D was very simple , but what is the idea behind C

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

    I got confused with D and not able to solve at all

    Please explain ?

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

      Only $$$9$$$ positions are useful. You just need to consider these positions and count the max answer.

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

    For C My approach was to take all the elements of A first Then greedily start removing elements of A from last and filling the remaining with the maximum available elements of B we have, while doing this keep taking max of all

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

    I don't think there was an "idea". Firstly it was clear that distinct problem solves would be a prefix. So just brute force on the prefix and for the rest of solves just take the maximum b[i] in the prefix. See, just brute force.

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

    Greedy approach, "if I decided to stop increasing my level at level $$$i$$$, what is the maximum score I can get?" if you stop at level $$$i$$$, then your best choice is to use the remaining $$$(k - i)$$$ plays redoing the maximum $$$b_j$$$ such that $$$(1 \leq j \leq i)$$$ again and again. So the answer is this maximum value across all $$$i$$$, just keeping in mind that you can't go to level $$$i$$$ if $$$k > i$$$

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

Запутанное определение начальника в задаче F. Пол часа решал не ту задачу. Одно расстройство...

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

    Сейм. Я вообще сначала написал топ сорт, а потом заметил это условие.

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

      Топсорт дерева?)))

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

        Ну да. Если бы начальник не считался родителем всех вершин, то можно было бы сначала сделать топсорт, удаляя одновременно по две вершины и получить бамбук с ним наверху. После этого просто посчитать, сколько максимально мы можем взять пар. Но, к сожалению, это оказалось неправильным решением.

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

Great round, thanks for clear and concise problems and strong test cases, helped to catch couple bugs. My personal best result so far

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

Can anyone one tell me how to approach and come up with the greedy solution sorting on a[i]+b[i] for problem E1 and E2?

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

    i just think which marble each player will select

    if A's turn A just pick what max(A get + B lose)

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

    Alice wants to save her balls and get rid of Bob's, they both equally affect the score. And the vice versa for Bob.

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

    If Alice picks ith-marble, score increases by a[i]-1 and if Bob picks ith-marble score decreases by b[i]-1. If Alice did not pick up the ith-marble in his turn, this means that his choice of say jth marble which increased his score by a[j]-1 is more significant than the impact of Bob decreasing the score by b[i]-1 in the following turn, compared to an increase of a[i]-1 and a decrease of b[j]-1. So you need to sort the array |a[i]-1|+|b[i]-1|, which is equivalent to sorting a[i]+b[i]

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

    Initially, both Alice and Bob got all the marbles. No matter who operates on color i, the difference between their marbles is fixed a[i]+b[i]-1, so do a[i]+b[i] Sorting, Alice greedily chooses the largest a[i], and Bob chooses the largest b[i].

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

    I think I can give a more clearly stated explanation to the solution discussed here.

    Consider current score as S.

    Now, think of two index i and j, where values in a and b are still > 0.

    Let these two index be such that Alice takes one, and Bob takes the other.

    Final effect on Score after the 2 moves:

    Case1 (Alice takes ith, Bob takes jth marble) : S1 = S + (a[i]-1) — (b[j]-1)

    Case2 (Alice takes jth, Bob takes ith marble) : S2 = S + (a[j]-1) — (b[i]-1)

    If S1 > S2:

    S + (a[i]-1) — (b[j]-1) > S + (a[j]-1) — (b[i]-1)

    (a[i]-1) + (b[i]-1) > (a[j]-1) + b[j]-1)

    (a[i] + b[i]) > (a[j] > b[j])

    Therefore, if both players move optimally,

    They take the marble from the index which has the largest sum, a[k] + b[k]

    Hence, the approach:

    Sort and construct the score based on (a[k] + b[k]) is a correct approach.

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

Will the rating change of this round take place after the previous educational round or on the current rating?

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

    I think this div 3 round's ratings update will be applied first, then the previous edu round, according to the latest announcement.

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

I've noticed the condition about head being superior over everybody in F, just after writing the solution, lol.

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

Amazing contest I enjoyed this Div3 specially problem C it's idea is very amazing and interesting to implement

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

D is a lot easier than C, you just need to care about three maximum elements of each array

My solution for D - Three Activities
»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Problem D was like, I know I can solve it. But how to get away with 3 way comparisons in 3 dimensions.

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

Speedrun until I forgot to update a value in D and got WA on pre#2, and it took an hour for me to realize my mistake, otherwise could have finished writing F and G2 which I knew how to solve by the end of the contest... RIP rating.

btw good E ig, interesting greedy problem.

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

D was way easier than C.I solved D(if you know vector's pair part you can solve it easily). Can someone explain main idea behind C?

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

Implementation forces

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

i am newbie here i have given the contest first time and this contest is showing unrated

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

    I think it is Rated. Look at that. Auto comment: topic has been updated by awoo (previous revision, new revision, compare).

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

Could someone explain the amazing solution 237977153 in G2 by jiangly? I don't understand the meaning of xor operation

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

    I think f[i] represents the set of all colours that occur exactly once prior to index i. It uses hashing to fit in a single integer and the xor means that after the second occurrence of each colour, it is removed from the hash. Then if there are two distinct indices i, j such that f[i] == f[j] and they are nonzero, all colours that occur between i and j only occur between i and j, and there exists another colour that "surrounds" them. Hence turning on any light bulb among this set initially could not be part of a minimal solution, because you would have to turn on one that surrounds them anyway (and that could have been used to turn that initial one on). So you can skip to the last occurrence of each f[i] when counting the number of ways.

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

    The core idea revolves around determining the number of ways to activate bulbs in such a way that disjoint ranges are covered. The approach involves finding** sets of bulbs that, when activated, cover a specific disjoint range**.

    Spoiler

    Let's denote the number of disjoint ranges as 'k.' For each range, we aim to identify the bulbs whose activation covers the entire range. Through some careful considerations, we conclude that we need to eliminate bulbs that do not contribute to extending the current segment. This elimination process is efficiently executed using prefix hash values and storing the last pointer for each unique prefix value.

    To illustrate this concept, consider the arrangement of bulbs: 1 2 2 3 1 3. The number of disjoint ranges in this case is one. Building prefix hash values results in pre[0]=1, pre[1]=1^2, pre[2]=1, pre[3]=1^3, pre[4]=3, pre[5]=0. After activating the first bulb, we jump to the bulb at index 1 + (last[1]=2).

    Spoiler

    The hashing technique employed here, as introduced by jiangly, is a so cool and unique that when understood properly can be generalized to solve a variety of other problems involving segment merging or ranges.

    const int mod= 998244353;
    
    std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
    
    void solve(){	
    	int n;
    	cin>>n;
    	vector<int>col(2*n);
    	for(int i=0;i<2*n; i++){
    		cin>>col[i];
    		col[i]--;
    	}
    		
    	//now through random number generator
    	//let's generate for each colour a unique random val
    	
    	vector<int>hashVal(n);
    	for(int i=0; i<n; i++)hashVal[i]= rng();
    	
    	//now make a prefix xor array of these hashed values
    	//so that we can effectively know how many 
    	//ranges of 0 to 0 we have
    	//number of min sets= number of ranges
    	
    	vector<int>prefixXor(2*n,0);
    	prefixXor[0]= hashVal[col[0]];
    	for(int i=1; i<2*n; i++)prefixXor[i]= prefixXor[i-1]^hashVal[col[i]];
    	
    	//number of zeroes = no of ranges
    	int ans= count(prefixXor.begin(),prefixXor.end(),0);
    	
    	int ways=1;
    	map<int,int>jumpTo;
    	for(int i=0; i<2*n; i++){
    		jumpTo[prefixXor[i]]= i;
    	}
    	
    	for(int i=0; i<2*n;){
    		//start of range-> prefixXor= hashedVal[i]
    		
    		if(prefixXor[i]==hashVal[col[i]]){
    			//inside new range
    			//jump directly all the ranges lying
    			//completely inside it and not helping in
    			//extending it
    			
    			int active=1;
    			int j=i;
    			while(prefixXor[j]!=0){
    				j= jumpTo[prefixXor[j]];
    				active++;
    				if(prefixXor[j]==0)break;
    				j++;
    			}
    			ways= (ways*active)%mod;
    			i=j+1;
    		}
    	}
    	cout<<ans<<" "<<ways<<endl;
    	return;
    }
    
»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I am new, could anyone explain what is open hack timing that is going on now?, it wll affect in rating ?

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

What's the idea behind F? I observed that we can pair up nodes from the $$$root(1)'s$$$ children and thier respective $$$subtrees$$$ as long as we can, Then the left over nodes in each children's subtree can be paired $$$iff$$$ they are leaves? I don't know a fast way to do all this? What's the optimal / correct approach?

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

    You should just take maximum of possible pairings, no matter if it's leaves or not (just make sure they are from different branches). I've got my brain melted after writing the append of results of child-dfs to current res (.0 = pairs, .1 = available people in subtree) (solution). Same thing but much simpler is in the jiangly's solution

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

      Ahh I see thanks I shouldn't have messed around with leaves bruh, Thanks!

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

Problem C: You can do at most $$$min(n, k)$$$ quests. To get first $$$m$$$ quests completed, you need to complete each of $$$m$$$ quests for the first time, then you have $$$k-m$$$ quests remain, of course you want to choose which quest brings the maximum profit, in this case, it is $$$max_{i=1}^{m} b_i$$$.

Read my solution for C - Quests for better clarification
»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Solved 4 for the first time, had also solved 5th on paper but made an error addition for test case 4 to eventually discard my solution, had i not made the mistake i would have got the 6th question too. Should i call this a successful round for myself or try solving grade 1 mathematics to improve my addition and subtraction..

»
5 месяцев назад, # |
Rev. 2   Проголосовать: нравится +4 Проголосовать: не нравится
problem D is similar to problem in book called (`competitive programming handbook`) but with different story and in the book he ask about the minimum but in the problem he ask about the maximum...I solved this problem when I encounter it for the first time ...but in the contest I copied the code form the book and change it ..does it consider cheating ???

you can find it in chapter of bit manipulation (dp with bitmasking)

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

I wonder how many proved E

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

    If you have proved it,can you pls provide a proof of it?

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

      I imagined that both alice and bob actually have 2 arrays: 1 is empty and the other one is from the statement. So by 1 operation alice or bob delete a[i] / b[i] from the statement array of an opponent and then add b[i] — 1 / a[i] — 1 to the empty array. Then I determined the final score as diff between sum of elements of both alice arrays and sum of both of bob arrays. It's easy to see that with these 'new' rules the max final score will be determined by the same sequence of turns as with the 'original' rules. Then we can notice that if it's Alice's turn, the final score will increase by a[i] + b[i] — 1 and if it's Bob's turn the final score will decrease by a[i] + b[i] — 1.

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

      Let's assume that Alice picked the pair $$$(x, y)$$$, then she will gain $$$(x - 1)$$$ pts. And moreover, she will also make Bob lose $$$y$$$ pts. Hence, the relative gain she made by picking the pair $$$(x, y)$$$ is $$$(x + y - 1)$$$, which is also proportional to $$$(x + y)$$$. Thus, she will greedily pick the pair with the largest sum. Bob will also follow the same approach to play optimally.

      Now, we can just sort the vector<pair<int, int>> in decreasing order of the sum of both elements of the pair and assign them alternately to each player.

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

    proof was my way to solution. i couldn't guess.

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

The explanation of issue A is very, very bad

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

someone explain how to solve E to me?

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

    Try merging the total amount Alice and Bob have and choosing the optimal values greedily from the sorted merged set of values.

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

    see this guy's solution: https://leetcode.com/problems/stone-game-vi/solutions/969817/strategy-proof/

    only difference between the leetcode problem and E2 is that in E2 you subtract n % 2 from the answer.

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

    Basically after each move each player in profit of a[i]+b[i]-1 coin if he choose ith index so make a set of pair and insert a[i]+b[i] in set with its index.(only if a[i]>0 & b[i]>0) and in each move pop greater sum index and do operation according to player while set is not empty.238003308

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

    look from the perspective of alice & try to make score of alice as much as possible.

    Now lets consider two elements a = [x1, x2] & b = [y1, y2] then in this case in which case alice will win

    say alice first selects y1 to remove from b then score will be (x1-1 — y2 -1) because then bob will only left with x2 to remove

    similarly if alice remove y2 first then score will be (x2-1 — y1-1)

    now see in both the cases which is giving higher score simply sort the index with value x1 as first for alice and then alternately removed one by one because we have sort it such that it'll give maximum score to alice on its turn bob will try to remove the next maximum possible to minimize the score.

    Check solution here : https://codeforces.com/contest/1914/submission/238051187

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

      Thanks I will check out more on this problem. I have seen too many different ideas and gotten even more confused.

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

a few minutes late on G1. feels bad

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

D >>> E

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

I've never done problems with easy and hard difficulty before ; was I supposed to send my answer in both difficulties ? Or just sending it on hard gives you all the points?

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

Can anyone provide any counter test for F https://codeforces.com/contest/1914/submission/238060620

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

In this contest time, I am not able to entering in the contest arena about one hours. In this one hour I am just seeing security checking. This problem also happens in the previous div3 contest. Why????

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

In this contest time, I am not able to entering in the contest arena about one hours. In this one hour I am just seeing security checking. This problem also happens in the previous div3 contest. Why????

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

Did anyone tried solving D using heap? pop largest 3 a,b,c such that they dont have same date.However i think here we miss many test cases

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

    dude D is very easy just brute over the top 3 on each group and check if there is different date since we are sure we will find a combination for such conditions

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

    yeah solved using heap

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

      jo maine comment kiya h usse kya alag kiya? i don't know Cpp, can't understnd your submission.yha bta de plz

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

    I have tried this approach by storing sorted elements in a stack and popping if they belonged either to the same index or the same kind of event. This approach however does not work because it means that you will always choose the highest popularity on the first pick. Lets say u had 99 and 95 in A and 98 and 1 in B assume any value for C. If you choose 99 in A which will be on top of the heap you will fail to choose 98 for B which happened on the same day. 95+98>99+1. Here heap approach fails and you will have to compare the highest 3 to get answer.

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

can anyone explain the intuition behind greedy optimal solution for E2, like using a set which stores (ai+bi) and then iteratively taking the max value, what was the logic behind it, also is there any solution to E2 which passes and is not greedy?

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

    If you play as Alice and take i on some move, you earn a[i] — 1 because Bob can't decrease this number after your move (-1 because you decrease your number by 1), and you earn b[i] because Bob loses b[i] marbles. And now you play as Bob and take j on some move, you earn b[j] — 1 because Alice can't decrease this number after your move and you earn a[j] because Alice loses a[j] marbles. So you need to maximize the same thing (a[i] + b[i] — 1) for both Alice and Bob on every move.

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

    in each step you try increase yours score and decrease opponent score as much as possible so A[i] + B[i] its just how much you can get if u pick i-th element, increase for A[i] and descrease for B[i] (and opposite for bob)

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

i registered for the contest earlier but have joined some seconds late , is this the reason this contest became unrated for me, i am a newbie and this is first contest i have given

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

How to brute-force E?

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

    for E1: just use the mini max algorithm: check my submission

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

i did dp for d 238005542

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

i did dp for d 238005542

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

Me After reading problem statement of A :

drawing

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

Hey Codeforces community,

Today, I came across YouTube videos featuring solutions to problems from an ongoing Codeforces contest. It's crucial for us to uphold the principles of fair play and maintain the integrity of our contests.

Sharing or seeking solutions during an active contest undermines the spirit of healthy competition and the learning experience for everyone involved. Let's all be mindful of the Codeforces guidelines and promote ethical practices.

C : https://youtu.be/HX7hfWtbu34?feature=shared D : https://youtu.be/nRizpg7ohUM?feature=shared E1 and E2 : https://youtu.be/5-QQxSMgVEA?feature=shared

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

Hope this time i get green

»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
in problem F what is the meaning of the second condition
   1) employee x is the direct superior of employee y
   2) employee x is a superior of the direct superior of employee y.

does it mean that only parent and the parent's parent are superior of the current employee or the whole chain of parents in which the employee lies are there superior.
It seems so confusing.
»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Bro, I managed to solve G1 after the contest and was glad that I could change it a bit for G2, but when I saw others' solutions for G2, I was completely baffled! Could someone please explain the solution for G2?

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

    In problem statement it's highlighted in bold: exactly two light bulbs for each color. Tbh, I didn't notice it during the round. So when we have a group of bulbs with 2 of each, we have SCC and can turn it on with just 1 switch in |group| — |sub sccs| ways. 2 of each color => xor == 0.

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

Is there no streaming of this contest?

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

Could anyone please explain how C is solved with a greedy approach?

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

    Suppose you pick all the quests until the index $$$i$$$ just once ($$$i$$$ must be less than or equal to $$$k$$$). You still have $$$(k - i)$$$ moves remaining, and you can only choose the quest with an index less than or equal to $$$i$$$. We will greedily choose the quest with the largest value of $$$b$$$.

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

Can any setter/ tester provide 3944th case in the 2nd test case of problem F?

Thanks in advance!

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

So why it's unrated for me?Or it's unrated for everybody? What's the reason?

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

Long long integer timeout for question C.

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

CF predictor is trash now. Showed +100 in educational round. Just gained 47. Thankfully became Pupil. Also it was showing +125 for this contest but i am certain there will be almost no change in rating. Anyone can share their experience with carrot predictor?

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

Can someone explain F to me?

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

int dp[100003][2][2][2]; int f(int i,int x,int y,int z,vector &a,vector &b,vector &c){

if(i==a.size()){
    if(x==0 && y==0 && z==0) return 0;
    return -1e17;
}
if(x<0 || y<0 || z<0) return -1e17;
if(dp[i][x][y][z]!=-1) return dp[i][x][y][z];
int ans=-1e17;
ans=max(ans,f(i+1,x,y,z,a,b,c));

ans=max(ans,a[i]+f(i+1,x-1,y,z,a,b,c));

ans=max(ans,b[i]+f(i+1,x,y-1,z,a,b,c));

ans=max(ans,c[i]+f(i+1,x,y,z-1,a,b,c));

return dp[i][x][y][z]=ans;

}

int32_t main(){ int ; cin>>; while(_--){

int n;    
   cin>>n;    
   vector<int> a(n),b(n),c(n); 
   for(int i=0;i<n;i++) cin>>a[i];      
   for(int i=0;i<n;i++) cin>>b[i];
   for(int i=0;i<n;i++) cin>>c[i];
   memset(dp,-1,sizeof(dp));
   cout<<f(0,1,1,1,a,b,c)<<endl;

}

}

Why does this code give me TLE? By changing the dp array to the dp vector, the solution has passed.But with dp array, it's giving me TLE,Can someone explain what is the reason?

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

    maybe because of memset.... its kind of 1e5 times for every test case t and limits of t is 1e4

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

Can anybody explain the problem statement of F to me? Why is 3,4 the only team in the first test case? 1's superior is 1, 2's superior is 2, and 3's superior is 1. So, 2,3,4 are superior to nobody. But then why is 3,4 the only valid team?

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

    Nope, question says The second line contains "n−1 integers p2,p3,…,pn(1≤pi≤n), where pi is the index of the direct superior of the i-th employee." So, in 1 2 1; first number is direct superior of p2 => p1 is direct superior of p2 ; second number is direct superior of p3 => p2 is direct superior of p3 ; third number is direct superior of p4 => p1 is direct superior of p4 ; So, only (3,4) is valid team.

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

этот раунд будет рейтинговым для тех, кто по итогам education div.2 стал синим, но на момент написания div.3 еще не был им?

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

Help needed with E2

This is giving runtime error on test 9, if I use multiset but it works with priority queue or sorting the sum, but why does it give rte if I use multiset ?

https://codeforces.com/contest/1914/submission/238110925

int main() { init_code();

int T; cin >> T;

while (T --){ int N; cin >> N; vector a(N), b(N); for (int i = 0; i < N; ++ i) cin >> a[i]; for (int i = 0; i < N; ++ i) cin >> b[i];

multiset<pair<ll, ll>> st;
  for (int i = 0; i < N; ++ i){
     st.insert({a[i] + b[i], i});
  }   

  bool flag = true;
  ll res = 0;
  while (st.size()){
     auto it = st.end();
     -- it;
     st.erase(it);
     res += flag ? a[it -> second] - 1: -(b[it -> second] -1);  
     flag = !flag;
  }
  cout << res << endl;

} }

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

Waiting for system tests finish?

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

is this rated

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

为什么无法提交呢

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

sorry , it is a coincidence , i am a fresh man in the codeforces , I don't know why this happened,I promise this is just a coincidence.I'm making a little progress.I released my code in ideone.com.Someone else must have done it.I hope you can return my rating

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

The DP implementation for D can be found here. https://cses.fi/book/book.pdf Page 112

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

238021917 Why is this giving runtime error in test 24?

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

Is system testing done?

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

When will the ratings come...

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

I am writing in context to the email i received stating similarities between my code and other peoples code for problem 1914C. I have not used any unfair means but had just copy pasted the snippet from a famous github repository(I hope thats fine!). I request you to please keep me involved in the contest rating(Although i will be getting a negative delta).

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

    same with me too..

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

    I request you to look into this. I They literally did not consider any of my submissions just because they coincidently found a similar code to mine for 1 question. If I would have to cheat ,why would I not cheat in the other 2 questions I solved? I request you to either please unrate me for this contest or give me my true rating.

    It is in context to Codeforces Round 916 (Div. 3). MikeMirzayanov

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

When will results be out

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

I received an email regarding similarities between my code for problem 1913B and that of other participants. I would like to emphasize that I did not intentionally copy any code and, to the best of my knowledge, I independently developed my solution. While I understand the need for fairness in the competition, I want to highlight that any resemblances might be coincidental. Despite the potential negative delta in my rating, I request your understanding and consideration to allow me to remain engaged in the contest rating

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

    i didnt receive any email but my ratings have been r3dacted for the last 3 rounds. why did this happen?

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

I am a newbie here and my rating is currently 0, i solved problem A and C but my ratings isn't updated yet what rating should i expect??

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

    depends more on your ranking and i am kind of surprised that you solved C instead of B i mean B was much easier than C B<D<C this is what i think

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

Hi, I was given a violation for sharing code with someone else. I accept that It was my fault to share the code, but I did not know that he would use that code for submission. I knew that if someone submit the same code as me, it would get caught in the system. I am very sorry for what I did.

But I am the legit writer of that code. I submitted way before him, I can only say that to prove that I was the legit writer of that code. Can you please remove the violation and give my scores back. If not, can you please at least tell me if this violation be any problem in future for me? Should I be worried? I promise not to share my code with anyone during contest in future. My submission number mdraihanhossen/237973286 and the person whom I had given the code, his submission number is mahin_sarker/238024074.

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

I have received an email and a notification from a system regarding my solution to Problem C colliding with some other users. I had done my code independently without any help from anyone. I don't know how my code is similar to others. Please return my rating. Or ensure me that this is not giving me problems afterwards.

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

When can i get my rating as a newbie……

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

hello, i have recieved a message from 'system' about solution to a problem being similar to another user called 'imspooky532'. I want to clarify that the other account is owned by me and i had no idea that it is a violation to contest guidelines. I would not enter the contests with my other account now and i apologize for all the trouble. if it's possible to remove the 'skipped' verdict then please do so, if not then i understand

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

as i have commented earlier with my account siddharthraj532, this account will no longer be used in contests from my side as it violates the guidelines. i once again apologize for the troubles. My verdicts for yesterday's contests are 'skipped' (the answers were correct), if there is a possibilty to fix this then i'd be grateful, if not then i understand.

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

my attempts to submit the C problem were ignored, but to be honest, I didn't understand why, my solution was written there like someone else's, but it's so sad that I solved the contest almost the whole round, and using the theme of my previous solution from the site on similar topics informatics(it's site) (many have there there is the same solution) I got a disapproving result on a task similar to the one I solved in the courses I attended (in my city, and the people on the list, as I understood, live far from me), the task was on the topic of simple counting, where I considered all possible cases according to the formula that I came up with on the go and used (to count the number of elements) to multiply by the value(write something how I can correct or apologize, I have been going to my rating for so long, solving the 2nd division, even though I was not so good at it) I am open to any form of verification to clarify this situation. Thank you for your understanding and attention to this issue. I am looking forward to solving this problem.

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

Your solution 237967879 for the problem 1914B significantly coincides with solutions peasantbird/237967879, srivathsava_337/237999030, Rohith_Sai_143/238001247, hitheshsiripireddy/238006274. 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.

Hi! I am hoping to prove that I wrote my solution independently and did not share it with anyone, and I hope that you would be able to help me reinstate my participation in this contest. I wrote the solution 237967879 on IntelliJ independently. My submission was prior to the 3 other submissions, and I had to come up with this solution on my own. I do not know who these people are, nor did I share my answer with anyone as I immediately just went on to do 1914C next. As such, I am not sure how these people may have copied my answer, or perhaps our solutions just coincided because of the limited number of ways to solve this problem.

I hope you or Mike could take some time to help me look through this! If there is anything else I need to show to prove that I wrote this answer on my own and did not let anyone else copy, please let me know!

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

labuda

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

MikeMirzayanov — I'm not a cheater for this contest ! Similar codes may be coincidental.

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

    WOW !! You submitted the same code, changing the variable name mb to ar .. And is it a coincidence ??

    Your submission: 237968347 t = int(input()) for _ in range(t): n, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split()))

    ar = [0] * n
    ar[0] = b[0]
    for i in range(1, n):
        ar[i] = max(ar[i - 1], b[i])
    
    ans = 0
    cnt = 0
    for i in range(min(k, n)):
        cnt += a[i]
        rem = k - (i + 1)
        cur = cnt + rem * ar[i]
    
        ans = max(ans, cur)
    print(ans)

    Your friend(/co-cheater)'s submission 237961744 t = int(input())

    for _ in range(t): n, k = map(int, input().split())

    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    
    mb = [0] * n
    mb[0] = b[0]
    for i in range(1, n):
        mb[i] = max(mb[i - 1], b[i])
    
    res = 0
    tot = 0
    for i in range(min(k, n)):
        tot += a[i]
        rem = k - (i + 1)
        cur = tot + rem * mb[i]
    
        res = max(res, cur)
    
    print(res)
»
5 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I am writing in response to the email I received regarding the similarity of my code with others in the recent contest.

I would like to firmly assert that at no point did I engage in any form of dishonesty or cheating during the competition. The code I submitted was entirely the product of my own thought process and effort. I had diligently worked on the problems and developed the solutions independently, without any external assistance or copying from any source.

I was not aware of the similarity of my code with that of other participants until I received your email. This coincidence is as surprising to me . I understand the importance of integrity in programming contests and always strive to uphold these values.

I am open to any form of investigation or scrutiny you deem necessary to clarify this situation.

Thank you for your understanding and attention to this matter. I look forward to resolving this issue.

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

    If you look at E1 and E2, I was not able to think of the greedy criteria of a[i] + b[i] at first so i had brute forced it for E1. I coded this up in the last 5 minutes when the solution came up to me. Idk what else i can do to justify my innocence :/

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

      Comment the message you received from the system here if you are innocent ..

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

        System

        flownn Attention!

        Your solution 238049911 for the problem 1914E2 significantly coincides with solutions artemfad/238024787, karitkar7/238026318, manikanta2004/238028742, heckeruwuu/238042370,flownn/238049911, ayush_jhajharia/238050136. 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.

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

          It is visible with naked eye. I can't understand why you are still claiming ...

          Anyways, I ran MOSS on all 6 submissions ..
          And you can check result here Plag Check Results

          Though many solved it using the same logic, your implementation is the exact same which could never happen unless you had copied it.

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

I recently received a notice regarding a potential rules violation related to my submission for problem 1914D in the [Div 3] contest. Upon reviewing my code and the solutions mentioned in the notice, I would like to emphasize that my solution was developed independently, and I did not intentionally violate any rules. I also want to confirm that I did not use any common sources, and my code is not based on code snippets or logic from other participants during the competition. I understand the importance of maintaining a fair and competitive environment, and I take these rules seriously If the notice mentions unintentional leakage, I want to clarify that I did not use any online platforms with public access to my code, such as ideone.com with default settings I am committed to upholding the rules and integrity of Codeforces, and I am open to any additional steps required to resolve this matter. If there are specific guidelines or actions you recommend, please let me know, and I will ensure prompt compliance. Thank you for your attention to this matter, and I appreciate your assistance in resolving it. Sincerely, tripathiharsh1102

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

When would the editorial be out, now that the hacking phase is also over?

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

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

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

I have received an email from the system regarding my solution to Problem C matching with other users. I have done my code by my own and I did not share my code to anyone also but I don't know how my code is similar to others. Please return my rating.

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

As some of you, i got RE on test 24 for E2 problem. I didn't know that comparator must return false on equal elements. Even thou, I'd like to know WHY this submission got ac without changing the operator. 238177631

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

    Providing a comparator that does not satisfy strict weak ordering to sort() is undefined behavior.

    So getting a correct answer is one of the possibilities.

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

      Ohh thnx. Even tho, i got surprised that only chanching the #define int long long and removing the empty constructor got ac. Well, i will not leave anything by change again.

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

I've observed a discrepancy in the rating increase on my account. After solving three questions, my rating only increased by 32 points (from 970 to 1002). However, I've noticed other users who have gained a higher rating increase, such as 53 points (from 1065 to 1118) after solving two questions. I want to express my concern and kindly request a reevaluation or clarification on the rating calculation process. I understand the importance of fairness and accuracy in such systems. Could you please assist me in understanding the reason behind this difference? I appreciate your attention to this matter and look forward to a resolution. Thank you.

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

So far, I am satisfied with the situation of the citizens of our country. But we could do better. We are Russians!