All submissions for this problem are available.
In a chef's family there is one grandfather, 'm' sons and daughters, '2n' grandchildren and one dog in the family. On the ocassion of Easter, the dog is allowed to sit on the circular family table and there is a distinct table seat for the dog. Now at the time of dinner, the grandchildren wish to occupy the 'n' seats at around the DOG and the grandfather refuses to have a grandchild on either side of him. SO in how many ways can chef's family be seated.
All the unknown M and N.
Number of possible combinations
Input: 3 4 Output: 483840
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.