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

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

We will hold AtCoder Regular Contest 222.

We are looking forward to your participation!

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

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

Is this not ARC--? I always assumed ARC++ is explicitly mentioned, so this would be the ARC-- edition.

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

The Problem A of this ARC contest is only worth 300 points and Problem F is just 700 points. Would it be more appropriate to classify this contest as an ARC--?

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

Dear Atcoder Official, can you show the code the previous winner atgc(banned) submitted for each problem? 'atgc' is a strong and famous Chinese Informatics competitor. I am wondering if he was banned by mistake.

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

can someone share the code for the problem B please with explanation if possible ?

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

Is this simple solution of E intended?

We add values to a set $$$S$$$ in descending order of occurrences on the input. For each new value $$$a$$$, we multiply its number of occurrences by $$$\sum_{i \in S} 10^{a \oplus i}$$$ and add it to the answer.

Brute force would be $$$O(4^N)$$$, so we use a meet-in-the-middle approach. Let's denote the lower and upper $$$M/2$$$ bits by subscripts $$$\cdot_{lo}$$$ and $$$\cdot_{hi}$$$ respectively. We store the sums $$$\sum_{i \in S} 10^{a_{lo} \oplus i_{lo}}$$$ for each possible combination of $$$a_{lo}$$$ and $$$i_{hi}$$$. Inserting $$$i$$$ into $$$S$$$ requires only updating those values for fixed $$$i_{hi}$$$. A query requires looking up only values for fixed $$$a_{hi}$$$; we multiply them by $$$10^{a_{hi} \oplus i_{hi}}$$$ since $$$a \oplus i = a_{hi} \oplus i_{hi} + a_{lo} \oplus i_{lo}$$$. Complexity: $$$O(2^{3M/2})$$$ time, $$$O(2^M)$$$ memory.

We can also use the fact that $$$N \ll 2^M$$$ and stop when the number of occurrences of the currently processed value reaches $$$0$$$, bringing the complexity down to $$$O(N 2^{M/2})$$$.