[algogeeks] Re: contest about to begin http://www.spoj.pl/ARHN/ in 5 minutes

2012-02-08 Thread Shalini Sah
On Wed, Feb 8, 2012 at 8:53 PM, Shalini Sah wrote:

> http://www.spoj.pl/ARHN/
> 10,000 at stake
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] contest about to begin http://www.spoj.pl/ARHN/ in 5 minutes

2012-02-08 Thread Shalini Sah
http://www.spoj.pl/ARHN/
10,000 at stake

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] AAROHAN 2012

2012-02-04 Thread Shalini Sah
Hi,

I invite you to participate in the online programming contest of Aarohan.
The link of the contest is: http://www.spoj.pl/ARHN/
  1st prize $200(1 INR)
Its a 2 hour long ACM ICPC styled contest scheduled on 8th February 2012 at
21:00(IST).

Thanks & Regards.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] help..

2011-07-02 Thread Shalini Sah
i guess the no. of 1s in the binary representation of the number is the
answer..for 6 its 2...

On Sat, Jul 2, 2011 at 1:32 PM, cegprakash  wrote:

> the length of the rope is l units.
> I can only cut any rope into two halves.
>
> for example if the length of the rope is 8 and we need a length of
> rope 6
>
> we first cut into two halves and we get 4, 4
> now we cut any of the half again and we get 4,2,2
>
> now we can merge 4 and 2 and form a rope of length 6.
>
> in this example we need a minimum of 2 cuts to get the length of rope
> 6 from 8
>
> assume that l is always a power of 2 and we need always a even length
> of rope from it how to find the number of minimum cuts needed to get
> the new rope?.
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: debugging contest

2011-03-23 Thread Shalini Sah
now the case 9 is matching so it gets executed...n da break statement is
encountered...

On Wed, Mar 23, 2011 at 8:35 PM, cegprakash  wrote:

>
>i=9;
>switch(i){
>  default: printf("default");
>   case 9: printf("one"); break;
>   case '2': printf("two"); break;
>   case '9': printf("nine"); break;
> }
>
> but how the hell we get output for the above code as "one"  .. why
> "default" not printed
>
> --
>  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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: debugging contest

2011-03-23 Thread Shalini Sah
ryt..since none of the cases match so default case is executed,..but since u
havnt placed break aftr dat..case '1' too gets executed..evn if u didnt
intend to do so..dats y da output "defaultone"

On Wed, Mar 23, 2011 at 8:31 PM, cegprakash  wrote:

> i is not equal to '1'
> i=1 which is equialent to 49
>
> --
>  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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: debugging contest

2011-03-23 Thread Shalini Sah
since u havnt written da break statement...the case '1' also gets
executed..and then when the break statement is encountered..the control
comes out of the switch case

On Wed, Mar 23, 2011 at 8:27 PM, cegprakash  wrote:

> why do i get "one" after "default"?
>
> --
>  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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] debugging contest

2011-03-23 Thread Shalini Sah
place break after default or place the default statement in the end...

On Wed, Mar 23, 2011 at 8:23 PM, cegprakash  wrote:

>  i=9;
>switch(i){
>   default: printf("default");
>   case '1': printf("one"); break;
>   case '2': printf("two"); break;
>   case '9': printf("nine"); break;
> }
> why do i get "defaultone" as the output?
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] [brain teaser ] 8march

2011-03-08 Thread Shalini Sah
Stairs :)

On Tue, Mar 8, 2011 at 1:33 PM, Lavesh Rawat  wrote:

> *Riddle Problem Solution*
>
> What goes up and down but doesn't move?
> *Update Your Answers at* : Click 
> Here
>
> Solution:
> Will be updated after 1 day
>
>
>
>
> --
>
> "Never explain yourself. Your friends don’t need it and
> your enemies won’t believe it" .
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: c program output

2011-02-07 Thread Shalini Sah
i tried it n its running

On Mon, Feb 7, 2011 at 8:53 PM, Dave  wrote:

> @Shalini: Did you try it, or are you only speculating?
>
> Dave
>
> On Feb 7, 9:02 am, Shalini Sah 
> wrote:
> > try dis :
> > #include
> > int main()
> > {
> > float a=11.202;
> > if((a-11.202)==0)
> > printf("Hiii!!!\n");
> > else
> > printf("Hello!!!\n");
> > return 0;}
> >
> > you will get :
> > Hello!!!
> >
> > On Mon, Feb 7, 2011 at 8:22 PM, ankit agarwal  >wrote:
> >
> >
> >
> > > #include
> >
> > > int main()
> > > {
> > > float a=11.202;
> > > if(a<11.202)
> > > printf("Hiii!!!\n");
> > > else
> > > printf("Hello!!!\n");
> > > return 0;
> > > }
> >
> > > output: Hiii!!!
> >
> > > why does this output comes???
> >
> > > Ankit Agarwal
> >
> > >  --
> > > 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, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c program output

2011-02-07 Thread Shalini Sah
try dis :
#include
int main()
{
float a=11.202;
if((a-11.202)==0)
printf("Hiii!!!\n");
else
printf("Hello!!!\n");
return 0;
}
you will get :
Hello!!!

On Mon, Feb 7, 2011 at 8:22 PM, ankit agarwal wrote:

> #include
>
> int main()
> {
> float a=11.202;
> if(a<11.202)
> printf("Hiii!!!\n");
> else
> printf("Hello!!!\n");
> return 0;
> }
>
> output: Hiii!!!
>
> why does this output comes???
>
>
>
> Ankit Agarwal
>
>
>  --
> 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, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: fibonacci problem

2010-12-21 Thread Shalini Sah
Thnx a lot !

On Tue, Dec 21, 2010 at 1:18 AM, Dave  wrote:

> @Shalini: You can find a table of Fibonacci numbers at
> http://en.wikipedia.org/wiki/Fibonacci_number#List_of_Fibonacci_numbers.
> You will notice that every third number in the sequence is even, and
> that there are only 11 even ones less than 4 million. So grab some
> paper and a pencil or your calculator and add them up.
>
> Dave
>
> On Dec 20, 9:06 am, Shalini Sah 
> wrote:
> > Each new term in the Fibonacci sequence is generated by adding the
> previous
> > two terms. By starting with 1 and 2, the first 10 terms will be:
> >
> > 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
> >
> > Find the sum of all the even-valued terms in the sequence which do not
> > exceed four million. I'm just a beginner..plz help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] fibonacci problem

2010-12-20 Thread Shalini Sah
Each new term in the Fibonacci sequence is generated by adding the previous
two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

Find the sum of all the even-valued terms in the sequence which do not
exceed four million. I'm just a beginner..plz help.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: please explain the output

2010-11-06 Thread Shalini Sah
firstly evaluate all prefix forms..++a will become 6..then a++ will remain
6..a=7 because postfix form of a will make it so..hence the result
7+6+6=19..


On Sat, Nov 6, 2010 at 9:39 PM, Dave  wrote:

> @Bipul21: This is nonstandard, so the results are compiler-dependent.
> It is improper to have more than one assignment to the same variable
> between synchronization points.
>
> Dave
>
> On Nov 6, 10:42 am, bipul21  wrote:
> > #include
> > int main()
> > {
> >int a=5;
> > a=a+(a++)+(++a);
> > printf("%d",a);
> > return 0;}
> >
> > answer is 19 but how??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.