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

Автор I_m_sfg, история, 2 месяца назад, По-английски

Hello coders!

I am very disappointed and frustrated after seeing today's rating on Codeforces. I don't remember the last time I saw 3k+ submissions on the 4th problem of a Div 2 contest. I don't think the 2nd and 3rd problems were easy compared to their solutions. I solved three questions in almost one hour, yet my rating only increased by 4 points.

Can you give me some tips on how to increase my speed on Codeforces (to avoid the cheating effect)?

Should I give up on becoming an expert?

Теги c++
  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

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

yes

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

expert? i gave up on being pupil (ofc its the cheating effect)

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

i believe its because D was too easy , iam not saying there werent many cheating attempts but also D was too easy for a div 2 D

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

    It is easier than usual but come on, do you really think that 3276 out of 18k div 2 participants can solve it?

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

      Yes, in past contests with rather easy problem D's (like around 1700 rated ones), the AC count usually reaches around 3k as well. Usually, there are around 1-2k solves for a 1800-1900 rated problem D, so this contest wasn't really an anomaly. Some examples of contests with easier problem Ds: https://codeforces.me/contest/1982 https://codeforces.me/contest/1975 https://codeforces.me/contest/1978 (this one's D was especially easy) I am sure there are always cheaters present, but you just have to accept it.

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

        Pretty sure problem ratings are determined by number of people who solved it and their ratings. So problems with higher rating difficulty will obviously have less solves.

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

          "problems with higher rating difficulty will obviously have more solves"

          what is bro saying

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

            Got confused as I was writing it and forgot that their relationship is the other way around. Fixed now. What I wanted to say is that problem rating is a function of number of solves.

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

      D was pretty easy for a Div 2 (i didn't solve it because I had to leave 30mins early) so 3k is not much of a stretch. In fact, most of the questions this contest were eaiser than normal (at least up to F).

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

Depends on what your goals are.

For me, the goals are to:

1) Improve: Being able to solve harder and harder problems over time, speed should come naturally as part of the process. 2) Learn and enjoy working on programming challenges.

As long as you enjoy working on problems, I don't see why your rating/raking in contests should matter. I'm pretty bad and I know it, but I still enjoy working on problems, so as long as I enjoy, there's no reason for me to stop.

If there were no cheaters, maybe my rating would be slightly higher, until it hit a wall and to break that wall I would have to continue to improve until that wall is broken. Maybe cheaters cause lower rated people's wall to come earlier, but so what, as long as you don't continue to practice and improve, you'd hit a first wall sooner or later anyway. Let them cheat and miss out on the joy of figuring out solutions by themselves, they aren't learning or improving. Take a long term mindset and don't focus on today's rating too much IMO.

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

agree with you. D was not an easy problem in my opinion, 3k ACs at round with 18k participants seems sus

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

hey bro

just giving lots of context won't increase your rating

try to read about new topics (DSA topics and some tricks used in hard problems)

also make a habit of always trying the next 2 questions after contest ends — after few effort read editorials or solution discussion and submit code for those problems

Thats how you can grow !!!

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

D was a terrible problem in my opinion — its solution was very easy to just Google/AI generate. Once you've made the observations that - the problem can be reduced to just doing swaps of the form (i, i+1), because every a swap of (a, b) can be expressed as some number of swaps (i, i+1) - you can make two swaps on one array without changing anything in the other array, because you set (l2, r2) = (1, 2) and then doing the same swap twice results in the original array

then all you need to do is count the number of inversions in both arrays, and if their parities are the same, you print "YES", and if not, print "NO".

Counting the number of inversions in an array is something GitHub Copilot is capable of doing with no input from the user.

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

    Your opinion is bias toward your skill (similar as red coders say E problems are easy). D was not an easy solution. For lower rating, that observation is not trivial. Proof is also not trivial. modify mergesort is common for higher rating, but not for lower rating.

    Sadly, your post discourage honest people to learn. Cheating does exists in some platforms. One can argue they break the rating system. Rumor circulates that a cheater is master in CF, which capable of solving till E in div 2. Unless you can solve the same number of problems before the cheater, your rank is barely increase. You mess up, you will be punished even harder.

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

      I think the reason D was "easy" even though the proof was not is because a lot of people just guessed the observation (i did)

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

        A similar thing with B as well. Very few people proved the main idea for B but it was still pretty easy and lots of people solved it. Proof doesn't affect the difficulty much since few people care about proving algorithms if they work.

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

    i think the observation is not as easy as you are trying to show it and the reason most of us googled the inversions code is not because we cant write a quick mergesort/ordered_set function its purely to save time brother

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

      I don't remember ever thinking about counting inversions with merge sort, Even though now that you mentioned it, it makes sense. In Brasil, I was taught to solve the inversion problem with BIT (fenwick tree), as the first application of such data structure. I thought that was something global, but maybe not.

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

        counting inversions using common data structures like segtree or BIT requires compression which is why i prefer mergesort and also its faster and uses less memory space

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

    Bro problem D for me is ez (and maybe for u too),but I don't think it's actually ez for beginners cuz the point for this problem is that observasion, not counting inversions(that's basic).

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

    How did you come up with the intuition of counting number of inversions?

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

      Because I made the first observation in the editorial (that the problem can be reduced to just doing swaps of the form (i,i+1))

      After this, I made the observation that if I can make the arrays the same, I can sort both. This is because sorting is equivalent to making one into the other, then doing the exact same moves on both arrays simultaneously to make them sorted. Thus, I needed to calculate the number of swaps needed to sort each array, and if the parity is the same, then the answer is YES, otherwise it's NO. It is a well-known fact that the number of adjacent element swaps needed to sort an array is equal to the number of inversions in the array.

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

We can't do anything about them. But you shouldn't worry and keep trying to become an expert :)

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

i feel d was a bit easier than c? i did a and b in 30 minutes and then spent almost the entirety of the rest of the time on c, and still couldn't get it. then I saw d in the last 10 minutes and realised i could've done this had i seen it earlier. this raises two questions a. cheaters are really just copying problems till E, and the increasing number of them everyday calls for a serious plag check by the CF moderators and rating rollbacks for those who were marked unfairly because of these cheaters. b. is it sometimes beneficial to skip a problem after trying for say 30 minutes ? i generally don't do that because i think if im not able to get div 2 c, how will I get d ?? which is true in most cases but wasn't yesterday.

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

I think the only solution is that once test started. The tab should go full screen and don't allow people to switch tab but that would create a lot of load on servers for compiling code online, just like OA

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

    This would not work because AI and Googling is dpecifically ALLOWED by the rules of Codeforces.

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

      Yeah that's the downside of this, you can't even use your own template but still I think it's a good idea. People shouldn't allow to use google/AI. I mean now days if you google contest xyz solution during contest you might get solution of the contest or even a online stream on youtube.

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

    Easy. Use 2 laptops, 1 for CF and 1 for cheating.

    Cheating is similar with corruption, no matter how you implement a solution, people will do it again. It is about culture and mindset. You need to fix it from the root cause.

    In this very case, we understand that for some countries, ratings are essential for securing a job (which I believe it shouldnt). Therefore mass cheating occurs only within recruitment season. We might want to start from here. Normalize companies to avoid using rating would be a good start.

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

      Agree but, don't know why so many people in my country are obsessed with rating. I have appeared around 20+ interviews but none of the company asked my rating I think people are obsessed to put rating in their CV just to show their profile strong.

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

    make codeforces into a totalitarian website to own the cheaters

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

    It's basically impossible to create a 100% secure anticheat. Most platforms have given up on it since unless you were to create a lockdown browser there would always be a way to bypass it (since website perms can always be bypassed with devtools)

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

I think the difficulty and styles of problems are very random, and this should not be a reason for contestants to be discouraged. As for whether you want to become an Expert, you should ask yourself what you want to gain from this process. If you don't want to persist, don't force yourself. When you want to come back one day, then continue to work hard. Competitive programming should not be a source of pain for you.

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

Hey, considering problem D, I think cheaters exist. However, the problem was easy for me since I solved it without counting the number of inversions. My solution was simply to try fixing the prefix of the two arrays until length (n-2). and then If the last two elements were the same in both arrays, I printed "yes"; otherwise, "no".

Why can you always fix any prefix of length until n-2?

(0-indexing) here at this example already the first element are equal, so we move to the next where a[1] = 2 and b[1] = 3; so our target is 3 we find it at index 4, a[4] = 3, and we need to move it till a[1] without changing the prefix of size 1 in both arrays. we can do it since we still have more than two elements. by simply swaping a[4], a[3] then a[3] with a[2] and so on till a[1] = 3; this number of swaping that we need to do we gonna applied it just in the last two element at array b.

You can follow these steps : swap the target element with its adjacent element in array a, and keep swapping just the two last elements in array b. By doing that, you can solve the problem but just with the last two elements with unknown status.

I just tried this idea during the contest since I couldn't prove it. Since I was currently at the contest and it passed, if there is anyone who can help with proving it why it's work, I would appreciate it.

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

In the last contest I solved a Div-2 C. for first time. But my rank.... more than 8000. Rating change: +5.

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

I remember the days when people used to become expert by solving three problems quickly, but now its even difficult to pass the pupil barrier.