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

Автор send_nodes, история, 9 лет назад, По-английски

I'm curious to know what all of you keep in your coding library to make your coding faster. I'm keeping a geometry library storing basic computational geometry tools(dot, cross, intersect, distance to line, centroid, area, etc.) and a graph theory library having max flow and flood fill.

I ask because I want to know how much is necessary to perform well in contests.

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

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

I think it's not about keeping much code to faster coding. Mainly it's about quick thinking and experience. Extra code is just way to fast coding. But what's the use of extra code if you don't know what you're gonna coding or if your code will contain bugs?
Plus in the onsite contests you need to coding all by yourself.

My main thought is you don't need extra code to perform well. All you need is experience.

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Right, you need to know the algorithms before you apply them. But there are lots of algorithms that are hard to replicate in a contest flawlessly (mincost maxflow comes to mind). So after understanding these algorithms, I think it would be beneficial to have them pre-written so you wouldn't have to waste time writing and debugging them.

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится -11 Проголосовать: не нравится

      As I said this not allowed on onsite contests.
      And little unsporting on offsite contests.

»
9 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Nothing.

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I've got nothing. I always tell myself I should write some algorithms/structrues that take time (max-flow-min-cost, suffix/palindromic trees, etc) but I'm too lazy to do it.

»
9 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Actually I have some things in library. What I've used largest number of times are definitely geometry, Dinic and Newton's symbol (however the last one can be in most cases written very quickly). However I also have there few more complicated algorithms which I've never used or did it one time at most like centroid decomposition, heavy-light decomposition. And few classical ones like exgcd, Euler's circuit, Chinese Remainder Theorem, exponentiating matrices, FFT.

But it is not that often case that I use something from there in individual contests, I think maybe once in 5-10 contests. On OpenCups it happened much more often, I was pasting my geo library almost everyday :P.

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I keep this: algos :D

Though about only 20% are often copied from there.