CalisthenicsMan's blog

By CalisthenicsMan, 2 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?
»
2 years ago, # |
  Vote: I like it +42 Vote: I do not like it

Who uses segtree when able to use fenwick???

  • »
    »
    2 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.

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

      I only know how to code segtrees I do not know anything about fenwick trees

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

        Says candidate master...

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

          i'm candidate and i can't code either a segment tree nor a fenwick tree if my life depended on it.

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

            Thats the difference, I shouldn't have memorized the code

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

          I never learned Fenwick tree either.

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

        You don't actually need segment trees to be specialist you know...

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

      Well yeah, but segment tree is just the best data structure in the world

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

    Who uses fenwick when able to use segtree???

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

      Me.

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

      You???

      • »
        »
        »
        »
        2 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.

»
2 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.

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

I am using segtree instead of whatever in mlogn dijkstra

»
2 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.

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

based

»
2 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.

»
2 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

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

Overkill with segtree <3

  • »
    »
    2 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

    • »
      »
      »
      2 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

      • »
        »
        »
        »
        2 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? :)

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

      ... been there

»
2 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)

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

Before becoming green, should I learn segment tree?!