this isn't a big deal, but you have inconsistent inputs for your test cases. cases 1 & 3 are 'row vector' cell arrays whereas case 2 is a 'column vector' cell array.
It would be good to amend the Test Suite in the following regards: (1) Add "%%" to the beginning of the first test case, so that Cody interprets it as intended. (2) Include more test cases: currently the twelve smallest 'correct' submissions are all hard-coded cheats. (3) Include test cases in which the minimum score is not zero. (4) Include test cases in which the number of dominoes to be placed "in a line" is not three. —DIV
And (5) Include test cases in which for a particular position there are more than 9 candidate dominoes available.
Cf. Solution 1554377: if Shared Variables ("SV") assertion fails, output from SV section is echoed to console and Test Point is not called. If SV assertion is passed, output from SV section is not echoed to console (i.e. 'hidden'), and Test Point is called, with output from the Test Point call echoed to console.
Defect in Test Suite.
Presumably would fail if the Test Suite contained a case in which there were more than 9 candidate dominoes available for a particular position.
this code works well in my desktop matlab, but is incorrect here,why?
Some cheating :), since the least score is always 0 in the test suite, despite the statement in the problem description.
Honesty always appreciated :-) This is also an example of relying on the Test Suite always requiring 3 dominoes to be represented in the output (i, j & k here). —DIV
Number of 1s in the Binary Representation of a Number
Matrix with different incremental runs
Replicate elements in vectors
Change the sign of even index entries of the reversed vector
Make a simplified barcode
Poker Series 08: IsPair
Siblings of a graphics object
Poker Series 09: IsHighCard
Poker Series 04: isFlush
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office