atcoder_official's blog

By atcoder_official, history, 5 months ago, In English

We will hold AtCoder Beginner Contest 436.

We are looking forward to your participation!

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

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

When is the new judge launched for old problems?

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

front row support!

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

Hope I can solve 5 probelms.

»
5 months ago, hide # |
 
Vote: I like it +31 Vote: I do not like it

AtCoder Beginner Contest 436 ❌ AtCheater Beginner Contest 436 ✅ AtCoder Talent Contest ✅

Felt more like a contest of who could “get help” faster. Too many solve times looked… unusual—like a duel of superpowered beings. Is this a programming contest or a cheating contest?

»
5 months ago, hide # |
 
Vote: I like it +70 Vote: I do not like it

Stop spamming off-topic please, none of the writer/tester mentioned Nanjing Massacre or Japanese invasion.

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

why there are so many solves on F, i don't think it is that easy

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

    Maybe cheaters.

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

    I think it is as easy as CF div2 C...?

    upd: Sorry for inproper words; maybe I underestimated the difficulty of the coming-up-with-the-approach part. Here's the link to my solution.

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

      maybe the same difficulty as div2 D, it requires data structures.

»
5 months ago, hide # |
 
Vote: I like it +88 Vote: I do not like it

Please stop posting about the Nanjing Massacre.

First, this content is unrelated to the contest.

Second, some comments have already shown confrontational and hateful emotions. If we look at this from another perspective: if, under the announcement of a contest held in China, a large number of users repeatedly posted off-topic historical or political slogans with violent implications, how would the organizers feel? They would not only be hurt by this, but would also have to spend extra time removing inappropriate comments, which directly affects the efficiency of handling legitimate questions and feedback.

If you wish to commemorate history or express personal or political views, please do so on more appropriate social platforms (such as Bilibili or Weibo). Here, please respect the contest, respect other participants, and respect the basic order of this community.

»
5 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

Whats the point of problem G? Search-skills check?

»
5 months ago, hide # |
 
Vote: I like it +47 Vote: I do not like it

Codeforces is not an appropriate platform for expressing patriotism.

And please use English, as using other languages may confuse readers.

I genuinely don’t understand why comments like these receive upvotes.

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Absolutely agree.

    I genuinely don’t understand why comments like these receive upvotes.

  • »
    »
    5 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it +8 Vote: I do not like it

    Agree, except I dispute calling it patriotism.

    That's extreme nationalism, or something even worse.

    Patriots love their homeland and their fellow citizens and treat their country's history with seriousness. In these trolls I see none of these.

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

    Agreed. This is an academic website.

»
5 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

It was the first time for me to solve E in an abc. I was so excited :)

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

wtf G BM??? anyone has easier solution

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

    When ABC problem EX disappeared, problem G then become the problem EX (?)

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +9 Vote: I do not like it

    My solution uses a pure DP, with a small optimization using NTT.

    Let

    $$$ S=\sum_{j=1}^{N} A_j x_j . $$$

    We compare $$$S$$$ with $$$M$$$ bit by bit. Suppose we have already processed the lowest $$$i$$$ bits of both $$$S$$$ and $$$M$$$. Let $$$\text{sign}\in{0,1}$$$ indicate the current comparison result: $$$\text{sign}=0$$$ means "$$$S\le M$$$ so far", and $$$\text{sign}=1$$$ means "$$$S \gt M$$$ so far". Since the lowest $$$i$$$ bits have already been handled, storing them in the state is unnecessary.

    Define the DP state

    $$$ f_i(\text{sum},\text{sign}), \quad\text{where}\quad \text{sum}=\left\lfloor \frac{S}{2^i}\right\rfloor . $$$

    When transitioning to $$$f_{i+1}$$$, we choose a subset of indices

    $$$ I=\{i_1,i_2,\ldots,i_k\} $$$

    to turn on the $$$i$$$-th bit of each corresponding $$$x_{i_j}$$$. Let $$$\text{coef}(s)$$$ be the number of ways to choose a subset of $$$I$$$ such that the sum of the chosen values equals $$$s$$$.

    Define the bit function

    $$$ \operatorname{bit}(x,i)= \begin{cases} 1, & \text{if the $$$i$$$-th bit of }x\text{ is }1,\\ 0, & \text{otherwise.} \end{cases} $$$

    The transition is

    $$$ f_i(\text{sum},\text{sign})\cdot \text{coef}(s) \;\longrightarrow\; f_{i+1}\!\left(\left\lfloor \frac{\text{sum}}{2}\right\rfloor + s,\;\text{newSign}\right). $$$

    Let

    $$$ \text{newSum}=\left\lfloor \frac{\text{sum}}{2}\right\rfloor + s. $$$

    If $$$\operatorname{bit}(\text{newSum},i)=\operatorname{bit}(M,i)$$$, then $$$\text{newSign}$$$ depends on the previous comparison (i.e. keep $$$\text{newSign}=\text{sign}$$$). Otherwise,

    $$$ \text{newSign}=[\operatorname{bit}(\text{newSum},i) \gt \operatorname{bit}(M,i)\big]. $$$

    The final answer is

    $$$ f_{60}(0,0)+f_{60}(1,0). $$$

    The $$$sum$$$ state is always in range $$$[0, 2 \times 100^2)$$$. The current time complexity is $$$\mathcal{O}(60\cdot (100^2)^2)$$$. To optimize the transitions, we use NTT to speed up the convolution.

    The final time complexity is $$$\mathcal{O}(60 \cdot 100^2 \cdot \log_2 (100^2))$$$

    My code

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

How to solve c? Any help?

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

    You can just use simulation,use map <pair <int,int> ,int> mp. And if mp[x][y] = 1 it means that (x,y) cell is occupied. Then when u are getting the query just check cells (r,c),(r + 1,c),(r,c + 1),(r + 1,c + 1) If any of them is occupied you can't do it Else do it and make all of them occupied Link to my implementation : https://atcoder.jp/contests/abc436/submissions/71662097 (My time + memory complexity is very big ,maybe there is much easier solution) :)

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

    we can turn $$$(r,c)$$$ into $$$r*(1 \times 10^9 + 2)+c$$$ , use a set to save it and use 'set::lower_bound' to check.

    warning : some process value need long long to save,or the program will return wrong answer

    update:delete surplus (

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

      Thank you. Also instead of storing like this Can we not use set of pairs and than check whether that pair and its friend already exits??? Can you please elaborate how this is more usefull than the other approach?

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

        For my solution,it's easier to achieve and better in time complexity than using a pair,but it can't be used in some problem which can solved by pair.

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

Although problem E and F were comparatively easy than usual ABC's but this was the first time I managed to solve A-F!

»
5 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

How to solve G? Looks like it had a lot of solves.

»
5 months ago, hide # |
 
Vote: I like it +62 Vote: I do not like it

what the fuck are these comments

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
»
5 months ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

Stop shitposting. You guys keep posting something like "勿忘国耻"(Yes I'm Chinese so I know what it means) , but you don't even care about that, you are just about contributions and the sense of "Oh I'm a really good people".

Now CodeForces users give you lots of downvotes and you will be disabled soon. That's great XD

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

Look at the first person who got AC on today's Problem E. This person's name is: nanjing massacre

»
5 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

~300 contestants know the BM algorithm before the end of the contest??????????

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +20 Vote: I do not like it

    300 contestants? 300 AI users!

    (not excluding some contestants who already knows BM, but in abc contestants, the number obviously can't reach 300.)

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

Nice problems , i liked d one especially, good bfs+some data structure for optimization thanks

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

Tojo's soul is on the Sanae

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

How to solve problem G?

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

    Use NTT for fast polynomial convolution, apply an even/odd decomposition, and finish with a BM evaluation. by likely

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

B>C D>E

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

    man... to me A<B<C<D=F except E, I absolutely have no idea how yall find it so easy 😭 , I AC it in contest purely by random guessing then the random bs magic just work... 🥀 , difficulty being so real subjective man...

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

      I got the idea by pure guessing, but was able to proof its correctness. The idea in itself is extremely basic, just finding the size of each connected component. But the way to get this idea requires so much creativity. Also, E's statement was really bad as I had to read it literally 20 times to understand!

»
5 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

I aked this contest but let me say ABCs are getting worse. We can easily find a similar question in Luogu:B3940 and one for D in Luogu:AT_abc184_e(even it's just Atcoder itself's). And obviously,many are using AI to AK this contest,but they don't even heard about BM or NTT in problem G,they just copied the code from chatgpt or deepseek.That's very bad.

»
5 months ago, hide # |
Rev. 4  
Vote: I like it -16 Vote: I do not like it

[Deleted]

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

I can't solve G, How to solve it?

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

What is NTT? I just know WTT.

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

Atcoder Beginner Contest -> AI Beat Contest.

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

    true... like what the fuck is even Bostan-Mori evaluation never heard it before in my life(I'm not even mad, I'm just flabergasted cuz I never heard such a thing and say it out of the love for the game 🥀)

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

Why are you guys discussing something unrelated? after all this is comments ABOUT A CONTEST

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

just in my opinion: statement of F is really hard to understand, which makes me spend more time to accept it, why cant you present this easy problem in a clearer statement?

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

I have read everyone's comments and know that I was wrong. I will no longer make extreme nationalist remarks. How can I stop the damage in time? If I don't, I will be overwhelmed by a lot of downvotes.

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

When these fking ultra-nationalism pupils shut up and go to promote themselves instead of expressing these shameless comments to be self-moved?

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

Grid, Grid and Grid why??

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

Can i get some hints for the F please .

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

    Hint: For $$$i\in[1,n]$$$, considers the number of photos whose maximum value is $$$B_i$$$.

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

How to solve E D:

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

    You can group the elements in the array into some cycles by computing for each element where they should be(their value),the number of swap to make the array sorted will be length-1, and the answer will be the sum of C(length of the cycle,2).

    To understand it, there is some cases, let’s call the elements swapped in the first swap a and b:

    1.both a and b are placed to where they should be. This won’t happen or else they won’t be in the same cycle, unless the length is 0 which has no contribution to the answer.

    2.one of a and b are swapped to their correct position, which decreased the length of the cycle by one.

    3.both a and b are not swapped to their correct position. This will split the cycle into two subcycles.

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

Solutions of D and F ??

»
5 months ago, hide # |
Rev. 2  
Vote: I like it +11 Vote: I do not like it

True way of patriotism: study hard, solve as many problems as possible, win gold medal in ICPC for the country or because a excellent engineer to make contribution.

False way of patriotism: spread irrelevant words with irrelevant language in irrelevant platform.

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

    ok

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

    Oh, come on~ Contributions to the world, math world especially, seldom came out of patriarchy.

    For those strange behavior in this post, I think expressing patriotism in word is their way to survive the culture around them, nothing about True or False.

    History is stories about people in the past, I can't care less. Nowadays, wording is nothing, only power talks. let's just ignore them, and do what we think worth to our lives~!

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

    Do notice that for a certain demographic of a certain age, copying and pasting slogans is the cheapest and most effective way to indulge in a fantasy of being a national hero.

»
5 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

the G is hard,isn't it?

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

Codeforces is not a place to discuss Nanjing Massacre or other political topics.

Sending information about Nanjing Massacre here can't help people not in China to know about it.

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

It's not their fault that foreigners dislike Chinese people.

»
5 months ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

Ban those fucking AI cheaters. I can bet that at least 1/3 of G solves are AI generated code. After the contest I pasted G statement to ChatGPT, and after less than half a minute it generates a acceptable code. Without advanced math knowledge, one almost cannot solve the problem. AI cheaters are stealing legit users' ratings.

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

Why the editorial is not translate in English ?

»
5 months ago, hide # |
 
Vote: I like it +25 Vote: I do not like it

Why are there so many sh*t comments from extreme nationalists under this post?

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

When will atcoder launch a rule that bans people to copy the code of the solutions of the original problems

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

I enjoy traveling to Hiroshima and Nagasaki; I'm NB!