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

Автор Stefan2417, 5 недель назад, По-русски

Привет, Codeforces!

Спустя год ожиданий и нескольких полных изменений набора задач я рад пригласить вас принять участие в Codeforces Round 948 (Div. 2), который состоится в воскресенье, 26.05.2024 17:35 (Московское время). Раунд будет рейтинговым для участников с рейтингом менее 2100. Участники из первого дивизиона приглашены принять участие в раунде вне конкурса.

Вам будет дано 5 задач и 2 часа, чтобы их решить. Все задачи раунда придуманы и подготовлены Stefan2417 и alexchist.

В раунде может встретиться 1 или более интерактивных задач. Рекомендуем прочитать этот пост.

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

  • Vladithur за отличную координацию раунда!

Разбалловка: $$$500 — 1250 — 1750 — 2000 — 2500$$$.

Ваше видение разбалловки может отличаться, поэтому не забудьте прочитать дальнейшие задачи, если вы застряли на какой-то.

Upd: Поздравляем победителей!

Div 2:

  1. sun_gan_chou_yu_guan

  2. Maksiwelle

  3. suomynonA

  4. new_mistakes

  5. Kosyaaa

Div 1+2:

  1. tourist

  2. Sugar_fan

  3. sun_gan_chou_yu_guan

  4. abc864197532

  5. BurnedChicken

Upd: Появился Разбор

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

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

Автокомментарий: текст был обновлен пользователем Stefan2417 (предыдущая версия, новая версия, сравнить).

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

Школа ЦПМ вперёд!!!

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

Это мой одногруппник

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

Не знаю что там будет, но Саша и Стёпа крутые ребята, поэтому, уверен, раунд тожа будет крутой!

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

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

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

As a tester, there are some beautiful ideas in the tasks, and I encourage everyone to participate!

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

Не знаю кто такие Саша и Стёпа, но раунд крутой, поэтому, уверен, Саша и Стёпа крутые ребята!

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

cf > ipl

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

As a tester, I can assure you that this is definitely one of the rounds ever created.

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

as a participant, will I make it to expert?

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

Yaaay another round :D

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

As a participant, I am 100% sure that the contest will happen. Hope it stays!!!

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

clashing with IPL final

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

As a tester

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

As a participant hoping to get positive delta today :)

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

Participating in the contest the night before the exam. Only the brave coders can do it.

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

Only the brave coders can participate in a contest on the night before an exam.

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

Need only +1

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

Hopefully, the problem statement will be short and precise just like the announcement!

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

wishing to get one step closer to cyan!

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

Since the last 5 contest I'm stuck at 1100's hoping to cross 1200 this time. Best of luck everyone :)

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

The score of problem B is 1250!hoping to get positive delta :)

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

Это мой первый будет раунд!

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

As a participant, I hope I solve 2nd problem quickly :(

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

I sooo want to appear for this round, but same time IPL finals.

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

C looks buff

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

I think it's time to repeat all Stefan tricks... https://codeforces.com/blog/entry/117352

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

I rarely get any positive delta in Div2. Hope this time is my time. :)

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

I rarely get any positive delta in Div 2. Hope this time is my time. :)

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

Hoping for a positive delta

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

cf>>>ipl

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

Hoping to solve first two problems in short time and get some fun.

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

Hoping for Becoming cyan participant :)

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

1750 for C... interesting.

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

My confidence booster to achieve high positive delta

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

500A to direct 1250B that is some score gaps i am seeing.

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

Scoring is wild on this one

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

Kontest > IPL hehe...

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

I forgot to register for the contest and now i am not able to submit problem?

please help

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

《The round may include one or more interactive problems》 why do you want to deceive me ┭┮﹏┭┮.

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

now, nikita is a boy!!!! its a girlllll

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

Low quality problems especially C

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

Ai can solve problem B like chatGPT 4. there are lots of people who use GPT4 to solve problem B. you can find many newbies who solved problem B but could not solve problem A. Xd I think the round should be unrated. and setters ensure that any problem can't be solved by any AI.

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

    Exactly. Also a few youtube channels show the answers to the problems before the contest ends. It is unfair for those trying genuinely. I am not sure if there is any way to catch those who copied and those who tried on their own. Otherwise ratings of this contest will be false representation of ones capability.

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

    I want the round to be unrated to dodge this -40 delta I'm about to get :(((

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

    It's already hard to check for AI solutions and also it's very hard to come up with div2A which will be unsolvable by LLMs.

    I think it's not feasible even now but in 6-12 months LLMs will be able to solve most existing div2A and div2B and some div2C so it will be almost completely impossible to prepare AI-resistant div2 contests.

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

      So are we near to the end of CP(atleast for those solving Div2 A,B & C)? Because most of the participants on codeforces are able to solve only Div2 ABC. If these problems are taken by AI then we will see only purple and above competing.

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

        This is not the end of CP but will create some issues. Cheating is already a problem but it will be way more widespread soon.

        You can just ignore cheaters, e.g. compete with your friends or try to solve as much problems as possible. Or maybe at some day there will be alternative rating system which will be based on difficulty of tasks but not in comparison with other participants.

        Also, look at chess, they have much worse problem with cheating, it is not only more direct PvP game (so experience suffers from cheating more), chess AI on smartphones is way stronger than humans so the problem persists even at elite level.

        Nevertheless, chess is alive and well even though there is a sometimes heated discussion about cheaters and anti-cheating measures.

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

        AI compiles all the data from its dataset and gives you an answer. You may solve Div2A or Div2B (rarely) as it does not contain new things or logic. You can find that AI can solve many standard problems of various DSA topics, which are pretty tough and challenging to understand.

        So, for AI to solve problems, the person using AI must know how to solve the problem and what prompt is required to give to the AI model for it to create the solution. AI can help reduce your labour work but cannot think on your behalf. So, instead of crying about it, learn different topics and upskill yourself. Also, Idk if it's valid for you, but if you were unable to solve a problem, then it's your fault or lack of knowledge/skill. You also have the access to GPTs, you could have also solved the problem using the similar way.

        Just because you couldn't solve doesn't means that the round should be unrated

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

      Well may be ,if the language of problems is twisted

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

    I wasn't able to perform as well as others == The round needs to be unrated

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

What a terrible problem distribution, I was performing at ~2000 rating despite having solved only 2 problems, and this was till last 30 mins of the contest.

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

Speedforces

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

cant believe beat jiangly to problem E lmfao

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

.

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

I solved D using hashing. For each column there are $$$\leq n + 1$$$ ways to get only one $$$1$$$. And these "ways" are almost identical. (We should either remove all $$$1$$$ and recolor one $$$0$$$, or remove all $$$1$$$ except one)

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

is problem C using dp?

I tried tokenize each element by counting prime factor then greedy n^2 but didn't worked.

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

    Yes it's kind of dp, the main idea is that there are 2 options:

    1. LCM of whole subset is larger than max(a) -> then answer is n
    2. LCM of whole subset is <= max(a) <= 1e9 and then there are not that many possible LCMs, I don't have a proof but intuitively if you have a lot of different prime factors, then LCM quickly grows to be large and also that if you add a new number to a subset LCM either stays the same (does not increase amount of LCMs) or multiplies (so grows very fast).

    So the solution is: check for option 1, if it's not the case just keep dp = map<LCM, max_subset_size> and add elements one by one (iterate over all previously calculated LCMs) and update dp

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

      For the 2nd point, every possible LCM that can be formed from the subsequences will be a divisor of the maximum. So there are at most ~1000 divisors.

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

      I used the same approach but got tle. Any particular reason you can think of?

      Edit: Got the correct answer was getting integer overflow. while checking intitial condition :(

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

        I had overflow as well initially, thankfully pretests cached it in my case

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

      Hey, I tried coding this out but got WA on test 8. Could you please tell me where I'm going wrong?

      Edit: I found my mistake. I did not account for the fact that sometimes the LCM could be so big that it overflows. I simply added a check to see if the LCM ever got bigger than $$$10^9$$$, and it ACed. Thanks!

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

can you give me hint for B please

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

E is very similar to this problem: https://oj.uz/problem/view/IOI23_longesttrip

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

is C brute force try all subsets of factors of the largest element to see which subset will give the largest count

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

    Basically, yes. You first calculate the LCM of all the numbers. If that number is greater than $$$10^9$$$ then the LCM cannot be inside of the array, so you just take all the numbers. Otherwise, you iterate over every divisor of the LCM (works in $$$\sqrt{LCM}$$$ time), check for each number in the array if it's divisible, and then return the maximum result. Here is my submission: Submission

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

      good idea, thanks for sharing.

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

      I think if the $$$LCM(array)$$$ $$$>=$$$ $$$max(array)$$$ is more appropriate than checking $$$>=$$$ $$$10^9$$$

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

      can you tell me what you are doing in this line? Thanks

      if (tl != x)continue;

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

        Let $$$x$$$ be the considered divisor of the LCM, and $$$S$$$ be the set of all numbers in the input such that $$$x$$$ is divisible by that number. The variable tl represents the LCM of the set $$$S$$$.

        For a subsequence to be valid, the LCM of that subsequence is not allowed to be in the input. Now, if the LCM and $$$x$$$ are not equal, there might be a chance that the LCM already is inside the input, so we just skip it. If the set $$$S$$$ was a valid subsequence however, then it would pass this constraint when the considered divisor $$$x$$$ is different, namely the same as the LCM of $$$S$$$.

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

Yeah, this contest, its uh...., NOT GOOD.

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

Optimal approach for C?

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

    Find LCM of list. If LCM > max element: answer is n.

    Otherwise iterate through all factors of LCM.

    If factor not in list. Keep track of cnt of items divisible by factor and LCM of said items.

    Answer max(cnt of items for all factors not in list and where LCM(items) = factor).

  • »
    »
    4 недели назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится
    • If LCM of array =/= largest value in array, answer is N
    • Iteratively calculate LCM of array. If at any point exceeds 10^9, we know the above case is automatically satisfied.

    Now, where LCM = largest value in array = L.

    The LCM of the elements for our answer can be only factors of L. So, find all factors of L.

    For each factor of L that does not appear in the original array, count how many maximum elements divide it. Ensure that LCM of these elements = this factor. If this is satisfied, find maximum across all count values.

    complexity: O(N sqrt(max(A_i)))

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

How to solve D, I was trying to solve it in O(n*m*min(n, m)), was getting TLE on pretest 19 :(

  • »
    »
    4 недели назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится
    i had a hashing soln but i couldn't submit due to small bug.
    my idea is for each column compute all possible operation which can be made on i'th column  such that i'th column becomes special
    there will be n such operation possible ops
    pick the operation which occurs most of the times
    
  • »
    »
    4 недели назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Even I'm wondering how to D. I had some partial ideas , first of all take a particular column j , and make all it's elements zero , by choosing appropriate rows and inverting them. Then we can choose an i such that we will again apply inversion at the row i making this column good with 1 at row i. Now all the other columns , which had a 1 at i_th row and one more 1 at some other row will become good , but the main challenge seems to me is how to find them efficiently?

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

      let mask = j'th column which wan to make specail
      if you want i'th position to be 1 and all other positions 0, operation required is
      ops = mask ^ (1 << i)
      now you can use hashing to store all these ops and pick the most frequent ops

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

    I saw your code and you have the right idea for small $$$m$$$.

    For small $$$n$$$ you can just iterate over all the $$$n$$$-sized bitsets that make each column have exactly one 1, group them in a map, and return the bitset that maxes the result.

    Code: 262803308

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

      Wow great!! Got it, that’s an amazing solution. I think if we use hashing along with your method, that would pass for any n and m. Thanks!

      Upd: I tried Hashing 262808152, getting wrong answer on test 4. Cannot really figure out why, I tried to debug it and there is a collision, 2 different bitsets are giving the same hash. I’ll try to figure out why. Also I tried submitting with multiple different values of mod and p but still the same result :(

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

        I was having the same issue, and I fixed it by having two keys with two different primes (I am using polynomial hashing).

        It is definitely not an elegant solution, and I see the other guys doing something with rand that probably provides a better solution (but I honestly do not understand it).

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

          Damn, I never expected it was actually due to collision, because I tried so many values different values of mod. I thought there was some flaw with the algorithm to hash 2 vectors the same. I'll try double hashing then. Thanks!

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

            You can overcome this by again calculating the max value using the hash you found (changing the columns accordingly) . This gives correct answer (I implemented this) but cannot say why this works.

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

how to approach B?

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

    First convert x into binary form 10110100111.
    After that fix all positions where you have 11.

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

      I'm not sure if it works, but I had two cases:

      1. We can see that if we have two consecutive digits that are 1's in binary we can increment i-1 and set i+1 to -1. For example if we have 3 in binary (11) this is also: 1*4 + -1*2 + 1*1.
      2. If i is -1 and i+1 is 1 then we can set i to 0 and i+1 to -1. For example, 3 = 1*4 + -1*2 + 1*1 = 1*4 + 0*2 + -1*1.
    • »
      »
      »
      4 недели назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      What about the number which has 29 1's like 2^30-1

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

    if x is odd we can turn x divisible by 4 by either adding 1 or subtracting 1, and if x is divisible by 4 the next element can be 0 meaning there can always be 0 between 2 non zero elements

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

i need 5 more minutes for D i am too noob at implementation. i had a small bug in code :(
upd : it's a correct AC soln

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

Even though I was only was able to solve 2 questions, I must say the questions were really interesting

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

Please someone explain Question : D Thanks in advance.

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

I was NOT happy by joining this contest.

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

CHATGPT

ChatGPT give me correct solution to B

LOL

I think most of participants use ChatGPT to get the solution

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

    no, I didnt

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

    many participants do cheat but the whole point of solving cp problems is to improve problem solving skills or to get dopamine boost after solving a problem which you don't get just by copy pasting code

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

    Conest should be unrated

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

I love this round!

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

B is not easy T_T

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

B is not easy :(((

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

    TBH this B = normal C, this C = normal D, this D = normal E. Tough round, but you need only 3 instead of 4 questions to get massive + delta.

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

    I just submitted it after the contest my bad :)

    My idea was something like this (I'm trying to prove it formally, but couldn't yet succeed) —

    If the binary representation has $$$x$$$ digits, then my claim is that — in the given constraints, we can build the array in almost $$$x+1$$$ digits. I wrote a recursive function to implement this.

    AC Submission: https://codeforces.com/contest/1977/submission/262782660

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

Unbalanced contest, downvoted

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

how to avoid tle in c?

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

I thought the problems this contest were nice (and normal). For some reason the standings seem very unbalanced though, so probably my judgement is incorrect.

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

B was tough ,but as many participants said code of Chat GPT passes ,means many submitted it maybe you should check the question before, i lost my cool when i saw 9000+ submission, man i am bad at this but not that bad. Anyway if someone is interested in Non Chat GPTed solution then here it is 262781288

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

during this round i suddenly realised that i have dyslexia

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

Partial Editorial:

A — If n>=m and n and m share parity( both even or both odd) then yes, else no.

B: Repeatedly do the following until n = 0. If n is even. Output 0 and divide n by 2. If n is one more than a multiple of 4, Output 1 and divide n by 2. If n is one less than a multiple of 4, Output -1 and add one before dividing by 2.

C: If LCM(array)> max(array) answer is n.

Else, iterate through max(arr)'s factors,

For each factor track amt of items in list divisible by factor and LCM(those items).

Answer = max(amt of items if factor not in array and LCM(amt) = factor).

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

    Is it enough to go through max(A) 's divisors only? I went through all divisors of all elements

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

      yes, it is enough to go through the divisors of max(A), because this is LCM(A). All of item's divsors are simply a part of divisors of max(A).

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

    How do you get the idea that if $$$n\mod2==1$$$, decide the next digit based on $$$n\mod4$$$ ??

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

      Looking at sample cases.

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

        Damn! I was just trying and figuring out how to build the array for the whole time in the contest and did not care about samples! Anyway, my approach is seemingly different from the above one (more complex). My claim is that for a number $$$n$$$ with binary representation consisting of $$$k$$$ digits, the answer can be constructed in at most $$$k+1$$$ digits. I'm trying to prove it formally but couldn't do it so far. Submission: https://codeforces.com/contest/1977/submission/262782660

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

          It must be at most n+1 digits. Proof by contradiction.

          If n+2th digit is 0. Then it serves no use.

          If n+2th digit is 1. Then number is at least 2^(n+1) + 1 which is impossible as number only uses n bits.

          If n+2 digit is -1. Then number is negative unless a higher digit is 1, which leads to same problem as described when n+2th digit is 1.

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

            A non ChatGPT-ed simple solution for problem B:-

            If n%4==0, representation looks like "0 0 <that of n/4>"

            If n%4==1, representation looks like "1 0 <that of (n-1)/4>"

            If n%4==3, representation looks like "-1 0 1 <that of (n+1)/4>"

            If n%4==2, representation looks like "0 <that of n/2>"

            It meets all the conditions required.

            Here's my submission :- https://codeforces.com/contest/1977/submission/262746874

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

    Looks like there are many ways to solve C. Mine is exactly the same as your editorial lol.

    262772972

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

solved B literally 3 minutes after the contest ended :(

i should have typed a bit faster or something

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

Hi Stefan2417, in the problem C I have made a small error in factorisation (instead of checking till $$$\sqrt{n}$$$, I only checked till $$$\lfloor\sqrt{n}\rfloor$$$), this caused my solution to be wrong for some cases, one of them is: n=4, a=[1,2,3,36]

If possible kindly rejudge my solution 262765545, I hope I will be cautious next time to not make these mistakes, at the same time I feel it would be unfair if I got a good rank due to this small error.

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

    Why do you care about rating? =)

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

    WA is WA.

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

    Ahh... bad luck. I used to have this feeling 10 years ago (feeling that such a small error should be allowed to rejudge, or why do I have to suffer for such a negligible mistake where my logic/thought process is correct), so I totally understand your frustration. Thanks for making me nostalgic.

    Lesson: Error is error. 100% your fault. Own it, embrace it, learn from it, overcome it, grow from it.

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

      Yes agreed, I owned up to my mistake in the comment, can anyone explain why am I getting downvotes? Have I offended someone?

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

        people misunderstood you, thats all. Also dont worry about it, weak tests happen often. I would say you definitely deserved it as you got the problem idea right which imo is much more important.

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

    Ok, so what I think is that people probably misunderstood you: You were saying that your solution was incorrect because of a small typo, but it got marked as correct during the contest, because of which you got a good rank which you feel like you didn't deserve, correct (instead, they assumed that you were saying that your solution got WA because of a small bug, and so you should get AC just because it's so small)? Well, I'm saying that you do deserve it: Just look above / below you, there are so many people with solutions that aren't actually correct for D, but they work on all the testcases. In the end, in competitive programming, what matters is passing all the tests, not whether your solution is actually correct (although for most problems with strong tests, those two are equivalent...). So, if you deserve your rating, you will keep it in the next contest, and if you don't, well you're gonna drop down next contest anyway, so it's fine :)

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

Damn, I couldn't even solve B when ChatGPT could :(

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

MY submission 262742856 was accepted during the round but during testin g phase it got runt ime error on TC 1?I changed my language to c++ 20 and it got accepted.My question is why was it showing accpeted during the contest then? please look into this Stefan2417

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

scoring worse than last div2

how is that even possible...

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

I have seen many solutions that seems to me ai generated, Is there a way to report such solutions?

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

solving two gray problem fast was sufficient to become an expert in this round

interesting

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

In problem D, is it true that atleast one of the first 39 columns should be special for the max case?

If not, hack : 262784406

UPD : Hacked :)

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

short solution for D till editorial is not out
for each column consider all possible ops that can be performed to make i'th column special there will be n such ops possible for each column pick the operation which occurs most of the times ops can be store in the form of hashes

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

Weak tests on Problem C, my solution is wrong shouldn't pass but it did.
Instead of checking if the whole LCM of the array is greater than the max. I just keep using modulo to avoid overflow, I used map to generate all possible LCMs hoping it wont TLE and I didn't.
It's easy to hack my solution just generate an array which it's LCM Mod 1e9+7 already exists in the array.

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

    $$$a_i \le 10^9$$$

    so how can the LCM be greater than the MOD and in the array at the same time?

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

    Why didn't you just put a condition to check if lcm gets larger than 1e9 and output n in that case?

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

      Because I made my submissions in the last 5sc. I tried to fix it after a WA I knew the LCM was overflowing and didn't have time to think about the condition.

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

    no, your solution can't be hacked since it is correct) you are searching for all possible LCMs only if LCM of elements is already in array, so it is less then $$$10^9$$$, and obviously all possible LCMs of any subsequence are divisors of global LCM so there are less than $$$\sqrt{10^9}$$$ possible LCMs hence your time complexity is $$$O(n \sqrt{maxA})$$$ (oh I see you find global LCM wrong way and solution already got hacked :(( )

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

      Yes I was talking about the way I found the global LCM, now I got hacked. anyway thanks for the analysis you made.

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

    The tests are weak indeed. My solution clearly fails this test case

    1
    9
    2 3 6 7 1003 1003 14042 21063 42126
    

    Answer should be 5

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

Please donate me +4 i want to be 1700 (crying emojis)

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

    My prayers were not unheard , they increased 96, it was +75 before Happy happy to reach 1700

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

In one sentence: the correct solution B is hidden in the tests.

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

    Depends how are you approaching it to be honest, there are more ways than one to solve it.

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

I had partial ideas for D, basically first make an ith column's each row , by appropriately choosing rows. Then to make this column good , we will apply an operation at some kth row, and all other columns having 1 at k_th row plus one more extra 1 at some other row , will be good. But I don't know how to count these efficiently.

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

For problem B, my solution didn't pass the pretest. However, I think my output was correct if I'm not mistaken. I might be hella dumb but here is my answer for pretest 1 case 7:

input:
19
output:
6
-1 0 -1 -1 0 1

32 — 8 — 4 — 1 = 19
I don't know please help I'm a noobie.

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

Can anyone explain to me why my submission 262785189 is accepted. I have read others and tried it out. It was correct. I do not understand why this is.

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

The Test Cases are weak in D!

I designed a code to solve the problem which should solve the problem with O(m * m * n) time complexity! But the code passed with O(45 * m * n) time complexity, though it shouldn't pass!

Here is my solution: 262786847 Time: 249ms, Memory: 6976 KB

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

Code Is this hackable?

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

Can anyone tell me how I can improve? Seeing my recent performance in the past 2 contests, I seem to have hit a roadblock.

My C++ concepts are limited, and don't know much about DSA either. Should I stop participating in the contests for now and focus on learning or just continue practising from the problem set?

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

    Continue practicing on the problemset. Solve problems around your level and you will be good.

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

can anyone give hints for problem E? or similar problem that might be helpful for solving E

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

Guys please help. I AC'ed on B during the contest, but I got a TLE during system check. But when i submitted the exact same code but without fast io, it AC'ed.

Can anyone explain why it happened?

With fast io 262763870 Without fast io 262791262

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

    cout << nums.size() << "\n";

    You can replace "\n" with '\n' and submit again.

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

      How is that supposed to fix it? P.S. still TLE

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

        According to this endl or "\n" will make the program flush, but even after replacing it still gives TLE then maybe because of another reason.

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

    I think the actual problem in your code is RTE

    for (int j = 1; j <= len; j++){ nums[i+j] = 0; }

    In this line of code, i + j can be equal to nums.size(), which will eventually cause out of bound. Still I don't understand why removing fast I/O fixed, maybe due to the vector capacity allocation.

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

editorial please. How to solve D?

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

    Use hashing. For each column, only $$$n$$$ possible sets of rows can make it special, and all of them can be calculated quickly since they are very similar (any two sets only differ in 2 rows). Then just find the max frequency hash.

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

My solution to C by factorization and brute-force: 262772972

First, factorize each input numbers to product of some a_i ^ p_i, and maximize each p_i to get the LCM.

If LCM is greater than the largest input, the answer is trivial (n), otherwise:

Let's brute-force each p_i, i.e. brutu-force each (including non-prime) factor of LCM:

  • This factor should not occur in the inputs.
  • Choose all inputs that are divisible by this factor.
  • Verify that the LCM of the chosen inputs are this factor.
  • If all the above is satified, then we consider this as a proper answer. Maximize the count of chosen inputs during the brute-force.

Integers below 10^9 with the most count of factors is 735134400, which has 1344 factors. Time cost: 1344 * n * (count of prime factors) + cost of factorization

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

    nice solution, some of my friends had a solution which got accepted in the contest, but later when I tried, failed on test case 18

    Your solution is absolutely correct

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

      I just noticed that we only need to enumerate the factors of the largest number, all the remaining things can be easily solved by plain gcd() and lcm(). Factorization can be totally skipped.

      Anyway, the core logic is the same: enumerating factors and brute-force.

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

I reached Pupil but suddenly I'm seeing that the rating decreased by 9 and I'm stuck in 1199 ....Why did it happen

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

262792905 Why is this submission giving WA?

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

Welp there goes my elo

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

Thanks for contest! C and D were not that great but B was nice and E is amazing!

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

how do hacks work in div 2 contests?

a few people got hacked, but those hacks were added only after the contest ended and not while sy

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

Round was very interesting, thanks!

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

This submission is giving wrong answer for this test case:

1

10

2 3 4 4 4 4 6 12 100003 1200036

But it still got Accepted.

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

    i checked it, yeah it gives wrong answer, the correct answer should be 6

    [2, 4, 4, 4, 4, 100003] -> 400012

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

editorial when

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

editorial when

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

when do we get the editorial for this contest ?

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

    Try using two hashes. One mod will give a high probability of failing if it's small, so hash as a pair of two integers each with a different mod. You can also use a larger mod if you want

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

in my compiler, my code is 100 % right but when I submit it in the CF with the same compiler then it will show an error on a particular problem what do I have to do any idea???

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

thanks

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

Why no editorial yet ?

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

يا زنديق انت واياه راوند 949 وقت الصلاة بلا شغل زندقة

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

In 1977C - Nikita and LCM few solutions have been accepted but on the testcase

n=8

arr=2,2,2,3,35,35,35,210

they are giving wrong answer maximum length subsequence is 6, they are giving 4, please add this testcase in main tests.262768289, 262777464

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

Upsolved E. Beautiful problem indeed, had fun solving it.

Enjoyed all problems from B-E.

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

For question 5, Can someone please tell what will be the output of this graph:

Test Cases : 1.

Number of nodes : 5.

Edges: 4 which are 3 -> 1, 3 -> 2, 4 -> 3, 5 -> 3.

I tried dividing them in black and white groups but just can't, thank you for your help.

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

    Your graph does not match the requirements. I found that for $$$i,j,k = 1,2,4$$$ there is no edge at all for example.

    Edit : I was wrong about the statement. See me second answer.

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

      Thanks for the reply but isn't 1 reachable from 4 ? Similarly, 2 is also reachable from 4. So I think this graph can be valid or maybe I am just dumb.

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

        It seems I misunderstood the statement, thanks a lot ! For your question, an answer is then :

        1 3 4 of color 0

        5 2 of color 1

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

          Yes, this coloring actually satisfies. I overlooked the fact that the black and white chains formed can intersect too.

          I have been thinking about the answer for hours now, thank you very much !!

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

good contests

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

A great experience

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

Attention!

Your solution 262608924 for the problem 1975A significantly coincides with solutions arka2005dey/262531402, _Sharma_Harsh/262608924. 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.

My solution for problem 1975A coincides with someone. I have got a false positive. Kindly look into it. @MikeMirzayanov

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

So where is the tutorial?

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

delete me from this contest Stefan2417 alexchist i copied code from others , i accept it , i copied code from 262772037, delete me from this contest and dont delete the other person from contest

please look into this , i accept that i copied and the otherone didnt copy , MikeMirzayanov

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

I was having with my personal compiler so during contest I used the online compiler ideone.com , after the contest I understood that my code got leaked

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

When will the editorial be out ?

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

I got a message saying it matched with some other people. My code is solely written by me and not shared with anyone else during the contest or before the contest. I wrote the code on my own and i am aware of each and every logic implemented. I truly dont know how it got plagged like this. I request you to look into it. If i were to explain the code, I can perfectly do that. Please help me regarding this. i will try not using any online compilers which might have caused to have the same syntax, but I didnt copy any code that is made available online. Please help

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

Very cool problem D!

I initially thought the solution will be something complex, but then I found the trick :)

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

    There are ways to find a mod hack or any constant base or mod, but I’m not sure about the details. Use random base and mod in Codeforces Contest.

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

C is harder than usual, anyways nice contest.

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

is this contest unrated ?

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

Problem B could be solved by GPT, and many of the user took the same approach as of me, but why is only my solution skipped. The solution to the problem is obvious and there is no other way of solving the problem that i could think of. Please do reconsider my solution , i think it should be rechecked kindly look @MikeMyrzayanov

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

    same happened to me although my solution is by far not even close to other solutions

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

Can anybody help me with my solution for problem C?Cannot identify where I went wrong.262825603

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

My solution to problem B was skipped. I took some advice from GPT and it gave me an idea for the solution and I implemented it. I do not think that this is considered cheating because the solutions to the problem are similar and everyone may write them by coincidence. Is using GPT considered cheating?@MikeMyrzayanov

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

my solution is not even close(mine's original) to the one that you are accusing me of and my ratings are gone now. Not only for this contest, but also for the last one. This is the second time this happened.

@MikeMirzayanov

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

The test cases of problem C are weak and many solutions are hackable.

1
8
2 2 2 3 35 35 35 210

Many solutions give answer for above test case as 4 while it should actually be 6.

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

    Oh god, you are right. I uphacked nearly 20% of the Python 3/PyPy 3 AC submissions made during contest with it. The problem is, rather than the fact that the test is weak itself, that most of those 'hackable' solutions were submitted in a long sequence in a short amount of time and their code looked almost the same; i.e. possibly a massive amount of cheats.

    (not saying all of them are cheats, but probably worth investigating in them)

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

Can anyone give a detailed analysis of the hashing error rate of D ? I tried three types of hashing: (1) 64-bit xor hashing (2) 32-bit xor hashing (3) 64-bit sum hashing with automatic unsigned long long overflow. Only the (1) got accepted. Why?

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

Why is my account rating not given. I have briefly explained you that i didnt copy any of the code. I worked hard solving those three questions. Why did they plag it and removed the rating. This is unfair. Please help me. I have solved those and submitted them on my own. I dont want this. Please help me.

@MikeMirzayanov

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

My submissions was skipped. I have submitted with help of a book which was published before the contest. What can I do now??

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

My submissions was skipped. I have submitted with help of a book which was published before the contest. What can I do now??

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

I solved 1977B - Binary Colouring problem of Div 2 category. I think my solution fulfils all the requirements of the problem, although it's been labelled as Wrong answer on test 1. The question says that in case of multiple solutions I can print any one of them. So can someone please help me on how to request for review of my submission. Submission Id: 263005014 Stefan2417.

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

    For x = 11 your code outputs -1 0 1 1 in custom invocation, which is incorrect

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

      (-1)*2^0 + 0*2^1 + 1*2^2 + 1*2^3 = 11

      Then why it's wrong ? The question says that if multiple solutions are possible, I can print any one of them.

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

        You can't have two consecutive non-zeros in your output. Read the last condition and the announcement.

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

Number b problem of this round , my submission get Skipped, while i do it in own. In other round, i see many times b, c problem the approach matched one to other but it's ok, but what happened this round ? So many skipped because of same approach? i think codeforces should check the account history before going to give skipped. I know scammer are rising day by day but it's really frustrating for programmer like us who struggle to get success. At last, really sad thing

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

I became Pupil; But after the roll back, I am back to Specialist!!! Thank you.