atcoder_official's blog

By atcoder_official, history, 5 weeks ago, In English

We will hold AtCoder Beginner Contest 380.

Please note that new generative AI rules will be applied from this ABC.

We are looking forward to your participation!

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

»
5 weeks ago, # |
  Vote: I like it -23 Vote: I do not like it

I think problem D should be easy.

»
5 weeks ago, # |
  Vote: I like it -28 Vote: I do not like it

Another 575-G contest. Hope I can solve all the problems this time.

$$$\Huge{\text{Good Luck & Have Fun}}$$$
»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Where to look at the new rules of AI?

»
5 weeks ago, # |
  Vote: I like it -23 Vote: I do not like it

Hoping to solve D and even E.

»
5 weeks ago, # |
  Vote: I like it -20 Vote: I do not like it

114514

»
5 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

I have been participating AtCoder Beginner Contest for about 1 year. I am a beginner, I have done 5 problems for only once. Anyway, I hope I can get five problems this time. Wishing everyone have fun and good luck!

PS: I am a Chinese student, if there are some fault in the words above, please forgive me!


I love coding!

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

    I love coding!

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

    I have been working on it for a year,but I can only solve 2 questions. Worship the big shots./bx

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

My computer turn off by itself three times!!!!!!!!!!!!!!!!!!!!! QWQ&&QAQ

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

Why code is so hard ?? Bro I just could A and B , the C i dont understand.

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

It's the first time for me to solve all the problems. Congrats!

»
5 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

downvote fest

»
5 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Solved A $$$\sim$$$ F, wonder how to solve G

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

Wonder how E,F,could anyone give me a help?

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

Can anyone help me with problem E? My main idea is to use the union-find method.

My code: https://pastebin.ubuntu.com/p/ByrBtKqdwx/

Oh, my poor English.

Thank you very much.

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

Why did I get an RE+WA in D?Can anyone help me? my submission

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

    im betting on floating points imprecision. Eps shenanigans are never a good a idea when dealing with integers.

    Try it implementing int log (divide by 2 while not 0 and keep count of count of divisions)

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

    I fixed the RE+WA in D by improving the solution by leveraging binary search and avoiding deep recursion. We will focus on using the properties of string duplication to find the correct position of any character in the original string S without explicitly constructing large strings. Steps to Implement the Solution: Length Growth Calculation: After t operations, the length of the string becomes n×2^t. The key observation is that after each operation, the string becomes double its previous length, and we can trace whether a position comes from the first half (unchanged) or the second half (flipped case). Efficient Position Trace: Given a position K_i in the final string, determine where it comes from in the original string by tracking whether it's in the first or second half and adjusting accordingly. Toggle Management: Count how many times we "toggle" (i.e., when the position falls in the second half) to determine if the final character at that position has been case-flipped an odd or even number of times.

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

Strange things happening with my code for problem D. It show wrong answer for sample test case but it is showing correct answer in my pc. Can anyone help me to find the problem in my code , please ~~~~~ Your code here...

Problem D
  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your printing an extra space after the last query before newline ?

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

    Fixed, the problem was my code for changing upper to lower for both cases had some bug that I dont know . Copy pasting that part ( changing upper to lower ) form editorial get accepted the code .

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

      The problem occurs in this line:

      if( (char)isupper(c) ) cout << (char)tolower(c) <<" ";
      

      If you change it to:

      if( isupper(c) ) cout << (char)tolower(c) <<" ";
      

      Then you can pass the sample.

      I think it's undefined behavior or something. To avoid this, you can use Custom Test.

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

I read the editorial of D problem. Can anyone explain why counting number of set bits in binary representation helps us determine if the character is flipped or not?

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

Can anyone please check my code for E — 1D Bucket Tool giving WA. I have used a set to keep a track of all the starting position of any particular colour, and tried to update the count on every new type 1 query.

Link: MY_SOLUTION

»
4 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

Why are they repeating problems. Like the exact same thing.

https://atcoder.jp/contests/acl1/tasks/acl1_e

»
4 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

Can we please improve the quality of editorials a bit.. if I am not able to get any clue on how to approach the problem during the contest then I can't just out of the blue understand the editorial with just stating the process rather than helping with some intuition behind the problem.

Problem F was written so badly. Other low effort editorials too. Is it just me who feels this?