thanx :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/iy_uho_bmMYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from
an idea of the approach would be enough.. plz help..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/3H3O2K4KBBMJ.
To post to this group, send email
it also ran successfully on ideone.com
plz help me
i am classifying the card in two parts:
one with same suit
and other with different suit...
plz let me know if futher explanation is needed abt the code
help me regarding this..
thanx
--
You received this message because you are subscribed
Your code fails on one of the test cases like 5H 6H 7H 8H 9H.
it should give straight flush instead of flush, Think of all such
cases are change accordingly ..
On Mon, Jun 18, 2012 at 10:01 PM, Mayank Singh
singh13490may...@gmail.com wrote:
it also ran successfully on ideone.com
plz help me
i
will be better if you post on spoj forums.!!
On Wednesday, 13 June 2012 01:40:36 UTC+5:30, gaurav yadav wrote:
plz nyone explain how to approach this problem..
http://www.spoj.pl/problems/XORROUND/
--
You received this message because you are subscribed to the Google Groups
Algorithm
No this is fair enough.It directly involves algorithm.
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Thu, Jun 14, 2012 at 4:28 AM, shiv narayan narayan.shiv...@gmail.comwrote:
will be better if you post on spoj forums.!!
On Wednesday, 13 June 2012
@ saurabh singh :
what algorithm can be used ??
coz.. i did it by simple observation.
1) just take any sequence of numbers.
2) write it's first 5-6 xor round's.
3) now luk for some pattern.
u'll get the answer : )
On Wed, Jun 13, 2012 at 9:46 PM, saurabh singh saurab...@gmail.com
@lucifer
nice approach for calculating median.. thanks for the help
--
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
O(n) approach for finding the height of the stacks..
-
First take 2 arrays A[n] and B[n],
where A keeps track of the no. of times a start index(the start query
index) occurs.
and B keeps track of the no. of times a end index(the end query index)
yeah the results are correct for the given inputs
On Feb 16, 1:03 am, atul anand atul.87fri...@gmail.com wrote:
if i have understood the problem correctly...
you please confirm the answers i am getting for the given inputs:-
result
1) 1 2 3 4 5 4
2) 1 2 3
@atul by doing through link list it will give TLEu have to derive some
kind of formula .. and till now i am unable to find that
kartik.sac...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
@Utkarsh: yeah it is josephsus problem with a slight change.using
a linked list will give u TLE i guess.
On Feb 14, 10:36 pm, vickywiz vickywiz...@gmail.com wrote:
in 1 2 3 4 5 6...o/p ll b 5
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
yeah..we need to calculate some formula
On Wed, Feb 15, 2012 at 10:21 PM, pavan pavankri...@gmail.com wrote:
@Utkarsh: yeah it is josephsus problem with a slight change.using
a linked list will give u TLE i guess.
On Feb 14, 10:36 pm, vickywiz vickywiz...@gmail.com wrote:
in 1 2 3 4 5
@trinity tell the link of problem ?
*Thanks
Shashank Mani Narayan
Computer Science Engineering
Birla Institute of Technology,Mesra
** Founder Cracking The Code Lab http://shashank7s.blogspot.com/*
--
You received this message because you are subscribed to the Google Groups
Algorithm
http://www.spoj.pl/problems/ABCPATH/
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Sun, Feb 5, 2012 at 11:18 PM, WgpShashank shashank7andr...@gmail.comwrote:
@trinity tell the link of problem ?
*Thanks
Shashank Mani Narayan
Computer Science
Try wid BFS.. thats the only alternative i can think off!! I got acc
wid that!!
On Dec 6, 12:29 pm, varma C.S.P verma@gmail.com wrote:
I am getting a lot of tle's for this problem.
https://www.spoj.pl/problems/BUGLIFE/
Here is my code
#includeiostream
#includecstdio
#includecstring
hey ,i got the bug and got AC ALSO..there was
several bugs ...sry ,for silly dbt
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
don't bother got AC was doing lot of extra overhead
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99
On Fri, Nov
finally got AC,(using bfs)
thanx DON for provide such nice test case
*Anshul Agarwal
Nit Allahabad
Computer Science**
*
On Wed, Nov 16, 2011 at 8:14 PM, SAMMM somnath.nit...@gmail.com wrote:
U need to check for the case when (s==g) source and destination are
same , I got stuck here , after
hi don i have now implemented it with bfs but it's still giving wrong
answer can you please tell the test case
#includestdio.h
int a[1000100][2];
int visited[1000100],i,q[1000100];
int main()
{
int f,s,g,u,d;
scanf(%d%d%d%d%d,f,s,g,u,d);
for( i = 1 ; i = f;i++)
{
if(i + u
thanx Don.
i think my logic is not so good . now i try to make it using bfs .
*Anshul Agarwal
Nit Allahabad
Computer Science**
*
On Tue, Nov 15, 2011 at 5:36 PM, Don dondod...@gmail.com wrote:
This input
100 1 5 5 91
Should output 20. Yours says Take the stairs.
100 1 5 5 89
Should
hi don please tell me where am i wrong in this maths in solving this
question.
let x = number of times to press up button
let y = number of times to press down button
k = g -s
so we have
u*x - d*y = k ---(1)
we have to minimize x + y
so from (1) x = (k+d*y)/u;
x +
I don't think that your solution assures that the elevator stays in
its bounds.
Don
On Nov 15, 12:49 pm, UTKARSH SRIVASTAV usrivastav...@gmail.com
wrote:
hi don please tell me where am i wrong in this maths in solving this
question.
let x = number of times to press up button
let y =
This input
100 1 5 5 91
Should output 20. Yours says Take the stairs.
100 1 5 5 89
Should output 76. Yours says Take the stairs.
Don
On Nov 14, 8:27 am, Anshul AGARWAL anshul.agarwa...@gmail.com wrote:
problem ishttp://www.spoj.pl/problems/ELEVTRBL/
and my solution is give wrong answer on
I solved this one with a breadth-first search.
Don
On Nov 14, 8:27 am, Anshul AGARWAL anshul.agarwa...@gmail.com wrote:
problem ishttp://www.spoj.pl/problems/ELEVTRBL/
and my solution is give wrong answer on spoj . Plz help me to find in which
case my solution give wrong answer.
*
thanks man i got it .. :)
On Fri, Sep 30, 2011 at 12:17 AM, Don dondod...@gmail.com wrote:
I think that it will fail if the value of the coins can be more than
50001.
Don
On Sep 29, 12:35 pm, manish patel manispatel...@gmail.com wrote:
http://www.spoj.pl/problems/PIGBANK/
please
I think that it will fail if the value of the coins can be more than
50001.
Don
On Sep 29, 12:35 pm, manish patel manispatel...@gmail.com wrote:
http://www.spoj.pl/problems/PIGBANK/
please suggest some test case where it fails ...
[code]
#includestdio.h
main()
{ int t=0,n,e,f,i,j;
@Amrit: You only have 2 and 3 litre jars. You are trying to get 4
litres into one of them. There is no 4 litre jar, nor any other vessel
into which you can capture the 4 litres.
Dave
On Sep 17, 6:15 am, amrit harry dabbcomput...@gmail.com wrote:
http://www.spoj.pl/problems/POUR1/
hw the 2nd
@dave +1
On Sat, Sep 17, 2011 at 8:10 PM, Dave dave_and_da...@juno.com wrote:
@Amrit: You only have 2 and 3 litre jars. You are trying to get 4
litres into one of them. There is no 4 litre jar, nor any other vessel
into which you can capture the 4 litres.
Dave
On Sep 17, 6:15 am, amrit
I/P
30
105
1055
0
O/P
0
1
1
your code gives
1
1
1
(Copied from comments below the statement on Spoj )
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
THANKs amol piyush i got my mistake
--
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
koyi to test cases de jisme mera code fail kare?
--
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
You can check your answers on my AC code::
import java.io.*;
import java.util.*;
public class Main
{
public static void main(String args[])throws Exception
{
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
StringBuffer out=new StringBuffer();
thanks piyush for replying but i don't have complier for java and i don't
know even java
--
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
There is nothing much particular to java,,
Here is the code(simply copy pasted from the above one) in C::
int main(){
char ar[100];
int dp[1000];
scanf(%s,ar);
if(ar[l-1]!='0')
dp[l-1]=1;
for(int j=l-2;j=0;j--)
1st one
H-2^1+1
HTHT-2^4+4
TTHTHTHTHTHHTHTHTHTTHTHTT(33) - 2^33+6(why)?
do you see any connection?
On Aug 24, 6:55 am, keyankarthi keyankarthi1...@gmail.com wrote:
http://www.spoj.pl/problems/MAIN8_D/
i tried solving this problem
any ideas...??
for second test case 'htht'
the
@keyan karthi
Can you explain a bit on how to use the markov chain to get the answer...
On Wed, Aug 24, 2011 at 11:42 PM, him himanshuarora.1...@gmail.com wrote:
1st one
H-2^1+1
HTHT-2^4+4
TTHTHTHTHTHHTHTHTHTTHTHTT(33) - 2^33+6(why)?
do you see any connection?
On Aug 24, 6:55 am,
hey! the solution can be found by summation from 1 to n + n
--
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
any body tell the test cases??
--
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
3
eee
cjpvbhntzgm
aeiouaeiouae
vfghjklwerf
eouaeioicou
On Wed, Aug 10, 2011 at 12:06 PM, kartik sachan kartik.sac...@gmail.comwrote:
any body tell the test cases??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
inp:
3
eee
vfghjklwerf
out:
cjpvbhntzgm
aeiouaeiouae
eouaeioicou
On Wed, Aug 10, 2011 at 12:40 PM, Nitin Nizhawan
nitin.nizha...@gmail.comwrote:
3
eee
cjpvbhntzgm
aeiouaeiouae
vfghjklwerf
eouaeioicou
On Wed, Aug 10, 2011 at 12:06 PM, kartik
thanks nitin got AC...:) silliy mistake
--
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
@amol
I got accepted using the similar approach. But i performed
backtracking. In each step of backtracking i chose the next option as
you done. So, there can be cases where this approach fails.
Runtime error may occur because,
Use lazy propagation.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/3YMdS5bKx_sJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
can u explain or some useful link ??
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Mon, Aug 1, 2011 at 10:16 PM, Rohan Kalra ronziiretu...@gmail.comwrote:
Use lazy propagation.
--
You received this message because you are subscribed to the Google
@shady: if ur not interested dont post ur comment, but let others do
it..
@viswamath: WA
--
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
@piyush:
even if r = di and c = dj then whats the prob??
--
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
First Thing is that i will support Shady's point.
Please Post the question and the idea u r trying to solve the
questionnot the complete Code so that algorithm can be discussed here
and then u can identify your mistake.
because this happens most of the time when someone posts code,
thanks sunny.
KK this is not your playground. People from all over the world are in this
group. These are the people who have left companies like MS because of their
love for algorithms discuss ideas. Only way you learn debugging is by
practice. Once it took me 5 continuous hours to debug one
I request you all to concentrate on algorithms and not the bits of coding.
When your code is giving WA on any judge then please first state your
algorithm. Take feedback from fellow users. If it is wrong then try
debugging it your self, corner cases, and even after spending 3-4 days if
you are
any spojjer in the group ? if you want i can post my solution with
djikstra's :P ?
Shady
On Sat, Jul 2, 2011 at 10:31 AM, shady sinv...@gmail.com wrote:
Hi,
I am solving this http://www.spoj.pl/problems/DP/ problem using Djikstra's
algorithm. What is the dynamic programming solution to this
@thanks ceg sirfinally got acceptedur test
case worked..silly mistake...= error
--
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.
its ok :) but i'm not sir n all.. i'm a student :P
--
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
@kartik sachan:
I just compared your output file with the output file
for this test case
5 1 2 3 4 5
19 ab ab 100 50
20 20 20 75 75
10 0 ab 88 0
13 12 15.5 88 99
12 7 9 66 66
11 ab ab 99 100
your code outputs FAILED, 4.35 but actually he's PASSED, 7.20
I think you are assuming he's fail if he
@vaibhav :acc. to u Its giving 9 for BGBBGGGBBBGBGB bt it should be 8
how?
my code:
#includestdio.h
int main()
{
int t;
scanf(%d,t);
while(t--)
{
int i=0,s=0,count=0,c=0,flag=1;
char a[15],ch;
scanf(%s,a);
while(a[i]!='\0')
{
hey how r u dealing with absent cases.
for each case u r directly converting string to float
but for absent u will call atof() for ab and compare it.
On Wed, Jun 29, 2011 at 11:02 PM, kartik sachan kartik.sac...@gmail.comwrote:
any one plzz reply
--
You received this message
@sunny atof(ab) is giving me as zero.so it will not affect
the calculation i think so...
--
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
GOT AC IN .02 SEC .:)))
--
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
@VAIBHAV.ur logic fails in many
cases...like G
--
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
@kartik well i hv written before trailing G's can be left in calculation
so it works fr GG.
On 6/28/11, kartik sachan kartik.sac...@gmail.com wrote:
@VAIBHAV.ur logic fails in many
cases...like G
--
You received this
@Kartik
Please tell me what logic you're following.
@varun
This strategy failed. I tried submitting.
GBGBBGGBBBGGBBBGBGGBGGBGBGG
101001100011000101101101011
You can try the above case.
--
You received this message because you are subscribed to the Google Groups
Algorithm
anonymous u have to play with the index no of either G or
B...and see how many shift it will require to reach it original
postion then max will be the ans..
well GBGBBB
if we start from right to left then G=3 and G=5
first G have reach to 0 pos and second G have to reach
@kartik the sequence 101001100011000101101101011 can be done
in 25 iterations
whts urs?
On 6/28/11, kartik sachan kartik.sac...@gmail.com wrote:
anonymous u have to play with the index no of either G or
B...and see how many shift it will require to reach it original
postion
@kartik it's wrng got it
On 6/28/11, vaibhav agarwal vibhu.bitspil...@gmail.com wrote:
@kartik the sequence 101001100011000101101101011 can be done
in 25 iterations
whts urs?
On 6/28/11, kartik sachan kartik.sac...@gmail.com wrote:
anonymous u have to play with the index no of
@ vaibhav i have submitted my concept in spoj and it got AC in .02 sec
i am saying for u have to play with index of EITHER of G or B
now u have to think logic by taking two or more exmaple and shift it
in...do it in paperu will see some pattern
--
You received this message
Well can anyone pls re post the problem?
On Tue, Jun 28, 2011 at 3:20 PM, kartik sachan kartik.sac...@gmail.comwrote:
@ vaibhav i have submitted my concept in spoj and it got AC in .02 sec
i am saying for u have to play with index of EITHER of G or B
now u have to think logic by taking two
http://www.spoj.pl/problems/SHLIGHTS/
this is the link
--
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
@vaibhav agarwal: case 3 of urs gives ans 6 according to ur algo, but
the correct ans is 5
also the following test case also gives wrong ans with ur algo :
GBBGBBBB
Ur algo give - 9
Correct ans-- 7
--
You received this message because you are subscribed to the Google
if u want code then mail me.
--
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.
Can one of you provide some hints in solving this problem ?
On Sat, Jun 25, 2011 at 3:34 PM, kartik sachan kartik.sac...@gmail.comwrote:
@jitendra that's what i am asking forwhat algo i should
implement to get process in 1 sec?
--
You received this message because you are
hint is : go for counting ,not for shifting o(n). :P
On Mon, Jun 27, 2011 at 9:29 PM, pacific :-) pacific4...@gmail.com wrote:
Can one of you provide some hints in solving this problem ?
On Sat, Jun 25, 2011 at 3:34 PM, kartik sachan kartik.sac...@gmail.comwrote:
@jitendra that's what
consider G as 1, B as 0
so actually its series of 1 and 0's
now consider any sequence GBGBBGGGBG will be represented as
1010011101
objective is to push all 1's at the right end.
all '10' pairs need to be swapped at the same time.
considering this take for ex 101
the number of swaps is equal to
HEY DUDE I AM NOT GETTING UR LOGIC AT ALL I THINK HOW U WILL SATISFY THIS
CASE GBGBBB
--
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
@kartik
yup frgt to mention the last case 1 followed by zero's in that case number
of iterations is the no. of trailing zeroes.
GBGBBB
will have four iterations
101000 = 1(one zero b/w two ones) + 3(last 1 followed by 3 zero's)
BGBGBB,BBGBGB,BBBGBG,GG
well logic is how hw mny jump of 1's u
@kartik also consider the case of GB the answer is 1 BG. ie
trailing G's left.
BGB leading B's left hence only one G followed by B therefore only one
iteration.
try out some cases u will find hw it wrks.
On Tue, Jun 28, 2011 at 12:42 AM, vaibhav agarwal
vibhu.bitspil...@gmail.com
@jitendra that's what i am asking forwhat algo i should
implement to get process in 1 sec?
--
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
Hello,
Were you able to figure out the solution?
On Jun 23, 3:33 pm, Jitendra singh jsinghrath...@gmail.com wrote:
@ kartik sachan
Problem with this code is this-
All GB pairs should be process in one time period
On 6/23/11, kartik sachan kartik.sac...@gmail.com wrote:
QUESTION LINK
@saurabh : The answer suggested by you is for not all together...
--
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
what will be the dynamic programming solution to the above problem ? can
anyone explain the states of the dp ?
On Mon, Jun 20, 2011 at 6:53 PM, oppilas . jatka.oppimi...@gmail.comwrote:
I think you have not read the question carefully. Please read it again and
try to ans for small values of
dp(int chair,int person,bool previous)
if(previous)
dp(chair-1,person,0)
else
dp(chair-1,person-1,1)+dp(chair-1,person,0)
with basic conditions as it is a circle.. if person is placed in first
chair u cant place a person in last chair
On Tue, Jun 21, 2011 at 7:38 PM,
@Saurabh
Your formula is incorrect.
for input : 5 2
the answer should be 5 but your program gives 12 as output.
On Jun 19, 11:35 pm, abc abc may.i.answ...@gmail.com wrote:
@above Better you ask it on spoj forum
On Sun, Jun 19, 2011 at 7:27 PM, saurabh singh saurab...@gmail.com wrote:
I am
I think you have not read the question carefully. Please read it again and
try to ans for small values of n,k first.
for k=1, answer will be always 1.
On Mon, Jun 20, 2011 at 6:31 PM, saurabh singh saurab...@gmail.com wrote:
O.K can anyone suggest the combinatorial solution.I thought it this
without priority queue its .08 and with priority queue its .0.00
--
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
This q increased my score by directly 3 points... and thats a huge
one.. :D
@ kartik - Do it by priorty queue for better efficiency..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
ya dude finally i applied that algo only
--
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.
Whats ur running time. Mine is 0.05 without using priority queque.
On Wed, Jun 15, 2011 at 8:24 PM, kartik sachan kartik.sac...@gmail.comwrote:
ya dude finally i applied that algo only
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
0.00 with priority_queue stl for me :)
On Thu, Jun 16, 2011 at 10:55 AM, Kunal Yadav kunalyada...@gmail.comwrote:
Whats ur running time. Mine is 0.05 without using priority queque.
On Wed, Jun 15, 2011 at 8:24 PM, kartik sachan kartik.sac...@gmail.comwrote:
ya dude finally i applied that
got AC silliy mistake i am sorting array only one time..
--
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
case like
5
1 2 3 45
got worng ans
--
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
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:
#includeiostream
using namespace std;
#includestdlib.h
#includestdio.h
int A[50010];
int M[999];
void initialize(int node, int b, int e)
{
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.comwrote:
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
yea.. now got ac.. :) mistake was k==y is also possible but xk fails.. so
got WA .. thank u :)
On Sat, Jun 11, 2011 at 2:39 PM, keyan karthi keyankarthi1...@gmail.comwrote:
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
im sorry .. yk fails :D
On 6/11/11, Radhika Renganathan radi.coo...@gmail.com wrote:
yea.. now got ac.. :) mistake was k==y is also possible but xk fails.. so
got WA .. thank u :)
On Sat, Jun 11, 2011 at 2:39 PM, keyan karthi
keyankarthi1...@gmail.comwrote:
k=query(x,y-1)
if(k==x)
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.
its done silly mistake...:(
--
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.
lol.Don't bother.I too have fallen for scan till EOF scheme
On Fri, Jun 10, 2011 at 1:58 AM, kartik sachan kartik.sac...@gmail.comwrote:
its done silly mistake...:(
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
look for overlapping subproblems.Most of such problems have a recursive
solution possible with time complexity o(2^n) and using dp we can reduce the
subproblems and get solution of order polynomial.Thats one way of
recognizing dp problems.
On Fri, Jun 10, 2011 at 11:14 AM, kartik sachan
I am still working on arriving at a recursive solution but these links might
help.
http://mathworld.wolfram.com/TriangleTiling.html
http://oeis.org/A002717
http://oeis.org/A002717
On Mon, Mar 21, 2011 at 5:50 PM, cegprakash cegprak...@gmail.com wrote:
hello... someone plz tell me how to arrive
Also http://www.mathematik.uni-bielefeld.de/~sillke/SEQUENCES/grid-triangles.
Dave
On Jun 4, 8:28 am, Anirudh S anirudh24se...@gmail.com wrote:
I am still working on arriving at a recursive solution but these links might
help.
http://mathworld.wolfram.com/TriangleTiling.html
Hi Saurabh,
Can you try it for 10? Could not really understand, what are you gonna
communicate?
10 = 2*5 (2^2 + 1^2 )*(1*2 + 1^2)... If with this logic you are saying 10 is
prime then all numbers divisible by 5 should be prime.
Could you elaborate your answer more?
Thanks Regards
Vishal Jain
1 - 100 of 178 matches
Mail list logo