atcoder_official's blog

By atcoder_official, history, 14 months ago, In English

We will hold Toyota Programming Contest 2023#5(AtCoder Beginner Contest 320).

We are looking forward to your participation!

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

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

Why downvotes are in the announcement? don't be a kid!

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

HOPE to solve A....This is my first atcoder contest ;}

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

Why can't I pass problem D!!! The contest will be finished in 18 min!

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

Bruh, C was so annoying. Solved D in like ~10 minutes, but wasted so much time thinking for C :<

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

Well, I spend 30 min to understand what C was saying!

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

Task G it seems flow without any optimization passed.

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

can anybody please tell me a counter test case for C problem according to my code. or where my logic is wrong?

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

    Have you consider when a certain digits are located in the same position?

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

Me wasting 40 minutes on C not realizing there were only 3 slot machines. :(

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

For $$$C$$$, You can just make 3 consecutive copies of each string ($$$S_i =S_i + S_i + S_i$$$).

Try every digit[0:9] and if you found 3 different indices have the same digit, minimize the maximum index with the answer . Code : 45651190

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

can somebody tell me why i am stuck in problem D

https://atcoder.jp/contests/abc320/submissions/45651936

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

in the editorial of F: in the fourth case we need to iterate right? so how the complexity will stay O(n^3) ? https://atcoder.jp/contests/abc320/editorial/7169

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

    This will happen only when $$$k=H$$$, which is $$$O(H)$$$ for every $$$dp_{i,j}$$$.

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

Sub AtCoder it locked my account without any email or notice.

fu!

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

    That's your own problem.Not AtCoder's problem.

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

The data of question C is suggested to be strengthened

this is the hack input

8
12221222
13313331
44414414

answer:

4

Output the wrong answer '6' but accepted code. https://atcoder.jp/contests/abc320/submissions/45625948

This hack can block some greedy algorithms, including me.

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

For problem G: (1) (2)

The (1) code shows about 7 times slower than (2) for test 5, and it gets TLE. (2) is AC, and the difference between (1) and (2) is the way of adding the element to the b array: for (1), i use (line 135 to 141)

        for(int i=1; i<=n; i++){
            int cur = 0;
            while(b[i].size() < n){
                b[i].push_back(b[i][cur] + m);
                cur++;
            }
        }

for (2) (line 134 to 137):

            int ts = tmp.size();
            for(int k=0; k<n; k++){
                b[i].push_back(tmp[k % ts] + m * (k / ts));
            }

Why is (1) so slow? Very thanks!