Re: [algogeeks] Re: SPOJ THRBL

2011-06-11 Thread Radhika Renganathan
im sorry .. y wrote: > yea.. now got ac.. :) mistake was k==y is also possible but x got WA .. thank u :) > > On Sat, Jun 11, 2011 at 2:39 PM, keyan karthi > wrote: > >> k=query(x,y-1) >> if(k==x) >> count++ >> with this change ur code ACs :) >> >> >> On Sat, Jun 11, 2011 at 1:24 PM, Radhika Rengan

Re: [algogeeks] Re: SPOJ THRBL

2011-06-11 Thread Radhika Renganathan
yea.. now got ac.. :) mistake was k==y is also possible but xwrote: > k=query(x,y-1) > if(k==x) > count++ > with this change ur code ACs :) > > > On Sat, Jun 11, 2011 at 1:24 PM, Radhika Renganathan < > radi.coo...@gmail.com> wrote: > >> i did the same prob wit range maximum query.. but im repeate

Re: [algogeeks] Re: SPOJ THRBL

2011-06-11 Thread keyan karthi
k=query(x,y-1) if(k==x) count++ with this change ur code ACs :) On Sat, Jun 11, 2011 at 1:24 PM, Radhika Renganathan wrote: > i did the same prob wit range maximum query.. but im repeatedly > getting wrong answer.. im stuck with this prob for a long time.. pls > help.. > > my code: > > #include >

Re: [algogeeks] Re: SPOJ THRBL

2011-06-11 Thread Radhika Renganathan
i did the same prob wit range maximum query.. but im repeatedly getting wrong answer.. im stuck with this prob for a long time.. pls help.. my code: #include using namespace std; #include #include int A[50010]; int M[999]; void initialize(int node, int b, int e) { if (b == e)

[algogeeks] Re: SPOJ THRBL

2011-06-10 Thread KK
Search Topcoder Tutorial Range Minimum Query @ Google... By few intuitive changes u can implement Range Maximum Query as well... -- 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.