atcoder_official's blog

By atcoder_official, history, 14 months ago, In English

We will hold KEYENCE Programming Contest 2023 Autumn(AtCoder Beginner Contest 325).

We are looking forward to your participation!

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

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

250 for B will it be hard

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

    don't have such preconceptions on a difficulty of a problem based on points

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

How to today's D? E was easier than D.

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

I solved D, but couldn't solve E.

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

For problem C, why does it not work if I do not use a visited set? It should be sufficient to mark it as empty "." right? Is there an edge case i am missing here?

https://atcoder.jp/contests/abc325/submissions/46818827

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

    Maybe you referenced $$$grid[n][m]$$$ where $$$n\ge N$$$ or $$$m\ge M$$$?

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

      if r<0 or r>=n or c<0 or c>=m or grid[r][c] == ".": return

      I have this check in the dfs function to ensure I am not referencing that

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

        Just checked your code here and there, and resubmitted with sys.setrecursionlimit(500000). Got AC.

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

Can someone tell me what is wrong in my solution for problem D?

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

can someone tell what wrong in my solution for D https://atcoder.jp/contests/abc325/submissions/46827017

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

    You have to use a priority queue. Imagine when you are at time t, and there are two segments which contain t. At this point, it doesn't matter which of these segments begins first. All it matter is which of these segments finish first.

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

can any one tell me what the topic of problem d?

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

    scheduling trick: pick the first-ending task use cp-handbook greedy section to learn about it

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

      Not exactly the same problem... if i recall the one in cph disallows choosing another task whilst performing the first one, so the proof for this problem is different from in CPH. However its true the greedy is the same.

      Seems like the proof is a bit difficult... wonder why they omit it in the editorial :|

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

How to solve $$$F$$$? I thought of dp but couldn't think how we gonna do it!

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

    $$$dp_{i, j} = \min$$$ number of type-2 sensors to cover first $$$i$$$ ranges if we also use $$$j$$$ type-1 sensors

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

      Thanks!

      tbh I misread constraints for $$$k$$$, assumed that $$$k \le 10^9$$$ :(

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

UPD: Never mind

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

Forbidden

REVEL_CSRF: tokens mismatch.

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

I think problem F is very inspiring, even though I didn't come up with that definition as the editorial mentions.

However, this reminds me of a problem that I have met before, which involves a similar idea https://mirror.codeforces.com/contest/745/problem/E.

When I first met some new ideas, I could keep that in mind, maybe for several days, and this time, it shows again that, I will forget it sooner or later. I think I should practice harder and more.

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

Can anyone help me why this code is wrong for problem G?

https://ideone.com/TZcGWP

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

Could someone expain me this sentence?

You can switch from company car to train, but not vice versa. You can do so without spending time, but only in a city.

Does that mean once I get on the train,I can't get on the car anymore,then I must get to the n city by train?

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

My solution in problem D is almost the same as abc214_e