You are not logged in. Please login at www.codechef.com to post your questions!

×

marblegef DOUBT..

i did this problem http://www.codechef.com/problems/MARBLEGF using segmented tree concept..but i am getting tle...editorial say to use fenwick tree concept......But i came to know both fenwick tree and segmented tree have same time complexity in worst case which is O(mlogn)....anyone clear my doubt plsss.....thanks in advance:)

this is my code which uses the concept of segment tree http://www.codechef.com/viewsolution/3436231

asked 17 Feb '14, 16:33

chaseme's gravatar image

1★chaseme
62692443
accept rate: 0%

edited 17 Feb '14, 20:12


I read somewhere that the constant factor in complexity calculation of segment tree is more than BIT. So for extremely steep time limit, BIT is effective.

link

answered 18 Feb '14, 20:40

dragonemperor's gravatar image

3★dragonemperor
89321134
accept rate: 10%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×3,673
×699
×533
×302
×13
×1

question asked: 17 Feb '14, 16:33

question was seen: 741 times

last updated: 18 Feb '14, 20:40