Блог пользователя atcoder_official

Автор atcoder_official, история, 11 месяцев назад, По-английски

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

We are looking forward to your participation!

  • Проголосовать: нравится
  • +29
  • Проголосовать: не нравится

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve C?

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

image.png

image.png

Update: those users are now removed

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

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

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

E was nice

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I use Dinic for E, runs fast

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Atcoder Trivial Contest

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

llm can solve G?

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

SUPERBAD round. It make me rating -45.

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Easy ABCDE, but difficult F and very tough G.

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
»
10 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    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.)