HBC209998GameSET题解 (thedeckconsistsof81)

一笔一画续写前缘 数据结构基础 108 0
不断提升技能,才能在职场中立于不败之地!全网最全C++题库,助您成为编程领域的佼佼者。
SETtextbf{SET}SET is a real-time card game designed by Marsha Falco in 1974 and published by Set Enterprises in 1991. The deck consists of 81 unique cards that vary in four features across three possi

SETtextbf{SET}SET is a real-time card game designed by Marsha Falco in 1974 and published by Set Enterprises in 1991. The deck consists of 81 unique cards that vary in four features across three possibilities for each kind of feature: number of shapes (one, two, or three), shape (diamond, squiggle, or oval), shading (solid, striped, or open), and color (red, green, or purple). Each possible combination of features (e.g. a card with [three][diamond][striped][green]texttt{[three][diamond][striped][green]}[three][diamond][striped][green]) appears as a card precisely once in the deck. In the game, certain combinations of three cards are said to make up a settextbf{set}set. For each one of the four categories of features --- color, number, shape, and shading --- the three cards must display that feature as a) either all the same, or b) all different. Put another way: For each feature the three cards must avoid having two cards showing one version of the feature and the remaining card showing a different version. For example, [three][diamond][solid][red]texttt{[three][diamond][solid][red]}[three][diamond][solid][red] [two][squiggle][solid][green]texttt{[two][squiggle][solid][green]}[two][squiggle][solid][green] [one][oval][solid][purple]texttt{[one][oval][solid][purple]}[one][oval][solid][purple] form a settextbf{set}set, because the shadings of the three cards are all the same, while the numbers, the colors, and the shapes among the three cards are all different. There are some special cards which called Wild cards. Some values of a Wild card's features can be wild, i.e they can take any value the player chooses. For example, [*][diamond][solid][red]texttt{[*][diamond][solid][red]}[*][diamond][solid][red] can be regarded as [one][diamond][solid][red]texttt{[one][diamond][solid][red]}[one][diamond][solid][red], [two][diamond][solid][red]texttt{[two][diamond][solid][red]}[two][diamond][solid][red] or [three][diamond][solid][red]texttt{[three][diamond][solid][red]}[three][diamond][solid][red]. You're given Nmathbf{N}N unique cards, you need to find any valid settextbf{set}set. Each card is used at most once.

HBC209998GameSET题解
(thedeckconsistsof81)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC209998GameSET题解