chokudai's blog

By chokudai, history, 14 months ago, In English

We will hold AtCoder Beginner Contest 281.

The point values will be 100-200-300-400-500-500-600-600.

We are looking forward to your participation!

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

| Write comment?
»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve d?

»
14 months ago, # |
  Vote: I like it +42 Vote: I do not like it

Problem F is same as: 1285D - Dr. Evil Underscores

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

    Lol, I was happy that I solved it in 6 minutes. Now, I have realized I solved the same one a few years ago.

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

E is easier than D, for people who are less comfortable with DP.

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

Great Round! solved A-F for the first time :3

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

Got TLE on E using 2 multisets, anyone got AC with this approach please share their solution

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

    Same happened with me. Had to use ordered sets to pass.

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

    My submission uses 2 multisets.

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

    here

    hope that helps

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

      I checked both of your submissions (You and the comment above) but did not find any significant differences than my implementation, dont know whats the issue

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

        notice that when m==k, s2 will always be empty, so s2.erase(s2.begin()); in line76 can cause an error.

        here is my quick fix. no tle, but get a re... so there remains something to fix

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

          Thanks for the reply found out that deleting from an empty set was the issue. Though I did not except a TLE for that, if got RE then would have thought in that direction

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

    Your explain in D in ur video is good enough, thank u.

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

    I checked your submission, your implementation is incorrect (I did the same thing without those bugs and it passes under 200ms). Hint 1:- Check for m = 1, Hint 2:- count() takes O(f + logn) time where f is the frequency of the searched element.

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

      Thanks got it now. It was the case for handling empty sets for M=1, never thought of it as was not expecting TLE because of that. Thanks again

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

Any idea why this is giving a wrong answer on the samples? https://atcoder.jp/contests/abc281/submissions/37185737 Replacing min with max for some reason passes the samples (however not the system tests), but min seems more appropriate.

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

AtCoder founder and CEO guided ChatGPT to take part in ABC281 virtually. The result is that only A,B,C,D are completed. YouTube link.