atcoder_official's blog

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

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

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

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

Hope to solve A, B, C.

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

Hope to solve A, B, C, D.

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

Hope to solve A, B, C, D, E.

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

Hope to Solve A, B, C, D.

GOD BLESSING ME!!!

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

Hope to solve A,B,C.

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

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

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

Hope to solve A to D.

»
8 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!

»
8 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 :<

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

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

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

Task G it seems flow without any optimization passed.

»
8 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
  • »
    »
    8 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?

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

      I guess, I didn't comprehend problem fully.

      If possible, tell me a counter case please

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

Nice C. I did not thought of direct simulation. I thought to fix one string, find i th char in other two strings. Equal index in all 3 ,in one of 2 strings and not euqual indexes, all those cases just made my implementation harder.

Equal Numbers,alphabets,indexes,maximms,minimums are the tools to make question harder and sometimes even annoying if you handle it in wrong way

»
8 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. :(

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

Problem C, remains me I am still not good at logical thinking

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

    I think it has 2 solutions.one with observation and another solution which need a bit of implmentation. This reminds us that we both are good for nothing.

    Note I did not solve C even after pactising year. I know c++ since 2016.

»
8 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

»
8 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

»
8 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

  • »
    »
    8 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}$$$.

»
8 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!

»
8 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.

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

Whats the mistake in my code for Question E? https://atcoder.jp/contests/abc320/submissions/45637747

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

I can't understand the C problem. Why the answer of testcase:

20 01234567890123456789 01234567890123456789 01234567890123456789

is 20? can't we just stop at 0 seconds so all reels show 0?

Edit: nvm, I got it, he can press only one button at any given second.

»
8 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!