atcoder_official's blog

By atcoder_official, history, 11 months ago, In English

We will hold Sky Inc, Programming Contest 2025 (AtCoder Beginner Contest 434).

We are looking forward to your participation!

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

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

Hope I can solve A,B,C,D,E,f.

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

Hope I can solve A,B,C,D,E

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

Hope I can solve A,B,C,(d or e or f or g)

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

How to solve C?

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

$$$D$$$ is too hard for me :(

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

At this point atcoder should add field in bio: which llm model used for cheating

»
10 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

image.png

image.png

Update: those users are now removed

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

    One Indian user accepted A~E in just 3minutes!He's really good at OI(too funny to say that)!

»
10 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

I mean, I understand yall being stressed out, but like...

isn't that a bit too harsh to say...? 💀💀💀💀💀💀

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

how to solve C?it spent me 1.5 hours to solve;But i did not solve it;

»
10 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

E was nice

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

I use Dinic for E, runs fast

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

Atcoder Trivial Contest

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

Did anyone else find E TL to be really tight? Neither Hopcroft-Karp nor Dinic from KACTL pass, and I eventually resorted to using the fastest submission to https://judge.yosupo.jp/problem/bipartitematching.

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

Why do the last few rounds have such significant acceptance rate drop between E and F/G, so the round becomes speedcoder?

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

Because of NOIP (NOI Promax!) in the day, I'm so sad :(

Thanks to this contest, I got a score of ~500th place and I'm happy :)

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

llm can solve G?

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

umm i think @yangrou is greater than us since he's the only one who accepted G

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

Problem C involves a classical idea, which is, we maintain a valid interval [L, R] and keep updating it. Check this one https://codeforces.me/contest/1304/problem/C, and you may find that they are almost the same.

For Problem D, the main idea is two-dimensional (interval-covering and prefix-sum). We first calculate the number of cells that are not covered at all. For the k-th cloud, we can find out the number of cells that have been covered only once, and their sum is just the answer.

For Problem E, my solution is based on greedy algorithm. We keep finding all the positions that can only be reached by some single rabbit, and let it be there, and then remove this rabbit. When we stop, suppose that we have removed m rabbits, and there are t positions which can be reached by at least two rabbits, then the answer is just m+t.

Anyone is welcome to discuss problems, algorithms, or even corner cases, and I would always like to share my idea if that could help little. (If you send me messages, you can use English or Chinese)

»
10 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

SUPERBAD round. It make me rating -45.

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

E wasn't meant to be solved with flows (although it can easily be modeled with flows). The solution is rather nice actually:

  • Each unique position is a node, and each bunny is an edge between the two nodes.
  • Consider each connected component separately.
  • Imagine you try to match the edges with the nodes. Clearly, if for each node in the connected component we can assign one edge (where each edge is matched to at most one node at a time), then of course the answer (for the connected component) is its size.
  • How can we determine whether or not we can match an edge to each node? Well, let's consider a tree: each node (except for the root) has an edge to its parent, so the answer for a tree is its size minus 1. What if it's a functional graph? Then each node has a parent (and therefore a unique parent edge). Well, since we can informally state that each cyclic subgraph contains a functional subgraph, all cyclic subgraphs can match all their nodes!
  • Therefore, since each connected component is either cyclic or a tree, the answer just ends up being the total number of nodes minus the number of connected components that are trees.

So, the solution is just dfs >:)

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

Easy ABCDE, but difficult F and very tough G.

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

Why I wrote a wrong code and Accepted?

As we all know, use brute to make it is $$$O(n\times m)$$$(equals to $$$O(n^2)$$$ in this problem).

I am not well in explain my code in English, so please have a look at my code.Thanks!

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

For F I was trying to solve using the following comparator

[&](string a,string b){
        int p=a.length(),r=b.length();
        for(int i=0;i<p+r;i++){
            if(a[i%p]!=b[i%r]) return a[i%p]<b[i%r];
        }
        return false;
}

the strings being compared are different (editorial comparator compares AB and BA, here the strings compared are AAA.., BBB..), but it seems the above comparator will find the same index where mismatch arises as the editorial comparator.

But I am not being able to prove this mathematically.

»
10 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

In G, I used persistent treaps on a segment tree solution mentioned in the editorial. In addition, I've implemented reference counting, and got TLE: TLE

Then I decided to store more than 1 character in a treap node. I ended up solving it with a pretty over-engineered data structure: a persistent implicit treap over blocks of 76 digits, where each node stores the block as two __uint128_t values plus a precomputed hash modulo 998244353. I spent about 18 hours to optimize it.

AC submission (I am not sure that it will pass after resubmit): AC

In the editorial it’s written that a “clever implementation” of this idea passes within the time limit. I’m wondering what exactly was meant by that “clever implementation”:

If anyone (especially the authors) could share a link to a reference implementation or briefly describe the intended trick, I’d really appreciate it. My current code works, but it feels like overkill

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

    I have published our approach using a persistent BBST: https://atcoder.jp/contests/abc434/submissions/71265543

    The key idea is to read all queries in advance and perform coordinate compression beforehand, then build the segment tree using the compressed coordinates. This reduces the space complexity to O(N). (If you build a persistent tree on the segment tree in the straightforward way, the space complexity becomes O(N log N), which is likely to cause MLE.)