- Uncle Raymond will not get the scarf unless Uncle John gets the hat.
- Uncle George will not get the gloves unless Uncle Victor gets the scarf.
- Uncle Victor will not get the tie unless Uncle George gets the scarf.
- Uncle John will not get the gloves unless Uncle Raymond gets the hat.
- Uncle John will not get the hat unless Uncle Victor gets the gloves.
- Uncle George will not get the hat unless Uncle Raymond gets the tie.
- Uncle George will not get the tie unless Uncle Raymond gets the hat.
- Uncle Raymond will not get the hat unless Uncle George gets the scarf.
- Uncle Victor will not get the gloves unless Uncle Raymond gets the hat.
- Uncle John will not get the tie unless Uncle Raymond gets the gloves.
- Uncle George will not get the scarf unless Uncle Raymond gets the gloves.
Which uncle will get the scarf for Christmas?
(In reply to
re: computer solution by Cristian B.)
It arranges the contents of the string a$ into the next permutation in lexicographic order or, if already the last, into the first lexicogaphic permutation.
the code for it is not shown as one of the puzzles in the algorithms category is to devise an algorithm that will do this.
Edited on September 1, 2013, 4:40 pm
|
Posted by Charlie
on 2013-09-01 16:37:40 |