CalisthenicsMan's blog

By CalisthenicsMan, 3 years ago, In English

Hey guys/girls/*,

I've made some simple memes about segment trees using imgflip templates. I need your help to create some more original ones, maybe based on your personal experiences at competitions, craziest problems involving segtree, famous people from CF using segtree etc.!     Maybe your's will be more fun

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

| Write comment?
»
3 years ago, # |
  Vote: I like it +42 Vote: I do not like it

Who uses segtree when able to use fenwick???

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Although segment tree is able to solve more problems, but as far as I know, Fenwick Tree is easier to code, and also has a smaller constant factor.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +45 Vote: I do not like it

    Who uses fenwick when able to use segtree???

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      Me.

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it +31 Vote: I do not like it

      You???

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it +8 Vote: I do not like it

        I said: "when able to use segtree". Here I wasn't sure segtree won't TLE, so it doesn't fall into that category.

»
3 years ago, # |
  Vote: I like it +6 Vote: I do not like it

However I think BIT is much easier to code, though harder to understand. But when you can use BIT, you'll never want to code a Segtree. In my opinion, Sometimes Segtree costs more than BIT on constant time, and even a $$$O(n\log^2 n)$$$ BIT runs faster than $$$O(n\log n)$$$ Segtree.

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I am using segtree instead of whatever in mlogn dijkstra

»
3 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Well i use both but when it's comes to implementing fast i go with fenwick tree.

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

based

»
3 years ago, # |
  Vote: I like it +10 Vote: I do not like it

I just feel uncomfortable when I use segtree in the problem, where I could use fenwick.

»
3 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I have never used a fenwick tree, I always use the atcoder's segment tree https://atcoder.github.io/ac-library/production/document_en/segtree.html

»
3 years ago, # |
  Vote: I like it +12 Vote: I do not like it

Overkill with segtree <3

  • »
    »
    3 years ago, # ^ |
    Rev. 2   Vote: I like it +11 Vote: I do not like it

    Oh god, I still remember I superoverkilled a 1200 rated problem once with segtree and lowerbounds lol. As a fact, I was so happy when I solved that problem after a cancer code only to realize it was 2 liner. I had a great mixture of laugh and cry that day :p

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I still remember when some retards implememted dinic to an 800 problem so now there in an *800 problem with flow tag

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I have seen similar things, do you have the link to that problem, so I can test my Edmonds-Karp? :)

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      ... been there

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Anybody else calls their booleans bool k? (dont downvote if you dont get the joke pleeeeeease)

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Before becoming green, should I learn segment tree?!