### atcoder_official's blog

By atcoder_official, history, 6 days ago,

We will hold Toyota Programming Contest 2023#5（AtCoder Beginner Contest 320）.

We are looking forward to your participation!

• +111

 » 6 days ago, # |   +4 Why downvotes are in the announcement? don't be a kid!
•  » » 6 days ago, # ^ |   -9 .ComplaintFrame { display: inline-block; position: absolute; top: 0; right: -1.4em; } .ComplaintFrame a { text-decoration: none; color: #ff8c00; opacity: 0.5; } .ComplaintFrame a:hover { opacity: 1; } ._ComplaintFrame_popup p, ._ComplaintFrame_popup button { margin-top: 1rem; } ._ComplaintFrame_popup input[type=submit] { padding: 0.25rem 2rem; } ._ComplaintFrame_popup ul { margin-top: 1em !important; margin-bottom: 1em !important; } why downvote ;(((
 » 5 days ago, # |   -36 Hope to solve A, B, C.
 » 5 days ago, # |   -36 Hope to solve A, B, C, D.
 » 5 days ago, # |   -36 Hope to solve A, B, C, D, E.
 » 5 days ago, # |   -36 Hope to Solve A, B, C, D.GOD BLESSING ME!!!
 » 5 days ago, # |   -36 Hope to solve A,B,C.
 » 5 days ago, # |   0 HOPE to solve A....This is my first atcoder contest ;}
•  » » 4 days ago, # ^ |   -9 This is my ninth contest:(
 » 5 days ago, # |   0 Hope to solve A to D.
 » 5 days ago, # |   -12 Why can't I pass problem D!!! The contest will be finished in 18 min!
•  » » 5 days ago, # ^ | ← Rev. 2 →   +23 You are wasting time typing these words.
 » 5 days ago, # |   0 Bruh, C was so annoying. Solved D in like ~10 minutes, but wasted so much time thinking for C :<
•  » » 5 days ago, # ^ |   0 Agreed!
 » 5 days ago, # |   0 what is mistake in my code for D https://atcoder.jp/contests/abc320/submissions/45643786
•  » » 5 days ago, # ^ | ← Rev. 2 →   0 Consider a case: node is already visited but there are some unused edges connected to it.
•  » » » 5 days ago, # ^ |   0 ywah okay
•  » » » 5 days ago, # ^ |   0 i solved the problem but i don't understand why there could be unused edges. can you pls give counterexample case
•  » » » 5 days ago, # ^ |   0 if you visited a node doesn't that mean it would go through all edges so how can it have unused edges?
•  » » » 3 days ago, # ^ |   0 Whats the mistake in my code for Question E? https://atcoder.jp/contests/abc320/submissions/45637747
•  » » 5 days ago, # ^ |   +5 1e11 ($10^{11}$) is not large enough for infinity. The answer can be up to $2\times10^{14}$.
•  » » » 5 days ago, # ^ |   0 ohh i chnage it to 1e18
 » 5 days ago, # |   +1 Well, I spend 30 min to understand what C was saying!
 » 5 days ago, # |   0 Task G it seems flow without any optimization passed.
 » 5 days ago, # |   0 can anybody please tell me a counter test case for C problem according to my code. or where my logic is wrong? Codell n; cin >> n; string s1, s2, s3; cin >> s1 >> s2 >> s3; map < char, vector < ll > > mp1, mp2, mp3; for(ll i = 0; i < sz(s1); i++) { mp1[s1[i]].push_back(i); } for(ll i = 0; i < sz(s2); i++) { mp2[s2[i]].push_back(i); } for(ll i = 0; i < sz(s3); i++) { mp3[s3[i]].push_back(i); } ll mn = LLONG_MAX; for(char i = '0'; i <= '9'; i++) { for(auto x : mp1[i]) { for(auto y : mp2[i]) { for(auto z : mp3[i]) { if(x != y and y != z and z != x) { x %= n, y %= n, z %= n; ll mx = max({x, y , z}); mn = min(mx, mn); } } } } } if(mn != LLONG_MAX) { cout << mn; return; } ll got = 0; for(char i = '0'; i <= '9'; i++) { if(sz(mp1[i]) > 0 and sz(mp2[i]) > 0 and sz(mp3[i]) > 0) { got = 1; break; } } if(got == 0) { cout << "-1"; } if(s1 == s2 and s2 == s3 and s3 == s1) { cout << n; return; } 
•  » » 5 days ago, # ^ |   0 Have you consider when a certain digits are located in the same position?
•  » » » 5 days ago, # ^ |   0 I guess, I didn't comprehend problem fully.If possible, tell me a counter case please
 » 5 days ago, # | ← Rev. 2 →   0 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
 » 5 days ago, # |   +1 Me wasting 40 minutes on C not realizing there were only 3 slot machines. :(
•  » » 5 days ago, # ^ |   0 Same :sob:
 » 5 days ago, # |   0 Problem C, remains me I am still not good at logical thinking
•  » » 5 days ago, # ^ |   0 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.
 » 5 days ago, # |   0 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
 » 5 days ago, # |   0 can somebody tell me why i am stuck in problem Dhttps://atcoder.jp/contests/abc320/submissions/45651936
•  » » 5 days ago, # ^ |   0 use 64-bit integer instead of 32-bit
•  » » » 4 days ago, # ^ |   0 Thank you, it worked.
 » 5 days ago, # |   0 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
•  » » 4 days ago, # ^ |   +16 This will happen only when $k=H$, which is $O(H)$ for every $dp_{i,j}$.
 » 4 days ago, # |   0 Sub AtCoder it locked my account without any email or notice. fu!
•  » » 3 days ago, # ^ |   0 fu!
 » 4 days ago, # | ← Rev. 3 →   +4 The data of question C is suggested to be strengthenedthis is the hack input 8 12221222 13313331 44414414 answer: 4 Output the wrong answer '6' but accepted code. https://atcoder.jp/contests/abc320/submissions/45625948This hack can block some greedy algorithms, including me.
 » 4 days ago, # |   0 Whats the mistake in my code for Question E? https://atcoder.jp/contests/abc320/submissions/45637747
 » 4 days ago, # | ← Rev. 2 →   0 I can't understand the C problem. Why the answer of testcase:20 01234567890123456789 01234567890123456789 01234567890123456789is 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.
 » 36 hours ago, # | ← Rev. 3 →   0 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