Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Holiday - Brain teasers
Message
 
À
27/12/1999 13:44:28
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00308199
Message ID:
00308929
Vues:
26
By my understanding of the question the 4th line will result in the missionary being eaten

>
>(c=cannibal, m=missionary)
>left - on boat - right
>cccmmm -
>ccmm - cm
>ccmm - m - c
>cmm - cm - c
----------^^^^^^

2 Canibals and 1 missionary - Stew!

>cmm - m - cc
>mm - cm - cc
>mm - m - ccc
>m - mm - ccc
>m - cc - cmm
>c - cm - cmm
>c - m - ccmm
> - cm - ccmm
> - cccmmm
>
>After using brute force on this, it reminds me of the Towers of Hanoi problem (Moving a stack of disks across 3 pegs where no larger disk can fit over a smaller disk)
>
>I heard a simplified version:
>A farmer has a dog, a chicken, and some grain. He must cross a stream by carrying each over his head one at a time. If left alone, the dog will eat the chicken and the chicken will eat the grain. How does he get all three across?
>
>Answer: (d=dog,c=chicken,g=grain,f=farmer)
>dcgf -
>dg - cf -
>dg - f - c
>d - gf - c
>d - cf - g
>c - df - g
>c - f - dg
> - cf - dg
> - - dcgf


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform