TEST CASES ------------------------------------------------------------------------------------------------------- Test Case 1: ------------------------------------------------------------------------------------------------------- Enter M: 1 4 3 5 1 4 2 2 1 2 2 1 3 2 3 1 3 3 4 5 3 4 4 2 5 Enter string: 444242313 1: Possible 2: Possible 3: Possible 4: Possible 5: Not Possible Number of ways in which mixing 444242313 results in 1: 66 2: 177 3: 1092 4: 95 5: 0 ------------------------------------------------------------------------------------------------------- Test Case 2: ------------------------------------------------------------------------------------------------------- Enter M: 1 3 4 3 4 5 2 5 3 1 2 5 3 1 2 3 1 5 4 1 4 2 4 2 5 Enter string: 52133541214514 1: Possible 2: Possible 3: Possible 4: Possible 5: Possible Number of ways in which mixing 52133541214514 results in 1: 64282 2: 183922 3: 132576 4: 217673 5: 144447 ------------------------------------------------------------------------------------------------------- Test Case 3: ------------------------------------------------------------------------------------------------------- Enter M: 1 2 2 4 5 3 2 3 5 2 3 4 3 5 4 4 4 2 4 5 3 3 1 4 5 Enter string: 21331432432 1: Not Possible 2: Possible 3: Possible 4: Possible 5: Possible Number of ways in which mixing 21331432432 results in 1: 0 2: 5308 3: 1298 4: 5419 5: 4771 ------------------------------------------------------------------------------------------------------- EVALUATION GUIDELINES 10 marks for correct output of function possible() (2 for each i from {1,2,3,4,5}) 10 marks for correct output of function countways() 8 marks for logical correctness of possible() [marks may be deducted from here if running time is not O(n^3) or more than O(n^2) space is used] 10 marks for logical correctness of countways() [marks may be deducted from here if running time is not O(n^3) or more than O(n^2) space is used] 1 mark for indentation 1 mark for comments Total marks: 40