atcoder_official's blog

By atcoder_official, history, 18 months 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

| Write comment?
»
17 months ago, hide # |
 
Vote: I like it -23 Vote: I do not like it

I think problem D should be easy.

»
17 months ago, hide # |
 
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!

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

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

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

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

»
17 months ago, hide # |
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

  • »
    »
    17 months ago, hide # ^ |
     
    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)

»
17 months ago, hide # |
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
  • »
    »
    17 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    17 months ago, hide # ^ |
     
    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 .

    • »
      »
      »
      17 months ago, hide # ^ |
       
      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.

»
17 months ago, hide # |
 
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?

»
17 months ago, hide # |
 
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