Various algorithms implemented on the AtCoder side

AtCoder Library Practice Contest

  • Commentary AC’d all the way through the practice contest.

Anyway, I checked and about 1/3 to 1/2 of it was already implemented. I’ll put it in the same directory structure as the ACLs and license it under the MIT license later. The rest of the unimplemented ones will be implemented as soon as possible, since the officials say “this is a frequently used algorithm”.

I’d like to see a Python implementation of the AtCoder Library, which is already full of ordinary algorithms (≈ just take it from yosupo judge or AOJ), and make it faster by using numpy/scipy/networkx or cython or something like that. I’d like to see something like this src

  • I’m thinking that the All Submit time order ranking in the Practice Contest will be the place to compete for library speed.
  • I used to be into speeding things up with Numba and Cython, but recently I’ve come full circle and am interested in speeding things up with PyPy without sacrificing flexibility.

Contents - Fennic tree - A tree structure (also called a Binary Indexed Tree) that can efficiently both compute partial sums and update elements - B: 600ms PyPy provisional first place - segment tree J - Segment Tree [454 ms https://atcoder.jp/contests/practice2/ submissions/16567936]PyPy Tentative #1 K - Range Affine Range Sum - The tree can be O(logN) summed or minimized when a fixed number of elements are updated by random access. - Delayed propagation segment tree L - Lazy Segment Tree

You can practice here.


This page is auto-translated from [/nishio/AtCoder Library](https://scrapbox.io/nishio/AtCoder Library) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.