atcoder_official's blog

By atcoder_official, history, 8 months ago, In English

We will hold Toyota Programming Contest 2024#4(AtCoder Beginner Contest 348).

We are looking forward to your participation!

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

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

Hope can solve problem F this time.

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

Hope can solve problem F or G this time.

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

GL&HF.

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

Good luck with the contest.

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

GLHF

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

Hope can solve problem E.rating ++!

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

Hoping to solve till question D in this contest!!!

»
8 months ago, # |
  Vote: I like it -18 Vote: I do not like it

felicitously

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

GL&HF

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

HF

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

My heart has cooled down

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

Guys my code is giving correct output for D sample testcase. But after submission it says sample output are wrong. How even it is possible? I am use "Yes" & "No" only as output. my submission:https://atcoder.jp/contests/abc348/submissions/52108589

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

what's the problem : link

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

    did your sample test case pass in local? Same problem with me. My sample testcase pass in local but failing on submission

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

      i was getting TLE but if i marked some cells as visited ,i would get different results

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

        but why are you getting 1 wa on sample input. Are these sample input different from problem's sample input.

»
8 months ago, # |
  Vote: I like it -13 Vote: I do not like it

Forcing use of __int128? Really?

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

Any hint for Problem F? I'm guessing DP or something to do with sets but have not really come up with a solution for it.

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

    It's a dogshit problem. Just write bruteforce with pragmas (that O3 optimization) and it will magically work.

    Idk if there's a 'real' smart solution, but this is intended as far as I can see from evima's editorial lmao.

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

      I just saw the video too, and it seems that optimisation is indeed what was expected. Well, I'd say it's still a new trick to learn (for me anyway).

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

How to solve D?

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

can somebody provide me dp code for problem D or any other approach

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

    You can check my video editorials for D and E

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

    You can solve it by BFS. This is my code.

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

    Maybe you can reference my code, $$$f_{i, j}$$$ means maximum from point $$$S$$$ to $$$(i, j)$$$,finally we can check if the point $$$f_{T} \ge 0$$$ and we can see the answer.

    code

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

Not a good problem F.

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

How can did C?

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

It seems intended solution for F has O(NNM) time complexity. Don't like it.

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

Btw, G has appeared before ucup season 2 round 3 problem L (partially free meal). Not complaining because such rounds are meant to be educational so problems that have appeared before are fine

Thanks for linked my blog in the (japanese) editorial though :flushed:

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

Can someone take a look at it for me? I wonder for a long time what went wrong.Thank you https://atcoder.jp/contests/abc348/submissions/52098958

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

E is almost same as 1092F - Tree with Maximum Cost

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

My submission for D pls help me debug problem D

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

    Just do the Brute Force way. Time complexity will be around O(NWH).

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

A-E Screencast (no audio/commentary this time)

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

Please give me a hint on the problem G

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

How to solve $$$\text{problem G}$$$, I saw many submissions using $$$\text{max-plus convolution}$$$ and some using $$$\text{segtree + divide and conquer}$$$. I am unable to understand both of them pls help :(

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

    Sort the items in order of increasing $$$b_i$$$. For two different values of $$$k$$$, say $$$x$$$ and $$$y$$$, let in the optimal choice of elements, the max values of $$$b_i$$$ are $$$b_x$$$ and $$$b_y$$$ respectively. We can prove that if $$$x < y$$$ then $$$b_x \leq b_y$$$.

    Also, if you fix some $$$b_i$$$, then the optimal answer for some $$$k$$$ is just the sum of maximum $$$k$$$ $$$a_i$$$$$$s$$$ in the prefix ending at $$$i$$$ minus $$$b_i$$$. So, for a fixed $$$b_i$$$ and $$$k$$$, you can evaluate the answer in $$$O(logn)$$$ using some data structure that gives the sum of $$$k$$$ maximum elements in a range.

    To evaluate for each $$$k$$$, you can use the fact that the optimal $$$b_i$$$ values are monotonically non-decreasing. It is a common idea to use Divide and Conquer. Refer to this article for more info on this idea.

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

english editorial?

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

update dropbox plz

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

I think atcoder user Syxqwq cheated in abc348. Reason: Use of a lot of strange code in https://atcoder.jp/contests/abc348/submissions/52112317 and in very many recent atcoder contests to confuse her submissions in order not to get her account banned. It is recommended that Atcoder admins ban her. atcoder_official please banned Syxqwq, her atcoder account is Syxqwq too. qwq

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

I implemented DFS for D but failed to pass, is it because DFS is just a wrong approach? Can't find the reason.