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

Автор FelixArg, история, 9 дней назад, По-русски

Привет, Codeforces!

Это был долгий путь, и я, наконец, рад пригласить вас поучаствовать в нашем Codeforces Round 955 (Div. 2, с призами от NEAR!), который пройдет в 25.06.2024 17:35 (Московское время).

Он будет рейтинговым для всех участников, чей рейтинг будет ниже 2100. Участники с более высоким рейтингом могут принять участие вне конкурса.

На раунде вам нужно будет решить 6 задач. У вас будет 2 часа на их решение.

Задачи для раунда вместе со мной готовили nik1998, egor4444ik и iamdimonis.

Мы от всей души хотим поблагодарить всех, кто оказал бесценную помощь в подготовке этого раунда:

Мы рады сообщить, что компания NEAR поддержала проведение раунда!

NEAR была основана в 2017 году Ильёй Полосухиным, одним из создателей технологии трансформеров, и Александром Скидановым как попытка создать систему, которая бы решала задачи по спортивному программированию. О том, что получилось тогда, можно почитать здесь.

В итоге NEAR сделала большой поворот на 180° и начала работу над протоколом блокчейна, который запустила в 2020 году.

В этом году NEAR сформировала новую лабораторию, NEAR.AI, задача которой — создание будущего, в котором технологии искусственного интеллекта открыты и доступны всем, а не контролируются небольшим количеством мега-корпораций.

Одним из направлений работы является обучение моделей мыслить рационально, и задачи по спортивному программированию — это отличное окружение для этой задачи. В этом контексте NEAR приглашает всех русскоязычных участников Codeforces с рейтингом 1400 и выше помочь нам описать решения задач по спортивному программированию. Мы хотим описать решения большого количества задач разной сложности и платим за это сравнительно большое количество NEAR.

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

Помимо этого, в раунде предусмотрены призы, не связанные с этим приглашением. Участники, занявшие места с первого по 16-е в объединенном зачете (то есть включая неофициальных участников), получат по Ⓝ 16, следующие 32 участника — по Ⓝ 8, следующие 64 — по Ⓝ 4, следующие 128 — по Ⓝ 2, и еще 256 — по Ⓝ 1.

Помимо этого, 64 случайных участника из первых 4096 в объединенном зачете получат еще по Ⓝ 4.

Разбалловка: $$$500\,—\,1000\,—\,1000\,—\,1750\,—\,2500\,—\,3000$$$

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

UPD: Давайте продолжим серию анонсов с фотографией авторов :)

UPD 2: Разбор!

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

Div 1:

  1. tourist

  2. jiangly

  3. SSerxhs

  4. kizen

  5. potato167

Div 2:

  1. lunchbox

  2. _JiaY19_

  3. gxy001

  4. _DongY19_

  5. Muelsyse_sep005

UPD 4: Замечательный видео разбор задач A-E. Спасибо, Shayan!

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

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

Just curious, are the prizes based on full ranking or just official/Div.2 ranking only?

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

    Prizes will be distributed among all participants of the round (including unofficial participants)

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

      Why not just wait for a combined round instead of awarding div1 participants for solving div2 problems.

      • »
        »
        »
        »
        7 дней назад, # ^ |
          Проголосовать: нравится +11 Проголосовать: не нравится
        My answer
      • »
        »
        »
        »
        6 дней назад, # ^ |
          Проголосовать: нравится +45 Проголосовать: не нравится

        Even if div1 participants were excluded from prize list, they would have made an alt and took the prizes anyways so ig it doesn’t matter

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

          You could just say "official participants" to reduce the number of alts but that's not my issue with this. If you're going to give prizes to div1 the contest should be at least a bit challenging for them. It's their money I guess.

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

      That is just raw

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

I think this contest will be so interesting and exciting! Thanks in advance to them who organizated this contest, and of course thanks to company NEAR for supporting this contest!

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

Could someone please explain what's Ⓝ in the prizes?

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

Could someone please explain what's Ⓝ in the prizes?

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

Will all participants get prizes ?

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

Is anyone going to pull a rainboy?

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

Hello everyone, hope to reach CM in this round

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

Good Vibes before Contest. Contests with some prize will have max competition

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

As a tester vodacbaoan is genius

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

December 2023: "AlphaCode 2 is worth a gazillion specialists, competitive programming is done for!"

Fast-forward to present day six months later: "Sup nerds, wanna annotate some problems?"

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

This round will be rated for all participants with a rating of 2100 or below.

I am 2100 and I can’t register officially :(

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

Good luck to all the participants! Codeforces Round 955 is sure to be a rewarding experience.

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

Hey Authors

I'm curious to know all your ages/experience? since it's great to find people with 2-3 years of experience building contests!!

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

Dashboard with 6 problems in Div-2 is a standard.

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

As a tester problems are really interesting and challenging!

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

As a tester, I literally tested just now because the coordinator invited me to test a few hours ago.

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

I will come back after a long time not participating in contests

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

OMG! Another FelixArg round.

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

The expression on the face of boys explain how dangerous their mind is.

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

What is meant by blue testing, purple testing, etc...?

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

i remember you guys removed 24-word seed restore in the default web wallet and my near coins were gone, very funny. then someone told me i have to paste it in the url to restore it. please be careful about backwards-compatibility, would hate for the new ai to suddenly vanish. looking forward to nearcrowd round 2!

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

How score distribution is related to problem rating? I mean how do I predict what can be the difficulty of the problem?

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

weird score distribution, I've never seen 1000 point div2c

thinking speedforce, unless upsolve D of course.

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

Is it different from div2?

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

64 random participants from the top 4096 in the overall ranking will each receive Ⓝ 4, that means we have a 1.5625% chances of becoming rich! All the Best!!

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

interesting score ditribution

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

it's time to be expert

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

speedforces incoming!

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

Can someone help me ? How am i supposed to change my compiler from c++14 to c++20 (in my own laptop) ?

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

    You have to download and setup a newer version of GCC. Here is one of the places you can download it, under Release versions. Then you have to do the usual, adding it to system path.

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

is there any penalty?

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

Contest is NEAR!

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

33!

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

Me after solving D : (^_^) Checking standings afterwards : (o_o)

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

nice tasks, 2k submissions on D wow

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

    many people solved it in very short time

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

    thx to cheaters actually :)

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

    I'd say it was not that hard of a problem, albeit a bit scary looking. Once you realize that you only need to get the difference of zeroes and ones in each kxk matrix to get the impact of an operation then it becomes a fairly simple number theory problem

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

most annoying problemset ever. coupled with prizes to increase cheating.

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

B > C

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

Animated Video editorial for problems [A-C]:

https://youtu.be/-btzjr-u4dM

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

problem D must have something to do with 2D prefix and maybe some gcd yes? I believe

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

C<<<B

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

    how to solve C? i tried queue, greedy, pretest 2 fall

    • »
      »
      »
      5 дней назад, # ^ |
      Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится
      actually greedy but with two-pointer
    • »
      »
      »
      5 дней назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I did it with queue and greedy check my sub

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

    indeed spent 1 hours to solve B and C under 10min

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

Can someone tell how to solve D?

My thought process for D : Find net difference between two types of mountains, this will give the value to increase. Now in each kxk submatrix, find difference between the number of two types of mountains : this will give the amount we can increase or decrease. And then I couldn't proceed further.

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

    I wasn't able to solve it, but I think you can use prefixes on the type of mountain's matrix to optimise the calculation of which values you can increase or decrease by.

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

    That's correct. Then you can use GCD to figure out whether you can sum the list of kxk difference into mountain_diff.

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

    The difference should be a linear combination of the amount you can increase by each of the k*k matrices. Hence, it should be divisible by their gcd.

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

    same, my approach was to first calculate sum of ones and zeros and get difference between them , now create prefix 2d array to store count/(difference between them) of ones and zeros in a matrix then for all possible matrix if dimension kxk save difference between one,zero in an array so now my problem boils down to classic Coin Change DP(with infinite coins of each arr[i]),but it takes O(sizeofArray*Sum) probably TLE

    any hints please ??

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

    Suppose the difference of the numbers of each type of mountain is $$$k_1,\dots,k_\ell$$$. Recall from number theory that the only numbers we can form as a $$$\mathbb{Z}$$$-linear combination of integers $$$k_1,\dots,k_\ell$$$ (i.e. $$$c_1k_1+\cdots+c_\ell k_\ell$$$ for integers $$$c_i$$$) are multiples of $$$\gcd(k_1,\dots,k_\ell)$$$. Therefore, if the difference is some multiple of the $$$\gcd$$$ of all the $$$k_1,\dots,k_\ell$$$, then there is some series of moves we can do to get the difference to zero (plus some edge cases where some/all of the $$$k_i$$$'s are zero).

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

      I was knowing ax + by = c has solutions only if c is divisible by gcd(a,b) but was not knowing this is true for any number of variables.

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

        If you have $$$a_1x_1+a_2x_2=c$$$ iff $$$\gcd(a_1,a_2) \mid c$$$, then you can write (for some $$$v$$$)

        $$$ a_1x_2 + a_2x_2 + a_3x_3 = (a_1x_2 + a_2x_2) + a_3x_3 = v\gcd(a_1,a_2) + a_3x_3 = d $$$
        $$$ \iff \gcd(\gcd(a_1,a_2),a_3) = \gcd(a_1,a_2,a_3) \mid d, $$$

        and you can continue by induction :)

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

          I didn't know this. If it's so simple to know if a sum can be obtained by some combination, then why don't we use this property in subset sum problem or coin change problem?

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

            It's simple because every item can be used for any integer number of times, but it's not the case for subset sum problem.

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

              This will only hold when the coefficients can be any integer (including negative) ?

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

                Yes. For example, with $$$2,3$$$ you can form $$$1$$$ with negative coefficients as $$$1(3)+(-1)2$$$ but clearly not with positive (the result would be greater or equal to 2!)

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

                It would hold if the coefficients can be any integer. But the reverse direction may not be true (i.e. it's possible to get all multiple of $$$gcd(a_1, a_2, \ldots, a_n)$$$ even if some of the value can't be used for any integer number of times).

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

      Is there a name for that theorem or is it just a common concept?

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

    You can find the net difference in all $$$K \times K$$$ submatrices and let gcd of these differences be $$$G$$$. It can be proven that you can only change the total height difference by some multiple of $$$G$$$, therefore you only need to check if the height difference is divisible by $$$G$$$.

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

Is C possible with monotonic queue DP that define f[i] as the answer range 1 to i? I'v worked out a $$$n^{2}$$$ DP without using monotonic queue.

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

How to do B?? Spent more than an hour and couldn't solve it.

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

    After a while, the value of x just starts to loop in between 1 and y-1 . So just find out the position at the end making use of some %

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

      Tried something similar to that.

      I tried to convert x to 1. If it was possible then I gave x + k%(y-1) as answer and if not then returned x only.

      Submission : 267370934

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

So you've really decided to use the $$$3 \cdot n + 1$$$ problem in a contest? I'm really salty right now if you didn't notice.

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

Unable to pass the second problem

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

even though i couldn't solve it, i feel that C is much easier than B. From the One's I've read, A-C. I can say that the problems were very interesting and I think i would enjoying upsolving them.

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

    The trick to B is to try to simulate the operations and output the x values as it changes, then it becomes apparent that it starts looping between 1 and y-1 when x reaches a value equal to y or less. And to get to that point you just perform as many operations as you need to get x to the next multiple of y but you don't actually need to add 1 every time just find the next multiple of y and do all the ops at once

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

I thought in A for almost 20 minutes but then I activated guessing mode and was able to figure it out in less than 10 second

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

B was very hard for people who aren't that good at math. :(

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

Is C possible with monotonic queue DP that define f[i] as the answer range 1 to i? It seems that it only need a simply greedy.

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

Why are all the A's getting hacked..?

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

Thanks for the contest. I got my lesson. I wont give any contest from now on which has the word TrAkToR in its description.

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

Why so many hacks on A? (observing those on page 1 of standings)

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

A: If the sign of (x-y) changed, then (x-y) must be 0 at some time, so answer is NO. Otherwise, the answer is YES.

B: If x<y, then the value of x will change among {1, 2, ..., y-1} periodically, so the answer will depend on k%(y-1). Otherwise, after (y-x%y) operations x will become (x+y-x%y)/y, which is not greater than (x/y)+1. Because y>=2 this can happen not more than log(x) times until x<y, so we can simulate the process in O(log(x)).

C: Let dp[i] be the anwser for first to i-th cards. We can binary search for the largest j such that sum(j+1, i)>=l, if sum(j+1, i)<=r we have dp[i]=max(dp[i-1], dp[j]+1), otherwise dp[i]=dp[i-1].

D: Let the balance of heights B=(sum of snowy heights)-(sum of not-snowy heights). If B==0 initially the answer is YES. If we let c[i][j]=1 when (i, j) is snowy, c[i][j]=-1 otherwise, then when we do operation on a k*k square, the change of balance will be sum(i,j)(c[i][j]) where (i,j) is in the square. So we can calculate the sum of c[i][j] over all k*k submatrices using 2D prefix-sum, and by the bezout's theorem, the change of balance can be any multiple of GCD of these sums. In order to make B=0, the initial value of B must be the multiple of GCD.

E: First think about case for n=2**d. If k>=d the answer is n*(n+1)/2, and if k==d-1 the answer is (n-1)*n/2, let's assume k<=d-2. We can see the answer is sum(1<=r<=k+1)((2**r-1)*(2**r)/2 * C(d-r-1,k+1-r)). Denote this as f(d, k).

Proof

Now think about arbitrary n. We can split [0, n) into several intervals with length of 2**j, where n has the j-th bit. If we let L=floor(n/2**(j+1))*(2**(j+1)), R=L+2**j, the answer on interval [L, R) will be f(j, k-popcount(L)). If popcount(R-1)>k, there will be no valid interval containing both R-1 and R, so we can add this to the answer and consider for [R, n) seperately. Otherwise, when popcount(R-1)<=k, we can see that for any R<=x<n we have popcount(x)<=k, so we can add (n-L)*(n-L+1)/2 to the answer.

F: Let L be the minimum i such that a[i]>a[i+1], R be the maximum i such that a[i-1]>a[i]. Then at least we need to sort subarray [L, R]. Let X=min(L<=i<=R)(a[i]), Y=max(L<=i<=R)(a[i]), if there are any L1<L such that a[L1]>X or any R1>R such that a[R1]<Y, then we also need to sort them. To find L,R we can maintain a set S={1<=i<n: a[i]>a[i-1]} which can be modified in O(log(n)) each operation. To find X,Y we can use a segment tree, and to find L1, R1 we can use binary search on a[i].

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

    how to solve F?

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

    C is greedy $$$O(n)$$$, you don't need a binary search.

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

      yes but bs solution is easier to understand why it works.

      also easy to implement without considering different cases. check his solution 267340021

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

        The greedy isn't too hard to prove either. At any step, you chose a valid interval with minimum right side index. That is correct because you end up with more possibilities for the rest of the problem than with any other valid leftmost interval (since its right index would be larger).

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

Who can prove D?

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

    Bézout's identity

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

    I just thought about Linear Diophantine equation, and the condition of it to be solvable is in CP-algorithm :v.

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

      I am just not studying number theory, haha. I just thought about knapsack.

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

    If d[i][j] is the positive difference between the number of snowy caps and bare caps in the k*k submatrix whose top left corner is (i,j), then you can change the total difference in sum of heights, by c * gcd(d[i][j]), where c is any integer. (bezouts identity).

    So just compute this gcd and check if it divides the positive difference between the sum of snowy heights and the sum of bare heights.

    Can obviously be done in linear time by precomputing the rectangles.

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

Wrote a overcomplicated DP + Segment Tree solution for C. D was a good problem.

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

In fact, I think that question C is much less difficult than question B, and I was thwarted by question B for forty minutes but passed C in ten minutes.

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

D was a great problem, shame I couldn't code it up in time. Need to speed up.

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

fast editorial is coming

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

Wow , first time got TLE just by using a % operatoion,

»
5 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
int solve(int i,auto& psum,int* dp,int n,int l,int r){
    if(i>=n) return 0;
    if(dp[i]>=0) return dp[i];
    int take=psum[i]+l;
    int nextpos=lower_bound(psum.begin()+i,psum.end(),take)-psum.begin();
    int val = 1;
    if (nextpos >= n || (nextpos < n && psum[nextpos] > (psum[i]+r)))
        val = 0;
    return dp[i]=max(val+solve(nextpos+1,psum,dp,n,l,r),solve(i+1,psum,dp,n,l,r));
}


void helper(){
    int n,l,r;
    cin>>n>>l>>r;
    vi a(n);scan(a);
    vector<int> pxsum(n);
    pxsum[0]=a[0];
    for(int i=1;i<n;i++){
        pxsum[i]=pxsum[i-1]+a[i];
    }

    int dp[n];
    fill(dp,dp+n,-1);
    cout<<solve(0,pxsum,dp,n,l,r);
    
}

what is wrong in the above code for c? Wtf is wrong...

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

Can anyone teach me how to past B problem?

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

    When $$$x$$$ will become less than $$$y$$$, there will be a cycle: $$$x$$$, $$$x+1$$$, ..., $$$y-1$$$, $$$1$$$, $$$2$$$, ..., $$$x-1$$$, $$$x$$$, which cost $$$y-1$$$ moves, so you just take $$$k$$$ modulo $$$y-1$$$ after $$$x$$$ will become less than $$$y$$$.

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

Lol, i just read F and isn't it just much much easier, than D and E? It took me like five minutes to come up with the solution.

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

Can anybody please help me understand the problem with my code for problem C(Boring days) ~~~~~

signed main() { ll t; cin >> t; while(t--) { ll n,l,r; cin >> n >> l >> r;

vector<ll> a;
  for(ll i=0;i<n;i++) {
    ll x;
    cin >> x;
    a.push_back(x);
  }

  ll i = 0;
  ll j = 0;
  ll sum = 0;
  ll count = 0;

  while(j<n){
    sum+=a[j];
    if(sum<l){
      j++;
    }
    else if(sum<=r and sum>=l){
      count+=1;
      i = j+1;
      j++;
      sum = 0;
    }
    else if(sum>r){
      while(sum>r){
        sum-=a[i];
        i++;
      }
      if(sum<=r and sum>=l){
        count+=1;
        i = j+1;
        j++;
        sum = 0;
      }
      else{
        i = j+1;
        j++;
        sum = 0;
      }
    }


  }

  cout << count << endl;

}

}

~~~~~

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

    bro, your final else block is the problem, its the same as if block

    include <bits/stdc++.h>

    using namespace std;

    typedef long long ll;

    signed main() { ll t; cin >> t; while(t--) { ll n,l,r; cin >> n >> l >> r;

    vector a; for(ll i=0;i<n;i++) { ll x; cin >> x; a.push_back(x); }

    ll i = 0; ll j = 0; ll sum = 0; ll count = 0;

    while(j<n){ sum+=a[j]; if(sum<l){ j++; } else if(sum<=r and sum>=l){ count+=1; i = j+1; j++; sum = 0; } else if(sum>r){ while(sum>r){ sum-=a[i]; i++; } if(sum<=r and sum>=l){ count+=1; i = j+1; j++; sum = 0; } else{ j++; //only change } }

    }

    cout << count << endl; }

    }

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

      267411889 check this, cuz the copy paste was horrible

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

        Thanks , but can you explain why that was wrong in which test case it will fail

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

          well you else block is basically (sum < l) right? and in that condition you need to j++, i.e., only move the front pointer as the sum is already smaller than l.

          For example, 6 9 10 1 3 3 5 4 8 the original code will fail this test case and give 0, instead of 1. because it will not go to the pair i=5,j=4(which sums up to l) but would rather go to i=4,j=4

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

Why did I submit two identical codes, one passed and the other did not? AC:https://codeforces.com/contest/1982/submission/267359498 WA:https://codeforces.com/contest/1982/submission/267407967

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

267409135 Can anyone tell me why is this not working? Like is my logic completely wrong or is there some edge case that the code misses?

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

My submission Can anyone pls tell me why this fails.... It shows wrong ans on 4288 no of test case 2

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

267392213 Can anyone pls tell me why this fails.... It shows wrong ans on 4288 no of test case 2

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

Hello everyone, I need somebody to hack my friend's code: https://codeforces.com/contest/1982/submission/267413232

I am so sure that His code will overflow since he just used 32bits integer (int / i32). Hurry up! Don't let him discover it! Just hack the submission!

PS: His computer's battery has run out and I submitted his code after contest. But why it AC!!!!! I cannot accept it!!!!!

Thanks!


Update:

Sorry, his code is correct. Just sum up all the "-1" and "+1" will not exceed i32. My bad! Actually, he cannot submit his code since the battery problem, I want to easy him that his code maybe cannot pass the test (So that he will not lose this big chance to increase his rating). Okay...... Now he will be definitely very sad and regretful.

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

Is filling "TON wallet" field (and "Secret Code") with account id from mynearwallet in settings enough for getting reward in NEAR cryptocurrency for current round? Or what should I do to get it?

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

I did surprisingly well in this round. This was a really fun one, questions were not very straightforward, I liked it a lot.

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

Why is this contest unrated for me? Any reason codeforces for this action

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

In c, how it is sure that x will become 1 in less than or equal to k operations?

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

    lets say x=16 y=3 k=1, clearly we are left with x=17

    lets say x=16 y=3 k=3, 16->17->2->1, and x became <y

    the idea is: after every deletion x decreases from what it was originally even if it increased a little before getting to a multiple of y. and if x always decreases then after some time it must go to 1, after that it loops from 1 to y.

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

My rating is 1110.I participated in this contest. But my rating not changed.Why??

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

My rating is 1110.I participated in this contest. But my rating not changed.Why?

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

Thank you

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

Till now i was happy that i became specialist but all of a sudden ratings changes is disappeared, can i know what's the reason behind it?

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

    They are probably running plagiarism checks and they will need to recalculate the ratings so it's kind of messy right now

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

      But why they released earlier and now making such messy but i don't think that this happened before

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

        This happens sometimes but usually the plagiarism checks are ran for multiple contests at once (And then you have the message that "the ratings for a few contests are temporarily rolled back") but I assume they wanted to do a single contest plagiarism check here because of the contest having prizes

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

          In that case then they have check plagiarism for both today's contest and recent div 3 contest.

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

            Maybe, not sure how exactly it works but I'm assuming that the plagiarism check has to be ran manually and now they are doing it for this contest because of the prizes

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

Subject: Issue with Judgement in Problem C

Hi,

I encountered a possible error in the judgement of my submission for Problem C during Codeforces Round 955 (Div. 2). It seems there was a bug during the judging process.

Details:

My Submission During Contest: Submission 267358679 My Submission After Contest: Submission 267429867 During the contest, in the 2nd pretest, 6th test case, my submission was judged incorrectly. The actual output should be 0, but it was judged as 1, resulting in a wrong submission.

After the contest, I resubmitted the same solution, and it was judged correctly with the output being 0.

I would appreciate it if the issue could be reviewed and corrected as it affected my contest standing unfairly.

Thank you for your attention.

Best regards, Deshik conan45

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

I am awaiting to be in random 64 contestants!!!

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

I have one question for the cf community, why to give the score distribution beforehand, people can initially guess the difficulty of the contest, isn't it non exciting it would be more fun if we are not known that and may be we can keep it constant in every contest

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

FelixArg , My solution for D shouldn't have passed the test cases, but it did.

  • I knew the current difference between type1Sum, and type0Sum. ( let's call it RequiredDifference )

  • I knew for each of the sub-rectangle of size k*k, what are achievable differences. Lets call them (d1, d2, d3 ... dk).

I knew that I had to do a1 * d1 + a2 * d2 + a3 * d3 + ... ak * dk = RequiredDifference

I didn't know how that gcd ( d1 , d2 ... dk ) | requiredDiff .

But I knew, for ax + by = z , then gcd(x, y) | z. So I used this two variable equation property and passed test cases. Refer to my solution.

The test cases were weak for D. Ideally my solution shouldn't pass. It was later hacked by djm03178 .

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

So many people here are saying that B was a lot difficult than C. I did B in 20 mins, but it took me almost a day and more than 10 attempts to finally get AC on C. I had actually figured it in some time but it was giving TLE again and again. Don't know if I am too dumb or too smart lol!!

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

Exposing Cheating in Competitive Programming Cheating undermines the spirit of competitive programming. The Telegram channel selling Codeforces solutions, with Gautam_Himanshu implicated in using these solutions to unfairly boost their ranking. This not only disadvantages honest participants but also erodes the platform's credibility. The community must stay vigilant, report suspicious activities, and promote ethical practices. By addressing such issues, we can ensure a fair and rewarding environment for all. Let's work together to uphold the values of integrity and fair play in competitive programming. Report any evidence of cheating to maintain our community's standards.

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

Creating: .cfuser.near.

Transaction to create the account was sent, but the account is not on chain yet. Please refresh the page. If the problem persists, please reach out to the admins

Can you please help me?

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

Even though I ate negative delta the problems were very good, I enjoyed the round so much.

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

Hey folks! Here's an attempt of an explanation of problems A to D of this context with Tourist's codes https://www.youtube.com/watch?v=3fPvRAowuqU. Would be glad if you find it informative!

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

How do I redeem the 1N prize? Sorry, this is the first time I've won something in an online contest, so I don't know how to redeem stuff. Thanks in advance for the reply!

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

Hey, I have just received a message that my solution 267390457 for the problem 1982C significantly coincides with some other people. I don't use any online source and don't even know the persons with whom my code coincides. This happened because the problem had a simple code of 6 7 lines, so it was a coincidence that someone wrote something similar to what I did. Even if you go through a number of other submissions, the logic is nearly the same, and since it is a small code, it matches several people. Also, I received this message for one question only, but all other questions I answered were skipped.

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

Dear Codeforces Admins,

I recently received a notification regarding a significant coincidence between my solution (267386858) for problem 1982B and those of Muhammad_Tawfiq (267384934) and Antartic_Nafeez (267386858). I want to clarify that my solution was independently developed, and I have not shared my code with anyone else.

However, I understand that such coincidences can occur, especially if there are common approaches or algorithms widely known and used among participants. I assure you that I did not use any external sources that would violate the competition rules. If there is any specific evidence or further details needed from my side, please let me know, and I will be happy to cooperate fully.

Additionally, I do not use public repositories or platforms like ideone.com with default settings, which could unintentionally expose my code. If there are any recommendations on how to further ensure the integrity of my solutions and avoid such coincidences in the future, I am open to suggestions.

Thank you for your understanding and consideration.

Best regards, [Antartic_Nafeez]

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

Dear Codeforces Admins,

I recently received a notification regarding a significant coincidence between my solution (267386858) for problem 1982B and those of Muhammad_Tawfiq (267384934) and Antartic_Nafeez (267386858). I want to clarify that my solution was independently developed, and I have not shared my code with anyone else.

I understand that such coincidences can occur, especially if there are common approaches or algorithms widely known and used among participants. I assure you that I did not use any external sources that would violate the competition rules. If there is any specific evidence or further details needed from my side, please let me know, and I will be happy to cooperate fully.

I do not use public repositories or platforms like ideone.com with default settings, which could unintentionally expose my code. If there are any recommendations on how to further ensure the integrity of my solutions and avoid such coincidences in the future, I am open to suggestions.

Thank you for your understanding and consideration.

Best regards, [Muhammad_Tawfiq]

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

Dear Codeforces Admins, I received a notification regarding a significant coincidence between my solution (267366526) for problem 1982C and those of Mazen_eldar/267341490 and jainlakshit/267354671. I want to clarify that my solution was independently developed, and I have not shared my code with anyone else. And i don't even know who they are and how it happened but i think such coincidence can occur in this problem because the solution was so trivial that anyone would have thought of the same solution and it can happen that someone else has written same code as me but it is surely a coincidence i can guarantee you i am loyal with my codeforces handle and i would love if my rating increases so i will not risk my handle by doing such pitty things, please consider my request i am genuinely saying it was just an coincidence and i will try that it never happens again. So please do not skip this contest and i expect my justice from you guys.

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

Dear Codeforces Team,

I recently received a notification regarding a significant coincidence between my solution for problem 1982B (solution ID: 267384934) and the solutions submitted by Muhammad_Tawfiq (solution ID: 267384934) and Antartic_Nafeez (solution ID: 267386858). I take such matters very seriously and would like to address this situation promptly.

Firstly, I would like to clarify that my intention has always been to adhere to the rules and maintain the integrity of the competition. I assure you that I have not intentionally shared my code with anyone nor copied from other contestants.

To provide more context:

  1. Code Review: I have thoroughly reviewed my code and confirmed that it is my own work. However, I understand that similar solutions can sometimes arise due to common approaches to solving the problem.

  2. Use of Public Platforms: I have not used public platforms like ideone.com with default (public) settings to share my code. All my code is developed locally or on private, secure platforms.

  3. Potential Common Source: If there was any unintentional similarity due to a common source or widely known algorithm published before the competition, I am more than willing to provide details of my references and thought process.

I request a thorough review of this case and am ready to cooperate fully by providing any additional information or evidence required. My goal is to clear up any misunderstandings and continue participating in Codeforces competitions fairly.

Thank you for your attention to this matter.

Best regards,

[Muhammad_Tawfiq]

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

Hello Codeforces,This is in regard to plagiarism being put on one of my solutions. I want assure you that no such incident has been done by me the only common issue can be a code template i use for some questions .You can check all my previous contests and submissions.This was the first time i used this template seeing many other use a template of their own.If unintenionally I have made a mistake I apologize and assure that i wont be using templates as well from now on

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

I recently received a notification regarding a significant coincidence between my solution for problem 1982B (solution https://codeforces.com/contest/1982/submission/267370683) and the solutions submitted by Om3466 (https://codeforces.com/contest/1982/submission/267357286 ) . I take such matters very seriously and would like to address this situation promptly.

Firstly, I would like to clarify that my intention has always been to adhere to the rules and maintain the integrity of the competition. I am confident that I have not shared my code with anyone nor copied from other contestants.

To provide more context:

Code Review: I have thoroughly reviewed my code and confirmed that it is my own work. However, I understand that similar solutions can sometimes arise due to common approaches to solving the problem.

Use of Public Platforms: I have not used public platforms like ideone.com with default (public) settings to share my code. All my code is developed locally or on private, secure platforms.

I request a thorough review of this case and am ready to cooperate fully by providing any additional information or evidence required. My goal is to clear up any misunderstandings and continue participating in Codeforces competitions fairly

Please see to it ASAP and reply .

Thank You

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

Hello MikeMirzayanov, I got coincidence message on Round 955 div2 on Problem B. My solution is 267357971. It was a pure Coincidence because the logic of code was not so big and also , I submitted the code, a lot earlier than other user. Neither I have use public sites like ideone.com. All my codes are developed and run locally on my system. Please do the needful.

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

Dear Codeforces Admins,

I recently got a message that my 1982C solution, sriragt/267362951, significantly coincides with several other people's solutions. However, I believe my solution to this problem was a relatively short and straightforward two pointers approach that was replicated by many other submissions as well. I do not know any of these other people, and I believe that the similarity of our solutions is simply a coincidence because my solution is only 10 lines and there is not that many different ways to actually complete this solution. All of my code that I have written was created 100% by me, so I do not understand why my submission was flagged. Please let me know if you would like more information from me.

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

My solution for B has been flagged as being plagiarised. However, I can assert that it was not copied and I didn't partake in any other such activities. My performance in this contest was on-par/worse than normal. I understand why the error may have occurred as many other participants similarly identified the algorithm. Please do the needful.

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

Dear Codeforces Team, I got a notification that my solution (267400970) for the problem 1982B coincides with that of many other people. This is the first time I've gotten that kind of message, and I don't have any idea how it coincides. Also, all my submissions in that contest were skipped. What should I do now? Can anyone help me?

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

Hey Both of Specialspecies and ThisTomCantTinker are my accounts. I submitted a solution on SpecialSpecies account to see if there will be a -50, it got accepted so I submitted it on my actual account(ThisTomCantTinker). I was not aware that they would flag it like that TT. I emailed back too to the mail by codeforces with screenshots of score boards for this Div2, from a login from both my accounts.

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

Dear codeforces admins, Recently i got a message from system saying that my problem B submission(267368310) is coinciding with some users. I solved the question on my own and I want the system to consider my submission. I do not know anything about the coinciding submissions, I write my code un my own created template which is consistent through many submissions. Please help!!

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

Hello Codeforces Team,

Today I received this message,

Attention!

Your solution 267373789 for the problem 1982C significantly coincides with solutions tikam/267373789, heyPaarth/267384529. 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.

Here is my solution link: https://codeforces.com/contest/1982/submission/267373789

I solved the question using the simple sliding window approach and used local IDE as well. I just think that the approach is too obvious to anyone as many of the sliding window questions have same approach if someone understands the logic. After receiving the email, I was pretty much sure that such an approach will be found on Internet, so I searched and found the same sliding window approach for a question in a GFG article. Here is the link: https://www.geeksforgeeks.org/find-subarray-with-given-sum/

I also had 3 wrong submissions during the contest for the same question whose links are given below: https://codeforces.com/contest/1982/submission/267372602 https://codeforces.com/contest/1982/submission/267369000 https://codeforces.com/contest/1982/submission/267367808

in these also I was using same sliding window approach, but was overcomplicating the things to miss some edge cases. So I simplified it in the later one.

I also even don't know about the other person that who is he. Here is his solution that coincides with me: https://codeforces.com/contest/1982/submission/267384529

I also submitted the solution early than him, so there is no chance that I cheated the solution.

You can check all the submissions and article shared along with your team. I Would be eager to hear back from you about further proceedings and reply.

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

Hello I am trying to solve problem D but my submission:https://codeforces.com/contest/1982/submission/267596120

is failing for the following test case:

3 4 3

46 49 50 1

19 30 23 12

30 25 1 46

1000 0100 0010

Please let me know if y'all can help me correct my code Also I read the editorial and tried to recreate the steps but I am unable to understand the why we consider the differences in ones and zeros, if anybody could explain the intuition behind the why that would be great

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

hi everyone, can you tell the issue in my submission for problem C https://codeforces.com/contest/1982/submission/267600026

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

I am writing to express my concern regarding the recent cancellation of my contest submission due to the coincidental similarity of one of my Three codes with another participant's code. While I understand the importance of maintaining the integrity of the contest, I would like to clarify that this similarity was purely coincidental and not a result of any form of misconduct.

It is not uncommon for similar solutions to arise independently, especially when addressing common problems or using standard approaches. I assure you that all my submissions were created independently and with the utmost integrity. The code I made had a simple logic of checking next divisor on less than, equals to and greater than; if the next divisor is less than k , then u can just return x+k if its equals to k then divide x until if indivisible and if it's greater than k u can use similar double while loop to check the desired number.

I have submitted all the code by writing them manually on VS code first then submitting it. I don't use libraries or any other stuff that must be one of the reason which might have gotten my code to be similar to others, but in honor regards I want u to consider if my only 1 out of 3 code is found similar but I made Problem C which is harder than B myself. Which clearly shows that I have enough potential to solve B too on my own.

I kindly request a reconsideration of my disqualification, taking into account the originality and uniqueness of my other two codes. I am more than willing to provide any additional information or clarification needed to resolve this matter fairly.

Thank you for your attention to this issue. I look forward to a fair resolution.

Sincerely

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

Dear Codeforces Admins,

I recently received a notification regarding a significant coincidence between my solution (267385864) for problem 1982B and those of a few other contestants. I want to clarify that my solution was independently developed, and I have not shared my code with anyone else.

However, I understand that such coincidences can occur, especially if there are common approaches or algorithms widely known and used among participants. Since the program is a bit tricky with simple approaches and gives a TLE, it might be possible that the other participants might have used the same technique as I did since there are only a handful of ways to solve to the knowledge that I have. I assure you that I did not use any external sources that would violate the competition rules. If there is any specific evidence or further details needed from my side, please let me know, and I will be happy to cooperate fully.

Additionally, I do not use public repositories or platforms like ideone.com with default settings, which could unintentionally expose my code. If there are any recommendations on how to further ensure the integrity of my solutions and avoid such coincidences in the future, I am open to suggestions.

Thank you for your understanding and consideration. kv_2205

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

Dear Codeforces Admins,

I recently received a notification regarding a significant coincidence between my solution (2267381255) for problem 1982B and those of a few other contestants. I want to clarify that my solution was independently developed, and I have not shared my code with anyone else.

However, I understand that such coincidences can occur, especially if there are common approaches or algorithms widely known and used among participants. Since the program is a bit tricky with simple approaches and gives a TLE, it might be possible that the other participants might have used the same technique as I did since there are only a handful of ways to solve to the knowledge that I have. I assure you that I did not use any external sources that would violate the competition rules. If there is any specific evidence or further details needed from my side, please let me know, and I will be happy to cooperate fully.

Additionally, I do not use public repositories or platforms like ideone.com with default settings, which could unintentionally expose my code. If there are any recommendations on how to further ensure the integrity of my solutions and avoid such coincidences in the future, I am open to suggestions.

Thank you for your understanding and consideration. mohantyanurag2004

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

Dear Codeforces Team,

I hope this message finds you well. I recently received a notification regarding a significant similarity between my solution for problem 1982B (submission 267373729) and the solution submitted by pyramid7 (267361572). I take this matter very seriously and wish to address it promptly and transparently.

First and foremost, I would like to emphasize my commitment to the rules and integrity of the competition. I assure you that I have neither shared my code with anyone nor copied from any other contestant.

To provide additional context:

  1. Code Review: I have meticulously reviewed my code and can confirm that it is entirely my own work. I understand that similar solutions can occasionally occur due to common methodologies in problem-solving.

  2. Use of Public Platforms: I have not utilized public platforms such as ideone.com with default (public) settings to share my code. All my development is conducted locally or on secure, private platforms.

I kindly request a comprehensive review of this case and am more than willing to provide any additional information or evidence required to clear up any misunderstandings. My objective is to ensure fair play and to continue participating in Codeforces competitions with integrity.

Thank you for your attention to this matter. I look forward to your prompt response.

Best regards,
Dhanush B

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

seems everyone has received plagiarism message

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

How long do the rollbacks take? I need to submit my resume with a screenshot of rating as proof in 4 hours:(

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

Hello everyone! I am new here, so I don't know how to correctly post (yet)! I was trying C for hours on end, and somehow it fails the ~4kth test case in test case 2 :( Can someone please help me find the bug I'm doing? P.S I'm doing a greedy strategy: https://codeforces.com/contest/1982/submission/267702193

»
40 часов назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится
/*
*    Author: Arjit Khare
*    Created: Friday, 28.06.2024 12:30 AM (GMT+5:30)
*    linkedin: https://www.linkedin.com/in/arjitkhare/    
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        // freopen("input.txt", "r", stdin);
        // freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin>>t;
    while(t--){
        int n, m, k;
        cin>>n>>m>>k;
        vector<vector<int>> land(n, vector<int>(m));
        for(int i = 0; i < n; i++)
        {
            for(int j = 0; j < m; j++)
            {
                cin>>land[i][j];
            }
        }
        vector<string> s(n);
        for(int i = 0; i < n; i++)
        {
            cin>>s[i];
        }
        //{snow, nonSnow}
        vector<vector<int>> snow(n, vector<int>(m));
        vector<vector<int>> nonSnow(n, vector<int>(m));
        for(int i = 0; i < n; i++)
        {
            for(int j = 0; j < m; j++)
            {
                if(i == 0)
                {
                    if(j == 0)
                    {
                        snow[i][j] = 1*(s[i][j] == '0');
                        nonSnow[i][j] = 1*(s[i][j] == '1');
                    }
                    else
                    {
                        snow[i][j] = snow[i][j-1] + 1*(s[i][j] == '0');
                        nonSnow[i][j] = nonSnow[i][j-1] + 1*(s[i][j] == '1');
                    }
                }
                else if(j == 0)
                {
                    snow[i][j] = snow[i-1][j] + 1*(s[i][j] == '0');
                    nonSnow[i][j] = nonSnow[i-1][j] + 1*(s[i][j] == '1');
                }
                else
                {
                    snow[i][j] = snow[i-1][j] + snow[i][j-1] - snow[i-1][j-1] + 1*(s[i][j] == '0');
                    nonSnow[i][j] = nonSnow[i-1][j] + nonSnow[i][j-1] - nonSnow[i-1][j-1] + 1*(s[i][j] == '1');
                }
            }
        }
        // set<int> nums;
        int common = 0;
        for(int i = k-1; i < n; i++)
        {
            for(int j = k-1; j < m; j++)
            {
                int curr;
                if(i == k-1)
                {
                    if(j == k-1)
                    {
                        curr = snow[i][j] - nonSnow[i][j];
                    }
                    else
                    {
                        curr = (snow[i][j] - snow[i][j-k]) - (nonSnow[i][j] - nonSnow[i][j-k]);
                    }
                }
                else if(j == k-1)
                {
                    curr = (snow[i][j] - snow[i-k][j]) - (nonSnow[i][j] - nonSnow[i-k][j]);
                }
                else
                {
                    curr = (snow[i][j] - snow[i][j-k] - snow[i][j-k] + snow[i-k][j-k]) -
                           (nonSnow[i][j] - nonSnow[i][j-k] - nonSnow[i][j-k] + nonSnow[i-k][j-k]);
                }
                // cout<<curr<<" "<<endl;
                common = __gcd(common, abs(curr));
            }
        }
        int total = 0;
        for(int i = 0; i < n; i++)
        {
            for(int j = 0; j < m; j++)
            {
                if(s[i][j] == '0') total -= land[i][j];
                else total += land[i][j];
            }
        }
        if((common == 0 && total == 0) || (common > 0 && total % common == 0))
        {
            cout<<"YES"<<endl;
        }
        else cout<<"NO"<<endl;
    }
    return 0;
}

Can anyone please!!! tell me what did I do wrong here in question D. please!!! I am disgusted