### atcoder_official's blog

By atcoder_official, history, 4 months ago,

We will hold HHKB Programming Contest 2023(AtCoder Beginner Contest 327).

We are looking forward to your participation!

• +50

 » 4 months ago, # |   +3 Hello.I wish luck to everyone in this contest!
•  » » 4 months ago, # ^ |   0 You too. Good Luck.
 » 4 months ago, # |   0 AtCoder isn't working? It shows 403 on my browser. Is it my problem?
•  » » 4 months ago, # ^ |   0 It is working,but the problems are to difficult!
•  » » » 4 months ago, # ^ |   0 i do a,b,c but d to g is too hard
•  » » » » 4 months ago, # ^ |   -11 Actually d is very simple.But g is also too hard for me.
•  » » » » » 4 months ago, # ^ |   +4 $G$ is hard for many GMs as well.well, don't discuss anything before this contest ends!
•  » » » » » » 4 months ago, # ^ |   0 Hey, This is my first contest. Where can i find the answers after the contest is finished? I heard atcoder contests are suitable for beginners. But, this is too overwhelming!!
•  » » » » » » » 4 months ago, # ^ |   0 Wait for the end of the contest!When the contest ends a button for editorial appears at each problem page.
•  » » » » » » 4 months ago, # ^ |   +1 How u solved E?
•  » » » » » » » 4 months ago, # ^ | ← Rev. 2 →   +1 with dp!If you observe in the given equation only the numerator for the first term makes any sense (changes for different sizes of subsequence).So we can find the maximum value of a subsequence of length K (for K = 1 to N)we will use this dp value as a numerator of the first term and the rest can be substituted easily and we can find the maximum ans over all subsequences of different lengths!My submissions
•  » » » » » » » » 4 months ago, # ^ |   0 okay
•  » » » » » 4 months ago, # ^ |   0 E is even more simpler than D
•  » » » » » » 4 months ago, # ^ |   0 But I spent 5 mins on D, and 50 mins on E qwq
 » 4 months ago, # |   0 4x'wa' at problem D, 6x'wa' at problem E...
•  » » 4 months ago, # ^ |   0 Me either…
•  » » 4 months ago, # ^ |   0 okay... problem D I used BFS, but one little mistake. problem E I did not setprecision(10).
 » 4 months ago, # |   0 is problem E a dp Problem ?
•  » » 4 months ago, # ^ |   0 Yes
 » 4 months ago, # |   0 Why finding cycle in D doesnt work? it failed on 3 test cases
•  » » 4 months ago, # ^ |   +3 becoz its bipartite graph problem
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 hmm got it, my bad, idk how it passed 24 test cases lol
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 i implement detection of cycle graph as well , i got 24 tests AC and only 3 WA.can you give a counter example where detection of cycle graph is not working ?
•  » » » » 4 months ago, # ^ |   0 cycle will not work if you have cycle of odd length
•  » » » » 4 months ago, # ^ |   0 Just check for bipartiteness for the nodes given in the sequences for each component also make a check for S[i] == T[i] as that also leads to a no answer. Nothing more required.
•  » » 4 months ago, # ^ |   +3 In D, you have to tell if the graph formed by the edges $(X_{A_i}, X_{B_j})$ is bipartite or not. Note that, even cycles are also bipartite graphs.
•  » » 4 months ago, # ^ |   0 were you finding cycles of all lengths or only odd lengths ?
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 it works for even cycles (and not for odd ones) so just because a cycle exists doesn't mean the ans should be no
 » 4 months ago, # |   0 I only WA on 3 tests!What a pity!
 » 4 months ago, # |   +4 I think F is a famous problem in Luogu named "Stars in the Window".Problem's link:https://www.luogu.com.cn/problem/P1502.
 » 4 months ago, # | ← Rev. 2 →   0 How to solve E?
 » 4 months ago, # |   0 Why does my D-question program have a test point wrong? I treat a[i] and b[i] as two nodes of a graph to determine whether they are bipartite graphs. https://atcoder.jp/contests/abc327/submissions/47266143
•  » » 4 months ago, # ^ |   0 https://atcoder.jp/contests/abc327/submissions/47276048 Added 1 line in your code
•  » » » 4 months ago, # ^ |   0 Thanks.
 » 4 months ago, # |   0 I liked the overall problem set !!D and F were my favorite. However, it would have been better if the input in F were like $X_i, T_i$ instead of $T_i, X_i$, got some wa's due to that lol.
 » 4 months ago, # |   +6 Why does this give wrong answer on 3 cases? submission
•  » » 4 months ago, # ^ |   +7 for (lli i = 1; i <= N; i++) { for (lli j = 1; j <= N; j++) { dp[i][j] = max(dp[i-1][j], 0.9*dp[i-1][j-1] + P[i]); } } Here, I think $j$ should loop from $1$ to $i$ (instead of $N$).
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +12 bfsof Orz! This is not the main reason. The main reason that this guy misses the cases where $j=0$ for $i \geq 1$. Corrected here: https://atcoder.jp/contests/abc327/submissions/47279921
•  » » » » 4 months ago, # ^ |   +2 I am failing the same 3 test cases even after checking for $K = 0$ case. I suspect it is due to some overflow / precision issues, or something in my implementation. https://atcoder.jp/contests/abc327/submissions/47281611
•  » » » » 4 months ago, # ^ |   0 Isn't case j=0 already covered when I made the dp array?
•  » » » » » 4 months ago, # ^ |   0 you omitted the case dp[i][0] is transferree from dp[i-1][0].
 » 4 months ago, # |   +9 Lesson learnt. On AtCoder, I can try unordered_map when map causes TLE. I didn't do so so far because on Codeforces, unordered_map is subjected to hacking. On AtCoder, there is no such concern.My TLE solution on E with map: submissionMy AC solution on E with unordered_map: submissionI ended up replacing the map by vector during contest though.
 » 4 months ago, # |   -8 How to send a solution
 » 4 months ago, # |   0 did i have to know bipartite graphs and segment trees to tackle d,e,f and g?
•  » » 4 months ago, # ^ |   0 No need for e
 » 4 months ago, # |   0 Pls explain why f cannot be solved using map and then lower bound etc
 » 4 months ago, # | ← Rev. 2 →   +5 G need 30 rows, but A117279 only provides 25 rows....
 » 4 months ago, # |   +12 Same :(
 » 4 months ago, # |   0 In task E, can someone explain why picking maximum K elements for each k greedily doesn't work ????
•  » » 4 months ago, # ^ |   +3 Order of the performance numbers matters. It is a penalty when the performance numbers show a downwards trend.
 » 4 months ago, # | ← Rev. 3 →   +3 In G — Many Good Tuple Problems Editorial(English Version)g(n,m):= (the number of simple connected graphs with n vertices and m edges, where each vertex is painted either white or black, and no edge connects vertices with the same color).should beh(n,m):= (the number of simple connected graphs with n vertices and m edges, where each vertex is painted either white or black, and no edge connects vertices with the same color).
•  » » 4 months ago, # ^ |   0 And I think that the calculation formula for $f(n, m)$ should be $f(n,m) = \dfrac{h(n,m)}{2} + \sum\limits_{1 \le i < n}\sum\limits_{0 \le j \le m}\dbinom{n-1}{i-1}\dfrac{h(i, j)}{2}f(n -i, m - j)$
•  » » » 4 months ago, # ^ |   +9 I think you are right cause C(n-1,i-1) are not symmetric about n. Maybe just a typo.
•  » » 2 months ago, # ^ |   0 Also 'b(M,k) equals M! times the Stirling number of the second kind, S(M,k)' should be k! times S(M,k) right?
 » 4 months ago, # |   0 Why wasn't my rating changing!!!
 » 4 months ago, # |   0 can some one point out what is wrong in my code . It's failing on 4 test cases.Your text to link here...
 » 3 months ago, # |   0 E's solution is dp, right guys?
•  » » 3 months ago, # ^ |   0 yes.
 » 3 months ago, # |   0 easier than 325,326,but still cant do D.
 » 3 months ago, # | ← Rev. 3 →   0 HELP, Anyone can explain the F solution? Editorials become somewhat complex to understand. Just explain the part, what you are storing, updating, query..... in the data structure, and why.