Hi. I'm new to segment tree. im solving a problem in which we have to find
most frequent element in given range
so for the below testcase im trying to constructing tree but i stuck.
-1 -1 1 1 1 1 3 8 8 8
[i,j] is range of segment and x is the element that occur frequently and y
is the count of
hii friend..
its my first segment tree problem.but i get WA in 10 test case..all the
test case that i try i got correct answer..can any one find bug in program
and correct me plz
problem http://www.spoj.pl/problems/GSS1/
algo-- i use segment tree
My solution..
#include
#include
using namespace s
this link deal with applying lazy propagation for the problem LITE in spoj.
hope this one help you
http://apps.topcoder.com/forums/?module=Thread&threadID=690098&messageID=1298729&mc=8&view=tree#1298729
regards
arun
On Sat, Jan 21, 2012 at 6:10 PM, UTKARSH SRIVASTAV
wrote:
> Hi can anyone please
Hi can anyone please give a good link to study lazy propagation in segment
tree with example or code. I know segment tree but not about lazy
propagation.
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this message because you are subscribed to the Google Groups
"
nice link:: @shady
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visi
http://tinyurl.com/6gqun4u
On Tue, Sep 27, 2011 at 2:32 PM, Aamir Khan wrote:
>
>
> On Tue, Sep 27, 2011 at 1:27 PM, sunny agrawal wrote:
>
>> implement segment tree with lazy propagation :)
>>
>
> What do you mean by lazy propagation ?
>
> --
>> Sunny Aggrawal
>> B.Tech. V year,CSI
>> Indian In
On Tue, Sep 27, 2011 at 1:27 PM, sunny agrawal wrote:
> implement segment tree with lazy propagation :)
>
What do you mean by lazy propagation ?
--
> Sunny Aggrawal
> B.Tech. V year,CSI
> Indian Institute Of Technology,Roorkee
>
> --
> You received this message because you are subscribed to th
The code is already optimized...
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more
implement segment tree with lazy propagation :)
On Tue, Sep 27, 2011 at 1:19 PM, Aamir Khan wrote:
> I am trying to solve http://www.spoj.pl/problems/LITE/ using segment tree.
> Here's the code but i am getting TLE. Can somebody help me to optimize the
> code ?
>
> #include
> #include
>
> struct
I am trying to solve http://www.spoj.pl/problems/LITE/ using segment tree.
Here's the code but i am getting TLE. Can somebody help me to optimize the
code ?
#include
#include
struct node{
int l;
int r;
bool el ;
node *left;
node *right;
};
struct node *build(int l, int r) {
str
hi,
i attempted the problem http://www.spoj.pl/problems/GSS1/
i have the solved the problem using segment trees.i have the checked my
solution for the most of the cases it is working fine.but i am getting
WA...plz tell any case where my code fails !!.please point out the
bug if a
-- Forwarded message --
From: geek forgeek
Date: Mon, Jul 4, 2011 at 2:58 PM
Subject: segment tree
To: algog...@googlegroups.com
can any1 plz tell some gud tutorial for segment tree?
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks"
12 matches
Mail list logo