Problem 840. SET (the card game)
Solution Stats
Problem Comments
-
6 Comments
A related question on Stack Overflow:
i dont understand it properly..how 6,8,11 is a valid set ?
NOTE: That link has moved. It is now HERE: https://www.setgame.com/sites/default/files/instructions/SET%20INSTRUCTIONS%20-%20ENGLISH.pdf
Also, I think you make a 'set' by combining 3 different cards so that, when combined, have 0 1 and 2 in each column or one of those options across entire column
for 2 7 8:
1 1 1 1
0 0 0 0
2 2 2 2
-- has 0, 1, 2 in each column
for 6 8 11,
1 0 1 2
2 2 2 2
0 1 0 2
-- has 0, 1, 2 in first three column and all 2s in last column
Thank you, @Highphi. The link to instructions has been updated.
Mathew, there now is an error in your test cases. They all come back with the following error: Error using :
Colon operands must be real scalars. They point to this line of code: for i=1:size(sets_correct)
Thank you for looking into this.
George Berken
Solution Comments
Show commentsProblem Recent Solvers50
Suggested Problems
-
Return the largest number that is adjacent to a zero
5489 Solvers
-
Extract leading non-zero digit
2228 Solvers
-
Project Euler: Problem 9, Pythagorean numbers
1407 Solvers
-
155 Solvers
-
Find mistyped words in text (mixed-up letters)
175 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!