We will hold KAJIMA CORPORATION CONTEST 2025 (AtCoder Beginner Contest 394).
- Contest URL: https://atcoder.jp/contests/abc394
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250222T2100&p1=248
- Duration: 100 minutes
- Writer: math957963, cn449
- Tester: sotanishy, toam
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-500-600
We are looking forward to your participation!
If this ABC as shit as the last ABC, I will ban you.
lol
Although you are not the true system user, I still upvote your comment.
I really hope this will come true.
As shit as before
it seems blogs of ABC get less and less upvotes even get downvotes.
upd: this round is worse than last one again.
Wish no more AI Best Contest plz.
painful
Why ABC G. is so hard?
Its not.
Problem E is very similar to [POI 2009] Bytie-boy's Walk.
In POI, it shows us that E can be solved with time complexity $$$O(n^2V+nm)$$$. ($$$V=26$$$, $$$m$$$ is the number of edges).
Why this gives TLE for E in 2 test cases ?
How to solve E?
man how i do the c better than this ? Sorry my english is bad :(
iterate from right to left if WA is found replace it with AC
I don't know if problems like A and B should be even in a beginner contest! Atcoder became more reliant on speed more than anything else. Problem E was pain ngl
Anyone could please provide a testcase for my submissión for problem D? I failed just two cases :')
My submission
Thanks in advance
It's just a simple stack problem!
Ahh my eyes ;-;
Maybe you need a better solution.
after contest i tried with o3-mini it solves E in one shot after giving my intuition. my TLE code : https://atcoder.jp/contests/abc394/submissions/63054891 o3-mini code: https://atcoder.jp/contests/abc394/submissions/63064525
today's problem set was nice but D was way more easier than C for me
Disagree!! C was the easiest one.
I'm surprised to see the o3-mini code passing the time limit. The complexity is $$$O(n^4)$$$ and it takes 8s on a max test.
Why is this wrong for F Alkane?
... ~~~~~
ll bfs(int start, vector<vector> &adj, vector &visited) { queue q; q.push(start); visited[start] = true; ll component_size = 0;
}
void solve() { ll n; cin >> n; vector<vector> adj(n + 1);
}
int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
} ~~~~~
I had the same idea and i can't figure out what's wrong either...
This is wrong because you can take the nodes which have degree > 4 in the original graph to be the part of the subgraph. You just need to ensure that in the subgraph the degree is exactly 4.
E.g. case:
Here in the original graph, the degree of node 1 is 5, your solution will ignore the node 1. But you can take nodes 1, 2, 3, 4, 5 and create an alkane out of them.
OH Yes you are right , i mistakenly thought that given inputs are having degree of any node at max 4
The problems in ABC contests are becoming increasingly easier, making rankings largely dependent on the speed of coding.
e.g. slower 10 min will get nearly 1000 rank down
Me,too. Why is this wrong for F Alkane?
I use Tree dp and classification discussion,but WA;
Who can give me a sample ,or find my mistake.
Thanks!
For Problem F: My code is working on 1-39 testcases, and WA on 40-59, please find error...
Problems suddenly got considerably hard starting from E. I breezed through A~D in 20 minutes, and spent 60 minutes to solve E.
This is just the serious problem in ABC.
For coders can only solve A~D, they should code very fast to get good ranks.
How to solve G? I figured that the optimal route will pass through a floor f such that when considering only buildings with heights >=
f
, the source and destination would belong to same connected component.To find this value of
f
for each query, I thought I could do a binary search but then maintaining the UnionFind structure would takeO(N)
per query, which is too slow. Another approach I thought of was to solve offline by adding each building one-by-one in decreasing order but then needing to check allQ
queries after each addition is again too slow.consider small to large
You can construct a minimum spanning tree and then use binary lifting to find the minimal edge weight on the path between nodes.
I suppose the edge weights when constructing MST are simply the heights of building in each cell? Then I have a follow-up question:
Let's say that there are two nodes A and B and minimum wt edge on the path A->B in MST is X. How do I know that there is not another path (not covered by the MST) that contains Y (>X) and also connect A and B? It's possible that going from source to dest using this Y edge would be cheaper, isn't it?
You are correct about the edge weight being the building height. As for the second part, I incorrectly wrote minimum spanning tree when it should have been maximum spanning tree. Sorry for the confusion
In ABC394 I played this match in the same room as CHI_LI I went to the toilet after making the E question He stole my code and made almost no changes Don't ban me I'm also a victim
My AtCoder's name is Huang_Barry.I'm Chinese,My English ability is not good.
I am CHI_li, I surrender myself and I admit to what 'HuangBarry' said. I am very sorry for this. Because I was on a whim, I shouldn't have plagiarized. After he came back and found out that I had plagiarized, he told me the rules, which would result in my account being banned. I was afraid that my teacher would..., I promise that I will never violate the rules in the future.
I implore the authorities not to block my account.
I made the biggest mistake of my life, and I'm really scared.Really, I've never been so scared before.
(I am also Chinese, and my English is not very good)
G is not good. Extremely straightforward idea, but pain in the ass to implement, not what I expect from atcoder contests. Rest of the problems were alright tbh.
Is there some easier to understand solution for E compared to the editorial ?
Great contest. Could not solve E and F. Didn't even tried G but had fun. Problems are good. Thank you AtCoder team.
Hi can anyone tell me what is wrong in my F submission
I am trying to only consider the nodes whose degree>=4 and for these trees trying to calculate the number of nodes i can pick up so that all the nodes have degree <=4
https://atcoder.jp/contests/abc394/submissions/63070024
Can someone from the future tell me how to solve E and F
For E, the key idea is that if you have found the smallest palindromic path from
i
toj
, then we will try to expand it on both sides and solve for other pairs. So, we can look for another pair(k, l)
such thatk
connects toi
andj
connects tol
using the same letter and now we have a path of 2 extra characters. We do this in increasing order of length of the found path and construct the answer using BFS.For F, we do a dp on tree. A node in Alkane can either have a parent and then 3 children or be root and have 4 children or be a leaf. For each node, we compute two things: 1. Largest subtree such that this is the root, i.e. has 4 children. ->
most4[node]
2. Largest subtree where cur node is a child (can either supply 1 node acting as leaf or a subtree where cur node has 3 children) ->most3[node]
Both of these are pretty simple to compute using dfs.