Please read the new rule regarding the restriction on the use of AI tools. ×

Siddharth.Pathak's blog

By Siddharth.Pathak, 5 hours ago, In English

Hi guys,

In the Problem B of Round 975 (Div. 2), I was going through an irritating problem in my code, that I did not rectify till now. I thought to solve the problem by solving two quadratic equations as follows:

$$$p(n-p+1)-1 = k \quad \& \quad p(n-p) = k$$$

The first one is to find if any array elements have the same count as $$$k$$$ and the second one to find the elements not in the array but are part of $$$k$$$ intervals. Here is my submission: 283252905

The problem was not though and can be solved in other ways too (as one is in the tutorial), but I am just curious to find my mistake, I will be very glad if someone can help me.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it