FailedBrat's blog

By FailedBrat, history, 12 months ago, In English

Could anyone give a link, to repository which has best snippets in terms of efficiency and are easy to read. Snippets which are more general are appreciable (like multipurpose segtree).

Thanks!

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

»
12 months ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it
»
12 months ago, # |
  Vote: I like it +8 Vote: I do not like it
»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

If you want efficiency (and not readability): sort the submissions on yosupo's judge based on time. Be warned that sometimes the codes are beyond human level. Example: 1e6 size convolution in 80 ms: 11511.

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

    I don't think so where you need to convolute polynomials of size greater than 1e6, it is the intended solution.

    • »
      »
      »
      12 months ago, # ^ |
        Vote: I like it -6 Vote: I do not like it

      No it's never intended solution (manual vectorization). Did you even read/open the code?

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

        Yes, I saw it, I just mean you don't need so much optimization in intended solutions :)

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

I hope this can help!

»
12 months ago, # |
Rev. 3   Vote: I like it +8 Vote: I do not like it

Many Japanese contestants share their (huge) snippets on GitHub. Here are some examples

https://shino16.github.io/cplib/ (this is mine)

(Search GitHub for contestants' account and you'll find repositories with lots of snippets)

Some are licensed, so please check it before you use it.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I saw the libraries of these contestants but i found that there are libraries which are much more optimized than their's. Does this mean that i should make code snippets of solutions of online judge.

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I use the AtCoder library