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

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

你好,Codeforces!

We (FeOI and WAOI Team) are glad to invite you to take part in Codeforces Round 1035 (Div. 2), which will start on Jul/05/2025 17:35 (Moscow time). You will be given 6 problems and 2 hours to solve them.

The round will be rated for participants of Division 2 with a rating lower than 2100. Division 1 participants can participate unofficially.

All problems are authored by lizhous, Lyz09, ma2021tyoi0037 and me.

I would like to thank the following people for making this round possible:

We hope you will enjoy and have fun in the contest.

Score distribution: $$$500 - 1000 - 1500 - 2250 - 2500 - 3000$$$.

update 1: Editorial is out!

update 2: Congratulations to the winners!

Div. 1:

  1. ksun48
  2. BurnedChicken
  3. potato167
  4. StarSilk
  5. antontrygubO_o

Div. 2:

  1. hooting_crystal1604
  2. blueMOON137
  3. waste_
  4. arashmemar
  5. zhenzitou
  • Проголосовать: нравится
  • +297
  • Проголосовать: не нравится

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

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

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

seems I should not greet the author a hello back, so I am being downvoted :(

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

I am noob in coding rn but will try to solve at least problem A in this div 2 contest

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

hope my turtle hermet schooling works this time??

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

Hope problems be easy for beignner

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

OMG!! Chinese round

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

Thanks for the contest!!!

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

Hope problems will be anti-AI , rather than similar to those in 1033....

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

As an author, I hope all the contestants GL & HF!

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

wtf is FeOI and WAOI

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

He was promoted from IGM to LGM four days after testing

Why do you use passive voice? There's no one to promote him lmao. Isn't it "He promoted from IGM to LGM four days after testing"?

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

I think this contest will be full of math.

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

I hope to break my streak of negative deltas.

Also based on the score, this might be a speedforces round ... lezzgo !!!

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

As a tester,I think this contest is really interesting.

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

hoping to get CM this round, fingers crossed

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

I'm depressed by my recent performance

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

I've been CM six times. Hope that I can become a Master this time.

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

Hope to enjoy in the CN Round!

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

I wonder if the round is more difficult than Div.2 in Luogu.

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

Oh, Chinese round!!

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

lets goooo

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

hi guys, i have a question that my old accout is disabled by the administrator codeforces, the question is my old accout is banned forever or temporary, i just violate once time. Tks you guys

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

I wish success to all participants... My friends, you are legends.

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

is this a harder div 2 cause c is 1500 and b is 1000

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

As a tester, good luck.

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

Always stuck on C/D...

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

Glad to see 你好,Codeforces!

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

orz Chinese round

only Chinese can understand
»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

OH yeah! I am ready for this new challenge

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

Hoping to get to specialist after this round.

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

Score distribution: 500−1000−1500−2250−2500−3000

As a Codeforces beginner, I'm not quite sure whether the score distribution represents the approximate difficulty gaps of the problems. Does it mean there's a high possibility that D would be significantly harder than C, or there's actually no fixed relevance between score distribution and absolute difficulty?

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

Good luck to everyone.

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

Summoning rating for this contest

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

hope to reach 1700+)

»
16 месяцев назад, скрыть # |
← Rev. 9  
Проголосовать: нравится +111 Проголосовать: не нравится

dear MikeMirzayanov and KAN:

my alt 16777mt16 has been banned during this contest and the submissions have been skipped. can you tell me why am i banned? because of using ai? NO, i have not used ai.

i know my actions may not match my current 'specialist' level, but i've written many, many 2800 problems and i've got a 2440 rating atcoder account(name ultvoW_mEden. i'll mark that in my AT account soon). besides, i'm very good at counting problems. i didn't want to lose too much points so i watched d at the beginning of the contest. luckily d is a counting problem so i passed it quickly.

UPD1: i participated in codeforces far less frequently than in atcoder, because i'm Chinese and most contests in codeforces are late at night for me. THIS IS MY ATCODER ACCOUNT -> https://atcoder.jp/users/ultvoW_mEden

UPD2: this account is not trusted. i hope someone can proof that my codestyle is not inhuman and my speed matches my skills. i also hope that my friends can create a blog and speak for me.

UPD3: i asked the admins to re-enable my account because that is my main account, and i'm gonna write problems on it. i'll DEFINITELY not participate in ANY codeforces contests anymore unless codeforces get a MORE ACCURATE anti-cheat system. after i get trusted by my red friend, i'll publish a blog to expose how bad the anti-cheating system is. besides, my submissions SHOULD BE rejudged and the rating SHOULD BE rolled-back.

i'm innocent. can you please PLEASE look at my program and daily practice? i'm NOT ai at ANY side.

yours, 16777mt16.

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

why can't i see the standings?

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

I watched for 20 minutes, but I didn't understand what question D meant.

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

Seems like second problem is closely related to Goldbach's conjecture!

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

B ruined me

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

rubbish speedforces. D is much more difficult than normal round.It should be placed at E.

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

I hate bitset problem so much like it's unreal

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

Really enjoyed solving D. Great contest overall.

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

    Can you please share the approach??

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

      Instead of finding $$$f(a)$$$ over all $$$a$$$, we can consider all sequences of moves and find the number of valid $$$a$$$s that allow for that sequence of moves. A sequence of moves $$$s$$$ can contain each number from 1 through $$$n$$$ at most once (since there is only one token for each) and 0 any number of times. It must have length $$$n$$$. Furthermore, $$$0 \le s_i \le i$$$ for all $$$i=1,2,\dots,n$$$. Here, $$$s_i=0$$$ would represent not taking a token because the current number in a is 0, and otherwise $$$s_i$$$ means take token on $$$s_i$$$ on move $$$i$$$.

      There is a clear bijection between the original problem and our new system, since we are counting the number of pairs of (valid $$$a$$$, sequence of moves) for both cases. Then the answer is equal to the sum of the number of valid $$$a$$$ for each $$$s$$$ as described above.

      To find this answer, we can use dynamic programming with $$$dp[p][q]$$$ denoting that we have processed $$$p$$$ and later elements, and we have taken $$$q$$$ tokens ($$$q$$$ nonzero numbers) so far. Furthermore, this can be reduced to 1D since we only care about the last $$$dp[p]$$$'s results. Can you implement this?

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

    please tell the idea behind the solution.

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

Is there a solution for B which doesn't involve decimal number ( from calculating distance between start and end ) ?

I wasted some time overthinking precision issues, which I think might be un-necessary.

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

How to do C ?

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

    if n is odd, take all the values as l itself as xor of odd nos of l will give l and & will give l as well. also the highest set but of l and r must be diff or incase of n being even, xor of values will defn not have the highest bit set whereas it will in the & of the values. if n is even take first n-2 values as l and rest as the power of 2 greater than l

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

    Consider two cases:

    1. when n is odd, then if you put all l values in the array, your second condition will be always true, and it's also lexicographically smallest.

    2. When n is even, then first find the minimum number x, such that x&l == 0.

    -> Here you should make sure this x <= r and now you will just put l from 1 to n-2th and for n-1 and n-2 position put this x.

    -> Take care of when n is 2, in that case answer will be -1

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

    I did case work.. if n is odd.. you can just do l l l l... n times

    but for even .. you will always have and value zero because if you have 1 bit in and then all bits have to be 1 .but then xor for that bit will be zero .. because of even count of 1s

    so we have to make and value zero so MSB can't be same. so we have to look for next power of 2 after l called p .. and then you can make l l l . .. p p and n=2 has no solution ... also if p > r no solution

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

    [Deleted]

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

    If n is odd, we can clearly see that, if we choose a[1] = a[2] = ... = a[n]:

    a[1] & a[2] & .. & a[n] = a[1] xor a[2] xor ... xor a[n] (since a[1] xor a[2] = 0, a[3] xor a[4] = 0, ... a[n-2] xor a[n-1] = 0, giving us with 0 xor a[n] = a[n])

    So clearly, the lexicographically smallest would be a[1] = a[2] = ... = a[n] = l.

    If n is even, then there are 2 cases:

    • n = 2:

    There does not exist 2 positive integers x and y with x xor y = x and y

    Because if x & y contains a bit that is 1, the corresponding xor bit would be 0 and vice versa (there is only 1 exception, that is the bits are 0, but then, x and y would be 0, contradicting to the fact that x and y are positive integers)

    • n >= 4:

    The most straightforward way is that a[1] & a[2] & ... & a[n] = a[1] xor a[2] xor ... xor a[n] = 0.

    For the array to be lexicographically smallest possible, the array should be in the form:

    [a,a,a,a,...,a,b,b] where a is L and b is the smallest number such that L & b = 0. b can be found in O(log n). We can see that L <= b <= R, so if b > R, print out -1.

    Now we only have to manipulate the position k. If k+1 >= n then print out b (a[n-1] and a[n] should be b) else print out L

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

    consider parity of n

    if odd we can just put l n times, because xor = l and and = l if even we can put l n-2 times, and something entirely disjoint from l 2 times, it turns out the smallest number that's entirely disjoint from l is 2^(msb(l)+1) as all previous bits, including msb(l) will be off. Because its disjoint the ands cancel out as well as all the xors, we result with 0 and 0 for and and xor.

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

Do I just suck at geometry or is C actually easier than B (I think both lol)

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

I won't register for chinese round any more :(

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

E is cool, but I like D very much. Also, this feels like a div 1 round lol

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

Once again on CF: terrible problem selection and round coordination. I had a chance to try problems from A to D. All of them are just pure math, no programming at all. From A to C it's just about handling edge cases, problem D I couldn't solve, but seems to be combinatorics. Authors, next time please consider giving it to math contest instead of programming competitions.

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

When I solved div2C my rank on the standing table was around 700 to 800.. but even when only 900 people have solved div2D, I thought my rank would be around 900 to 1000 because I didn't make any wrong submissions..

But my rank at the end is nearly > 1400 ... how can it fall so much when there are not too many AC for div2D

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

another trash round :/

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

950th rank and 6,000th rank solved the same amount of problems.

So the difference between Pupil and Candidate Master is how fast you figure out the little xor & trick.

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

Didn't really enjoy the problems, maybe that's skill issue on my end :)

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

It's true that mathematics is crucial for algorithm competitions, but aren't you taking this mathematics thing a bit too far?

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

This round (A-C) was more about edge cases than programming, I personally didn't enjoy it.

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

D, very good problem, I love it

E, shit, if it's put on C then >1000 people can solve it. Ai is only used in a process of *800 difficulty, just brute force Onlog^2n dp without any thinking can pass it

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

is it a norm now that B should be the trickiest problem of the contest

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

Just another trash round.

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

Nice problems! Enjoyed D specially. contest was more about math but :(

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

EdgecaseForces Round

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

I am getting atleast -200 lmao

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

is B pure math or am i missing any observations?

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

    triangle inequality for me

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

    You can always choose a direction that reduces the distance to however much you want for example you are at $$$(0, 0)$$$ and want to go to $$$(5, 0)$$$, $$$a = [3, 4]$$$, you can always use your first move to go to a point having where the distance between it and $$$(5, 0)$$$ is $$$4$$$, so as long as the distance doesn't exceed the sum of $$$a$$$ there always a solution

    unless there is a number in $$$a$$$ larger than the rest, this will make the minimum distance you can move $$$2 * max - sum$$$

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

What's the idea for D

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

    Reverse the problem. Don't ask which token can I place at a_i, but where can each token go. Token i can only go to some place >= i. Then, think about how many of those places might already be occupied.

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

      they are multplying by all positions ahead of i that are not zero, but does not it depend on what the number on those positions was used, maybe that pos has a number which does not allow it to pick up till this location

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

        I don't know what you mean by "they". What I did was make a dp of length n and dp[i] representing ways when i tokens have been removed. Now for each token j, I know if i tokens are removed j is the I+1st token removed and the available space for this jth token is (n-j)-i as exactly i of the places after j should be occupied.

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

WHY DO I SUCK AT THIS

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

I would really like to know what those who say before the competition ((( as a tester it is a very good competition ))) really do? div3 has become very easy div2 has become very difficult and question B is becoming more unsolvable The questions are all mathematical and it has been centuries since a question about graph has come up

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

I demand the removal of the law that reduces question scores over time.

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

Today's contest was exceptionally hard for me. After spending 50 minutes on D, I instinctively knew that I was not going to solve it today. Will look into the editorial afterwards.

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

why the hell was D harder than most ~2400 problems for me

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

Misread problem D and solved to find distinct removal configurations.

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

I had fear of C now I have fear of B :)

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

I think D is about *2400

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

Does anyone see that bond_at_codeforces (top 34 on the rankings) is an alien / cheater? 26 seconds between submission of prob A and prob B is insane

Also, how does this guy do 4 problems in under 3 minutes??

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

I didn't noticed the "lexicographically smallest" part of the C and kept wondering for 20 mins about the uniqueness of the solution .

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

B>C

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

what is the problem with my code? in test case 2 it says wrong but locally i get the right ans.

void solve(){
    ll a,b,x,y;
    cin>> a >> b >> x >> y;
    ll sum=0;

    if(a == b){
        cout << 0;
        return;
    }
    else if(a > b){
        if((a%2 == 1) && (abs(a-b) == 1) ){
            cout<< y << endl;
            return;
        }
        else cout << -1 << endl;
    }
    else if(a < b){
        if(x>y){
            while(a<b){
                if(a%2==0){
                    sum += x;
                    a++;
                } 
                else {
                    sum += y;
                    a++;
                }
            }
        }
        else if(x<=y){
            while(a<b){
                sum += x;
                a++;
            }
        } 
    cout << sum << endl;
    }[problem:2119A]

}

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

When is editorial coming out?

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

E is too hard

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

performance was somewhat subpar but the music was awesome :D

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

I solved A and C but have absolutely no idea about B (Maths especially Geometry is really weak). Nothing. Can someone please provide me a hint by hint solution for it, it will be really helpful. Thanks !!

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

    Up Up

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

    Here you go

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

    There are 2 cases.distance to target is too far, or distance to target is too close.

    Too far is easy, too close is the triangle inequality

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

    hi

    Let $$$P_1$$$ be the first point and $$$P_2$$$ be the second.

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

    Let's define the point $$$P$$$ as $$$P(p_x, p_y)$$$.

    Hint 1
    Proof of hint 1
    Hint 2
    Answer to hint 2
    Hint 3
»
16 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

editorial ?

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

When will rating change will take place???

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

Math mains: A, B, and C are trivial! Everyone else: This contest was trash

Anyways, A: its just +1 but look for A = B+1 and odd edge case B: look for distances edge case and triangle inequality C: odds and evens and just replace 1s with 0s for even N

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

Someone streamed solutions here during contest https://www.youtube.com/live/kgB5w4AxdFk?si=kGOMS9BQXLKaYYIV

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

solved B but I have a feeling my solution is incorrect, consider this test case:

1
3
1 1 1 11
2 2 7

shouldn't this be YES? rotate the first 2 segments by x where 4cos(x)=3?

edit: nvm i do get YES, i was running the wrong code lol

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

I have some questions about problem B when calculate the mindist. Why just when maximum * 2 < sum, mindist will be 0. I try to solve it by DP, but it was hard for me.

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

Hello Everyone,

Is it due to rounding errors while calculating square root in Problem B that the approach doesn't work ?

Although I learned to never use sqrt on mathematical questions :))

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

I anyone is also pissed off by B and waiting for the editorial, here's the thing.

Idea: if it's possible to build the polygon with N+1 sides [a1, ... , an, d], where d = dist(x, y), then YES, NO otherwise.

Condition — there's no a single side which exceeds the length of all the others (kinda same thing as for possible triangle check).

Implementing straightaway d=sqrt() didn't seem to work (IMO due to precision issues), so

  • consider D = d * d, s = sum(a[i]), S = s * s
  • check S < D
  • consider mx = max(a[i]), MX = mx * mx, r, = s - mx, R = r * r
  • check mx > r + d --> mx - r > d --> (mx - r)^2 > D --> MX + R - 2*mx*r > D
  • »
    »
    16 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    mx - r > d --> (mx - r)^2 > D

    mx - r > d </- (mx - r)^2 > D

    The second might be true but, at the same time, the first might not be true.

    If our goal/desire/designation is to check mx - r > d we might choose to use from abundance of information of a particular situation, in particular, that d > 0. So if mx - r > d to happen --> mx - r > 0 must happen.

    mx - r > d <--> (mx - r > 0 and (mx - r)^2 > D)

    Statements are interchangeable (in this universe).

    In more general case, that is with less information which force us to operate in general terms, there is this:

    a > b <--> (a > 0 and b > 0 and a^2 > b^2 or a < 0 and b < 0 and a^2 < b^2 or a > 0 and b < 0).

    // ImPoSe TaRiFfs hoooooGE

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

My solution for D.Token Removing with modulus functions defined in my template gives time limit exceeded

327642840

but replacing them with normal modulus operations it get accepted

327643413

is the time limit too strict or am i missing something (like modulo operations time complexity when modulus is non-prime)?

pls suggest me most efficient way to perform modulo operations

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

whoa!! I am awake next morning to upsolve D.. but no editorial.. please update

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

Well I'm quite a new competitor.Who could teach me how to read tutorial?

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

    you are using words like quite and could .. then you have good english .. so you can read the english part...

    but because editorial on codeforces are short.. it is difficult to understand the full logic sometimes...

    if it is a recent contest I generally comment on the contest announcement or editoral post and ask people to help me understand it ..

    or if it is a an old question .. I try to paste the editorial to chatgpt and ask it to explain it to me.

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

It was a nightmare..!

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

CutieSmileHaruka, why no editorial yet?

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

How to E?

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

Nice music

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

a very good solution of the contest: solution for F

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

May I ask when would the tutorial be released

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

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

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

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

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

Problem D and E is too hard.

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

Dear Codeforces team,

I would like to sincerely apologize for the situation regarding my submission for problem 2119D (submission ID: 327573902).

During the contest, I was physically present with my friend. We were solving the problems side by side, and I did not realize that this kind of collaboration, even without any intention to cheat, is considered a serious violation of Codeforces rules.

I now fully understand that any similarity between submissions — intentional or not — is not allowed, and I take full responsibility for this misunderstanding. I assure you this will not happen again, and I will be much more careful to follow all contest rules strictly in the future.

I kindly ask for leniency and hope you will consider this an unintentional first-time mistake.

Thank you for your understanding and for maintaining the integrity of the platform.

Best regards, [Artinzer0]

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

Hello Codeforces team,

I received a plagiarism warning for my solution 327591317 to problem 2119D, allegedly matching user GOW1455. I want to sincerely clarify that I did not cheat or share my code with anyone. I wrote the solution independently using VSCode on my personal computer.My VSCode proof

I later found out that the other user is from my college, but I don’t know them personally and had no interaction with them during or before the contest. I did not use any public IDEs (like Ideone), did not screen-share, and did not post my code anywhere.

I understand that unintentional similarities can occur, especially among students with similar backgrounds or problem-solving strategies. However, I assure you I participated honestly, and any similarity is purely coincidental.

I kindly request a manual review of my submission. I am also open to providing any additional information if required. Thank you for your time and understanding.

Best regards, ShaikJameelUrRahaman.

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

Hello,

My solution to Problem A 327536304 was recently skipped due to alleged similarity with other submissions. I would like to clarify that I used Dijkstra's algorithm purely because the constraints were very small (n ≤ 100), and I couldn’t come up with the intended solution in the first couple of minutes, as I usually do for Div 2A problems. The approach worked within the limits, so I went ahead with it.

I’ve looked at some of the other flagged solutions, and the only commonality is the use of Dijkstra's algorithm, a well-known and standard technique. There’s no unusual similarity in code structure or implementation details beyond that.

I've been participating in contests regularly for months, and I would never consider cheating on a Div 2A problem. This contest was particularly meaningful to me, as it pushed me to Candidate Master for the first time.

I respectfully request that you review my submission again and lift the skipped status.

Thank you.

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

Hi Codeforces Team,

My submission 327537417 for problem 2119A was flagged due to similarity with others. I submitted the same logic earlier on CodeChef (ID: 1165443773, submitted ~1 month ago). The problems were different, but the approach overlapped naturally. I wrote and adapted it privately using my own code, no sharing or public paste sites.

Here’s the CodeChef link for reference: https://www.codechef.com/viewsolution/1165443773

Thank you for reviewing this. I’m happy to provide more details if needed.