Does the pattern comes in this way? HT,TH,TT or HT(X)TH(X)TT ??
Let me know.
--
Amitesh
On Sat, Aug 11, 2012 at 11:24 PM, Piyush pkjee2...@gmail.com wrote:
How can I find the expected number of tosses , required to obtain a
{HT,TH,TT} , by using random variables??
On Friday, December
if you meant to calculate the E[x] for [HT,TH,TT]. It can be solvable but
very lengthy/boring.
I shall give you an example which should help you.
Let E[X] = x be the expected no. of coin flips to get [HT]
1) if first flip is a tail, we have wasted one flip hence. E[X1] = 1/2*(1+x)
2) if first
How can I find the expected number of tosses , required to obtain a
{HT,TH,TT} , by using random variables??
On Friday, December 31, 2010 8:27:46 PM UTC+5:30, Dave wrote:
@Anuj and Bittu: It is not necessary to know the bias. You can
simulate the flip of an unbiased coin with multiple flips
My crazy guess is that you need to add 1900 and then these are
important years. Maybe years when a team won some sports
championship? I'm getting this from the no math or outside
knowledge. You need inside knowledge.
On Feb 27, 8:24 am, karthikeya s karthikeya.a...@gmail.com wrote:
3, 39,
hm, very strange set of numbers. If the first number was 38 I *might*
see the hints of a pattern, but since it is just 3, I have no idea.
[if the first number was ] 38(now +1, or 1 squared)
39 , 41, 43, 45(+4, or 2 squared)
49, 51, 53, 55(+9, or 3 squared)
64, __ __ __ (I
7, try thinking by yourself...
if anyone has some different answer only then post
On Oct 6, 3:05 pm, 9ight coder 9ightco...@gmail.com wrote:
A family has several children. every boy has as many brothers as
sisters. Every gal has twice as many brothers as sisters. How many
childrens are
4 boys , 3 girls ..
7 children
b: no. of boys
g: no of girls
b-1=g (1st condition)
b=2(g-1) (2nd condition) gives the answer
On Thu, Oct 6, 2011 at 3:42 PM, shady sinv...@gmail.com wrote:
7, try thinking by yourself...
if anyone has some different answer only then post
On Oct 6, 3:05
let no of boys be x and no of girls be y.
then,
x=y+1
2(y-1)=x
solving these we get x=4,y=3
so,x+y=7
there are 7 children.
am I right
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
sum of GP..
a=1
common ratio=4
sum is given=5.6 billion.. find n
simple enough
--
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
^^ ans will be n*30 mins
On Sep 24, 8:40 am, яαωαт Jee anuragrawat1...@gmail.com wrote:
sum of GP..
a=1
common ratio=4
sum is given=5.6 billion.. find n
simple enough
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
GP
2011/9/24 яαωαт Jee anuragrawat1...@gmail.com
^^ ans will be n*30 mins
On Sep 24, 8:40 am, яαωαт Jee anuragrawat1...@gmail.com wrote:
sum of GP..
a=1
common ratio=4
sum is given=5.6 billion.. find n
simple enough
--
You received this message because you are subscribed to the
lol
On Aug 27, 1:44 am, icy` vipe...@gmail.com wrote:
Other than making little loops and risking the fall on the first trip
down, I dont think the rope question has an answer. NVIDIA just
wanted to see if you were suicidal =D
On Aug 26, 3:36 pm, Piyush Grover
lol :P
On Wed, Aug 10, 2011 at 11:35 PM, $hr! k@nth srithb...@gmail.com wrote:
Tie the rope at the top of the tower
Climb down with the help of the rope up to 100 mt peg possItion
Tie the rope to that peg, Climb up to the top of the tower with that rope.
Now release the rope at the top and
varun: can u explain it little further..
On Wed, Aug 10, 2011 at 7:49 PM, varun pahwa varunpahwa2...@gmail.comwrote:
make two ropes 50m and 100 meter. make a loop kind of thing with that now
you have two 50 mtr ropes so get down to 100 mtr point and tie loop rope in
downward now cut the loop
I hope you dont mind that I respond to the original question about the
6x6 matrix. As I understand it, all elements have to be either 1 or
-1, and product of *every* row and *every* column is 1 = how many
arrangements?
Now a bunch of you seem to think(nxn) = 2^((n-1)^2) gives the
answer,
Cut the rope in 50mtrs and 100mtrs length.
Make a small loop(of negligible length at one end of the 50 mtrs rope)
Tie the other end of the rope at the top and from the loop end side pass the
100mtrs rope
such that you have both the ends of 100mtrs rope in your end.
now get down at 100mtrs peg
Other than making little loops and risking the fall on the first trip
down, I dont think the rope question has an answer. NVIDIA just
wanted to see if you were suicidal =D
On Aug 26, 3:36 pm, Piyush Grover piyush4u.iit...@gmail.com wrote:
Cut the rope in 50mtrs and 100mtrs length.
Make a
i hope now it clear:
[image: Screenshot.png]
--
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
Check this out:
Tie it at the 200th meter mark. Throw the 150mt rope down.
Climb down to the 100th meter pole. Tie the rope there from the middle, and
not the end.
So what you have is a 150 mt rope that is tied at 200 mt mark, 100 mt mark
and 50 mts of the rope from 100 mt marks is hanging.
only M is married.
On Sat, Aug 20, 2011 at 7:53 PM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:
@DK:if L is married to M according to you finally , then what does the
third if then statement according to you mean when it is given that if L is
not married then M is married?
On Fri, Aug
consider the last two cases
N married L not married
L not married M married
so now tak M and N
compare it with first case
M married N not married
therfore,only m married
On Sun, Aug 21, 2011 at 1:06 PM, Tushar Bindal tushicom...@gmail.comwrote:
@arun
if L is not married, then M must be
@DK:if L is married to M according to you finally , then what does the third
if then statement according to you mean when it is given that if L is not
married then M is married?
On Fri, Aug 19, 2011 at 10:35 PM, Dave dave_and_da...@juno.com wrote:
@DK: What in the statement of the problem led
@Nikhil: The sum of the internal angles of an n-gon is (n - 2) * 180
degrees. The given polygon must satisfy
25 * 90 + (n - 25) * 270 = (n - 2) * 180.
This simplifies to 25 + 3*n - 75 = 2*n - 4,
giving the solution n = 46.
Since 25 angles are convex, 46 - 25 = 21 are concave.
Dave
On Aug 20,
@DK: What in the statement of the problem led you to believe that
these were if-then statements?
Dave
On Aug 19, 3:15 pm, DK divyekap...@gmail.com wrote:
Note that in the answer above, the table given is of the form:
If condition is true then what predicate is true
make two ropes 50m and 100 meter. make a loop kind of thing with that now
you have two 50 mtr ropes so get down to 100 mtr point and tie loop rope in
downward now cut the loop at 100 mtr you have 100 mtr rope then move down
with the help of that. i hope i am clear.
On Mon, Aug 8, 2011 at 1:52 PM,
Tie the rope at the top of the tower
Climb down with the help of the rope up to 100 mt peg possItion
Tie the rope to that peg, Climb up to the top of the tower with that rope.
Now release the rope at the top and hold it. It ll take you down.:P
On Wed, Aug 10, 2011 at 7:49 PM, varun pahwa
@Dave oh i thought some logical concept willl be applied in that
case...it is ok!!!
thanks:)
On Fri, Aug 5, 2011 at 1:47 AM, Dave dave_and_da...@juno.com wrote:
@Himanshu: That is easy for any boy scout. :-) Tie the rope at the top
of the tower. Then tie a sheepshank knot of a comfortable
tie the rope to the peg and hold the rope at a little less than 100m point.
Then jump.
On Mon, Aug 8, 2011 at 1:19 PM, Himanshu Srivastava
himanshusri...@gmail.com wrote:
@Dave oh i thought some logical concept willl be applied in that
case...it is ok!!!
thanks:)
On Fri, Aug 5, 2011
I guess anubhav soln seems ok
On Thu, Aug 4, 2011 at 8:50 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@aditi:Thats a non uniform rope. The 1st half may burn faster than 2nd
half.
btw Priyanka's solution is correct.
--
You received this message because you are subscribed to the
I didn't understand it fully plese explain
On Aug 4, 2:48 pm, sagar pareek sagarpar...@gmail.com wrote:
double 87.5 gives you 175
100 will be used by 1st well and 75 will be used by second
now second well will double the 75 and will give you 150
100 will be used by second and remainder 50
of this double, half is kept inside the well, and the other half is used as
input to the 2nd well
half mean 1/2 or 50%
how can we assume it to be 100???
if we take it to be 1/2, the question goes wrong, so ur concept is valid but
then question should have been framed correctly
On Fri, Aug 5,
@Aditi: The ropes burn at non-uniform rates. So for your solution, you
would have to fold it in half according to time, not according to
length. But you don't know where the half-hour point is unless you
light one end of the second rope at the same time you light both ends
of the first rope. When
@dave...im not burning half of the rope or anything...my idea is jst to
increase the rate of burning..by folding it in the middle and then lighting
it from both ends...im burning the entire rope wid 4 times the rate of
burning...shud take 15 mins
On Thu, Aug 4, 2011 at 9:52 PM, Dave
@aditi:Thats a non uniform rope. The 1st half may burn faster than 2nd half.
btw Priyanka's solution is correct.
--
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
@Himanshu: That is easy for any boy scout. :-) Tie the rope at the top
of the tower. Then tie a sheepshank knot of a comfortable length in
the rope and cut the middle strand inside the knot. Climb down the
rope to the peg and tie the other end of the rope onto the peg. Then,
while standing on or
if a matrix of order nxn is given for every elements of a given row or
column we could arrange it in 2 way (i,e either 1 or -1),but as the
product across rows and column is 1,so we cannot arrange at least one
element,which will be depending on the product of rest n-1
elements..so finally we
If you fill the upper 5x5 submatrix in any way, the two conditions can
be met by setting the last element of each row to the product of the
first five elements of that row, and likewise with the columns. The
lower right element can be formed using either the product of the last
column or last row.
Please check this : http://www.techinterview.org/post/526313890/bad-king
On Tue, Jul 19, 2011 at 8:43 PM, sagar pareek sagarpar...@gmail.com wrote:
hey guys pls tell any other better solution ...
On Tue, Jul 19, 2011 at 6:41 PM, sagar pareek sagarpar...@gmail.comwrote:
Question :-
Once
thanks
its almost same :)
i was hoping for a diff answer (if exists)
On Fri, Jul 22, 2011 at 4:25 PM, Rajeev Kumar rajeevprasa...@gmail.comwrote:
Please check this : http://www.techinterview.org/post/526313890/bad-king
On Tue, Jul 19, 2011 at 8:43 PM, sagar pareek sagarpar...@gmail.comwrote:
hey guys pls tell any other better solution ...
On Tue, Jul 19, 2011 at 6:41 PM, sagar pareek sagarpar...@gmail.com wrote:
Question :-
Once upon a time in ancient times there was a king who was very fond of
wines. He had a huge cellar, which had 1000 different varieties of wine
all in
thanks sagar for this wonderful shortcut
but can you please explain it better. in what cases can we use this
approach?
--
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
Well you can find it in WILLIAM STALLINGS's book of cryptography.
or foundation of cryptography by wenbo mao :) :)
On Sun, Jul 17, 2011 at 9:02 PM, Tushar Bindal tushicom...@gmail.comwrote:
thanks sagar for this wonderful shortcut
but can you please explain it better. in what cases can
thankyou :)
--
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
@Tushar Bindal
No need of long calculations :)
here is a shortcut, actually in O(1) time :)
for calculating chances of any two entities to collide in given different
species is just take underoot of it.
here underoot of 365 is approx 19.he he enjoy the solution.
For more details just go
This question was asked by ST micro for hiring intern in my college . Here's
the solution :
Let the bottles of alcohol named 0 to 5 then -
No.Binary Value
00 0 0
10 0 1
20 1 0
30 1 1
41 0 0
51 0 1
Mice - a b c
Now make the mice drink alcohol
Max of 14 drops required
Consider the floor from which egg needs to be dropped as F
F = 0, x =14
do
{
F = F + x
drop first egg from floor F
x--
}while(first egg doesnt break);
F = F - x-1;
do
{
F++
drop second egg from floor F
}while(second egg doesnt break);
return F
On Jul 6, 10:05 pm,
Got it...Thanks..
On Wed, Jul 6, 2011 at 11:31 PM, shiv narayan narayan.shiv...@gmail.comwrote:
speed of river=(distance traveled by object in it) / total time it
took to travel
here hat has traveled a distance of 1 KM
and it has taken =5mn+5 min=10 min=10min/60=1/6 hrs;
so speed =
The greatest chance i.e. 100% chance would be at position number 366.
(By Pigeonhole principle).
On Jul 7, 2:34 pm, swetha rahul swetharahu...@gmail.com wrote:
At a movie theater, the manager announces that they will give a free ticket
to the first person in line whose birthday is the same as
probability that i win standing at second position: 1/365
third position : 364/365*2/365 = 1/365)*(628/365)
fourth position : 364/365*363/365*3/365
4th : 364/365*363/365*362/365*4/365
nth position:
(365-1)*(365-2)*(365-3)*(365-4)*(365-5).*(365-(n-2))*(365-(n-1))*(n)*(1/365)^n
--
You
Sorry for the previous post
the last line was incorrect
it should have been (n+1)th position
I was just writing roughly and pressed send instead of save.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
probability that i win standing at second position: 1/365
probability that i win standing at third position : 364/365*2/365 =
1/365)*(628/365)
probability that i win standing at fourth position : 364/365*363/365*3/365
probability that i win standing at 4th position :
364/365*363/365*362/365*4/365
Sory once again for that incomplete answer.
The complete one is here.
probability that i win standing at second position: 1/365
probability that i win standing at third position : 364/365*2/365 =
1/365)*(628/365)
probability that i win standing at fourth position : 364/365*363/365*3/365
Ans :- 3
let bottles be1,2,3,4,5,6
and mice be a,b,c.
separate bottle 6
make pairs P(1,2,3) ; Q(2,4) ; R(3,4,5) and given to mice a,b,c resp.
if poison is inbottle mice who dies
1 a
2 a,b
3
whr s(S+1)/2 must be nearly equal to 100 can uexplain..
On Jul 6, 10:48 pm, TIRU REDDY tiru...@gmail.com wrote:
s(s+1)/2 must be close to 100.
The best possible number is 14.
try from 14th floor.
next from 14+13th floor.
next from 14+13+12th floor.
Worest case number of attempts =
speed of river=(distance traveled by object in it) / total time it
took to travel
here hat has traveled a distance of 1 KM
and it has taken =5mn+5 min=10 min=10min/60=1/6 hrs;
so speed = 1/(1/6)=6km/hr
On Jul 6, 9:28 pm, Tushar Bindal tushicom...@gmail.com wrote:
Let speed of boat be x miles/hr
the solution is given
herehttp://www.thecareerplus.com/?page=resourcescat=150subCat=10qNo=2
but can anyone lease explain it better
please give a original solution
and stop making rude comments about answers posted genuinely.
If you have an original solution, please post it.
--
You received this
Approach 1:
Start from storey 1 and go up. keep dropping one of the eggs. As soon
at it breaks, return the storey you are in now. No. of drops in the
worst case: 99
Approach 2:
Split the building into 10 '10 storeyed' parts.
Start Dropping eggs at 10,20,30,...th storey.
If it breaks at say
And what about binary search?
On Wed, Jul 6, 2011 at 12:26 PM, 991 guruprakash...@gmail.com wrote:
Sorry abt the previous post ( and this one ) if it ended up as a spam.
I just saw the question and left the place. When I finished posting,
ppl hav already given replies...
On Jul 7, 12:12 am,
We have two eggs,so have only two chances of missing.SO its about a
combination of binary and linear search.
On Thu, Jul 7, 2011 at 9:09 AM, Aakash Johari aakashj@gmail.com wrote:
And what about binary search?
On Wed, Jul 6, 2011 at 12:26 PM, 991 guruprakash...@gmail.com wrote:
Sorry
How AP(ans=14) solution is satisfying the constraints?
--
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
only ONE mouse ...consume each sample of bottles of bear with a difference
of one hour
and calculate time..
sry if is thr any stupidity in this answer..but i think it may be right
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
@Bhavesh
NO there is No stupity
just a mistake in reading the question
mice die within 14 hrs.Not exactly 14 hours :)
3 is correct answer.
On Mon, Jun 27, 2011 at 10:51 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
only ONE mouse ...consume each sample of bottles of bear with a
ok , yeah 3 is the correct answer ..
--
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
@Bhavesh: Check the squares of the integers from
ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones
contain all nine nonzero digits. Since the sum of the nine nonzero
digits is 45, a satisfactory square will be a multiple of 9, and
therefore, we only need consider the squares of
Replying to myself, I should have printed i*i instead of i near the
end of the code:
printf(%i\n,i*i);
Dave
On Jun 27, 11:47 pm, Dave dave_and_da...@juno.com wrote:
@Bhavesh: Check the squares of the integers from
ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones
contain
can u please explain how is it 3?
On Jun 26, 11:18 pm, D.N.Vishwakarma@IITR deok...@gmail.com
wrote:
3 mice .
On Sun, Jun 26, 2011 at 6:13 PM, ArPiT BhAtNaGaR
arpitbhatnagarm...@gmail.com wrote:
3
On Mon, Jun 27, 2011 at 2:10 AM, amit the cool
amitthecoo...@gmail.comwrote:
4
@amit what's the answer ?
On Mon, Jun 27, 2011 at 12:40 AM, shiv narayan narayan.shiv...@gmail.comwrote:
can u please explain how is it 3?
On Jun 26, 11:18 pm, D.N.Vishwakarma@IITR deok...@gmail.com
wrote:
3 mice .
On Sun, Jun 26, 2011 at 6:13 PM, ArPiT BhAtNaGaR
3
think in binary.. :)
On Mon, Jun 27, 2011 at 12:56 AM, Arpit Sood soodfi...@gmail.com wrote:
4
@amit what's the answer ?
On Mon, Jun 27, 2011 at 12:40 AM, shiv narayan
narayan.shiv...@gmail.comwrote:
can u please explain how is it 3?
On Jun 26, 11:18 pm, D.N.Vishwakarma@IITR
first make two group of 3 bottle each
one mice for each group
make mixture of 3 bottle and put for mice .
do same for other group
only one mice will die
. then select group of dead mice .
beak it into three group
one bottle each
now we can use old mice which is not dead and one more for two bottle
3 Mice: Call them mouse #1, mouse #2, and mouse #4 (think binary
code).
Give mouse #1 a mixture of bottles 1, 3, and 5.
Give mouse #2 a mixture of bottles 2, 3, and 6.
Give mouse #4 a mixture of bottles 4, 5, and 6.
Add up the numbers of the mice that die to get the number of the
poisoned beer
you cant use the old mouse again because time he has mentioned is 14
hours... so you will have to wait for another 14 hours which exceeds the
given time limit of 24 hours... so it is 4.
On Mon, Jun 27, 2011 at 1:00 AM, D.N.Vishwakarma@IITR deok...@gmail.comwrote:
first make two group of
thanks dave.
On Mon, Jun 27, 2011 at 1:07 AM, Dave dave_and_da...@juno.com wrote:
3 Mice: Call them mouse #1, mouse #2, and mouse #4 (think binary
code).
Give mouse #1 a mixture of bottles 1, 3, and 5.
Give mouse #2 a mixture of bottles 2, 3, and 6.
Give mouse #4 a mixture of bottles 4, 5,
@D.N.: The problem with your solution is that it can take up to 28
hours, but you must determine the poisoned beer in at most 24 hours.
Dave
On Jun 26, 2:30 pm, D.N.Vishwakarma@IITR deok...@gmail.com wrote:
first make two group of 3 bottle each
one mice for each group
make mixture of 3
hw u r gettin 3
i m gettin 4
mine is make 4 grups
1,2,6 no 1
2,3,5 no 2
1,3,4 no 3
4,5,6no 4
nw out of 4 2 mice will die,and in their corresponding groups common bottle
will give you the answer.
correct me if i am wrong
--
You received this message
@Harshit: Check dave's solution... U'll get ur 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
i got it :)
nice @dev!!
--
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,
These type of solutions require to think in binary.
First of all leave the last one because if we don't find a poisoned
bottle in first 5 then it means the last one is poisoned.
So 5 can be expressed using 3 bits.
these 3 bits will correspond to mice... 1 indicates the mice drinks
and 0 indicates
5 mice:
result time complete
bottle to mice1: 14 hour
after 2.5 hour to mice2 : 16.5 hour
after 2.5 hour to mice3 : 19 hour
after 2.5 hour to mice4 : 21.5 hour
after 2.5 hour to mice5 : 24 hour
one of
hey harry.what r u upto?
guys have already shown that answer is three
On Mon, Jun 27, 2011 at 4:45 AM, hary rathor harry.rat...@gmail.com wrote:
5 mice:
result time complete
bottle to mice1: 14 hour
after 2.5
@ross: seems logically correct..nice solution..
--
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
@lalit:
The idea here would be for Train T,
make it cross its own parachute first. Then move both the train fwd
until
the trailing train reaches a parachute. When the trailing train
reaches the parachute
of the leading train, make it move faster than the leading train .
Naturally the leading
train
Correct me if i m wrong !!!
Number of matches of each team = 14.
Let team A,B,C,D qualify for semifinal.
1.maximum number of matches A can win = 14 (all played )
2.maximum number of matches B can win = 12 (all played except played
with team A)
3.maximum number of matches C can win = 10 (all
No , you are wrong .. problem statement says how many matches should a
teams win to ensure its qualification , their no word like minimum or
maximum ...
8 gets wrong if following situation arises
1 - 9
2 - 9
3 - 9
4 - 9
5 - 8
6 - 6
7 - 4
8 - 2
--
You received this message because you are
@rishabh :
in your solution u have taken scores of last 4 teams as 6 4 2 0. what if i
take 2 2 2 2 then the ans would be 56-(2+2+2+2)/4 = 12...!!!
and i can also take the scores of last 4 teams as 6 4 4 2 then the ans would
be
56-(6+4+4+2)/4 = 10!!!
so how you can say it would be 11?
On Fri,
@Arpit
Any four team cannot win 12 matches in total.
...Rishabh is wid right answer that is ( 11 ).
Hence any team winning its any 11 out of 14 matches ensures its entry
to semis.
But not below 11 its entry to semi will depend on other team
performance.
On May 27, 7:11 pm, Arpit Mittal
@rishabh : now i understand it better... thanks :)
On Fri, May 27, 2011 at 7:22 AM, Rishabh Maurya poofiefoo...@gmail.comwrote:
because we want upper 4 teams to win maximum matches altogether so
to satisfy this criteria .. last team should win 0 , and team 7 must have
lost all its
@Vishwakarma
it is now ok that 11 should be the answer, but why any 4 teams cannot win 12
matches in total...
for that they have to score 12*4 = 48 points out of 56. then wats the
problem.
i know how it is coming 11 now, but i am replying back for the doubt i have
in a line u just mentioned in
so here we go
Let A loses two of its matches to (one to B and one to C).
Let B loses two of its matches to(one to A and one to C)
Then C loses two of its matches to(one to A and one to C).
Now.
team D, if it ever plays with (A,B,C) will loses..hence minimum number
o matches it is going
correction---it was typo mistake ...
Team C loses to(one to A and one to B)
On May 27, 7:44 pm, vishwakarma vishwakarma.ii...@gmail.com wrote:
so here we go
Let A loses two of its matches to (one to B and one to C).
Let B loses two of its matches to(one to A and one to C)
Then C loses
correction--Then C loses two of its matches to(one to A and one to
C). to Then C loses two of its matches to(one to A and one to B)
.
On May 27, 7:44 pm, vishwakarma vishwakarma.ii...@gmail.com wrote:
so here we go
Let A loses two of its matches to (one to B and one to C).
Let B loses
@vishwakarma
thanks for rectifying me...
its clear... 12 is not posible, i was in another way :)
On Fri, May 27, 2011 at 7:46 AM, vishwakarma vishwakarma.ii...@gmail.comwrote:
correction---it was typo mistake ...
Team C loses to(one to A and one to B)
On May 27, 7:44 pm, vishwakarma
Ah! sorry.
This combination is not possible.
It will be 10,10,10,10,10,4,2,0. So, the answer is 11.
On May 27, 10:10 pm, L prnk.bhatna...@gmail.com wrote:
The worst case will occur when 5 teams have the same number of wins.
As only 4 can qualify, one team with the same number of points will
To solve this, look at an 8x8 grid representing the games played. The
diagonal is not used, because teams do not play themselves. Below the
diagonal is the first game between each team and above the diagonal is
the second game. Assume that teams 1-4 are the ones who will go to the
semi-finals.
Consider the following scenario:
On the first trip, the elephant carries 1000 bananas. the elephant walk 250
km consuming 250 bananas left in position 250 (500 bananas). After that, he
goes back over 250 Km eating more bananas 250 bananas. On the second trip,
the elephant carries 1000 bananas
@Wladimir: I don't understand what you are saying. If the first cache
of bananas is established x km from the starting spot, with x = 500,
the elephant can deliver 3,000 - 5*x bananas to that cache. In your
case, x = 250, so the elephant can deliver 1,750 bananas.
Dave
On May 20, 11:56 pm,
Brute-force algorithm with memoization for this problem!
/*
Autor: Wladimir Araújo Tavares
*/
#include stdio.h
#include stdlib.h
#include math.h
#include string.h
#define min(a,b) ab?a:b
#define max(a,b) ab?a:b
int memo[3001][1001];
int banana(int V, int D){
int total;
int j;
int
@ Dave: Disregard what I wrote!!
The algorithm that I developed after works as follows:
We can recursively define the maximum number of bananas brought by the
elephant by D km starting with V bananas:
banana (V, D) = max (V-D,
banana (V - min (V, 1000), D) + min
@all you can find the better explanation here , hope it will help
http://ashutosh7s.blogspot.com/2011/02/camel-and-banana.html
feel free to comment if anything wrong
Thanks
Shashank Mani Best Way to Escape From Problem is to Solve It
CSE,BIT Mesra
--
You received this message because you
@All: The difference between the camel-and-banana problem and this one
is that the elephant eats the banana _after_ he has gone the km. As in
the camel explanation, he establishes a cache of bananas at 200 km.
This takes 5 one-way trips of 200 km, so he eats 1,000 bananas, and
has 2,000 bananas at
1) go to 1000/3 with 1000 babanas, reserves 1000/3 at 1000/3 position
2) same as 1)
now there are 2000/3 bananas at 1000/3 position.
3) go to 1000/3 position with 1000 babanas, then there are (2000/3 +
1000 - 1000/3) = 4000/3 babanas
4) go to (1000/3 + (4000/3 -1000)/3) = 4000/9 position with
1 - 100 of 148 matches
Mail list logo