atcoder_official's blog

By atcoder_official, history, 3 months ago, In English

We will hold JPRS Programming Contest 2026#1 (AtCoder Beginner Contest 442).

We are looking forward to your participation!

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
3 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Hope for great problems and short problem statement like the post!

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope for a good contest!

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

while(1) luck++,AC++,WA--;

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

btw atcoder > codeforces??

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is atcoder.jp down? It shows 403 error

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

RP++

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The ABCD Are very easy I Aced them in 30minutes,But EFG………………I don't want to say anymore

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

oooooooooooooooaaaaaaaaaaaaaaaaa

WA ON E's 32&33!!!!!!!!!!!!!!!!!!!!!!!!!!!

fk

»
3 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Another abc421 lol.

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

G was too easy for a G.

»
3 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Did anyone had problems in E when sorting by atan2?

I switched to atan2l and it seemed to start working, but i am not sure, as i also did some +-1 with prefix sums. But the plain atan2 submission failed only 2 tests...

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Yep, exactly the same

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    i got accepted submission using atan but it cost me 7 wrong submission :(,I feel you must be using double instead of long double,but if this is the case i am curious about how atan2I works with double,anyone knows the reason?

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Good idea to avoid floats unless absolutely necessary. For sorting rays from $$$(0,0)$$$ to $$$(x,y)$$$, you can group them by $$$(x/g,y/g)$$$ where $$$g=gcd(|x|,|y|)$$$.

    • »
      »
      »
      3 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      you still have to sort after grouping. you can do some polar magic, but i was not sure and it seemed like 1e9 is not that bad for atan2 precision

      • »
        »
        »
        »
        3 months ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        The difference in angle between two vectors with $$$O(A)$$$ coordinates can be $$$O(1/A^2)$$$ (find two vectors with lengths both $$$O(A)$$$ and having cross product = 1). As a quick estimate, doubles only stores numbers with $$$16$$$ significant decimal digits. So a difference of $$$10^{-18}$$$ can be rounded to the same double and angles could become equal that shouldn't be equal. Also atan2 is not guaranteed to always round the correct way so with some bad luck it could even compare completely the wrong way.

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I converted the atan value to degrees and got WA on 32,33 ,changed double to long double and passed.

    Submission

»
3 months ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

E is a rubbish.

a similar problem: Luogu P7133

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Well, but you can't expect the problem setters of a Japanese contest, to check for duplicates in Chinese problem banks.

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

swap(E,F) plz……

F is classic

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how to do F?

  • »
    »
    3 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Let $$$dp_{i,k}$$$ be the answer for row $$$i$$$ where the first $$$k$$$ cells are white.

    $$$dp_{i,k} = cost(k) + min_{j=k..n}(dp_{i-1,j})$$$

    $$$cost(k) = cnt_{black}[0..k-1] + cnt_{white}[k..n-1]$$$ and can be maintained using a sweep.

    The minimum can be maintained using suffix minimum, or range query.

    The answer is $$$min_{k=0..n}(dp_{n,k})$$$.

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

E massacred my will to continue with this contest.

»
3 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

I spent an hour debugging problem E just because of floating-point precision issues with atan2, but I mistakenly thought it was a problem with my logic.

I tried to solve G using ternary search, and brute force when $$$r-l\le 300$$$, and it got Accepted, but I wasted too much time on problem E so I didn't AK until the contest ended,sad:(

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think G was easier than E, although I couldn't solve both but while upsolving....

»
3 months ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

This is My Rating in Atcoder:https://atcoder.jp/users/lzc2015

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I don't understand problem C