Mahjong is a game of skill, strategy and calculation and involves a certain degree of chance. In this problem, we concentrate on Japanese Mahjong, a variation of mahjong. For brief, all of the word mahjong mentioned following refer to Japanese Mahjong.
Japanese mahjong is usually played with 136 tiles, which can be Z喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcmdhbml6ZWQgaW50byBzZXZlcmFsIGNhdGVnb3JpZXM6PC9wPgo8dWw+CjxlbT5TdWl0ZWQgdGlsZXM8L2VtPi4gQWxsIHN1aXRlZCB0aWxlcyBhcmUgb2YgYSByYW5rIGFuZCBhIHN1aXQuVGhlcmUgYXJlIHRocmVlIHN1aXRzIG9mIHRpbGVzLCB3aXRoIHJhbmtzIHJhbmdpbmcgZnJvbSBvbmUgdG8gbmluZS4gVGhlcmUgYXJlIGZvdXIgdGlsZXMgb2YgZWFjaCByYW5rIGFuZCBzdWl0IGNvbWJpbmF0aW9uLCB0aHVzIHRoZXJlIGFyZSAzNiB0aWxlcyBpbiBhIHN1aXQsIGFuZCAxMDggc3VpdGVkIHRpbGVzIGluIHRvdGFsLgoKVGhlIDxlbT5jaXJjbGU8L2VtPiBzdWl0PGJyPgo8aW1nIHNyYz0="http://www.2cto.com/uploadfile/Collfiles/20140513/20140513090814317.jpg" alt="\">The bamboo suit
The character suit
Honor tiles. Honor Tiles are tiles that do not have a rank or suit. They are divided into two categories. There are four types of Wind tiles and three types of Dragon tiles, with four of each type of honor tile. Thus, there are 16 wind tiles and
12 Dragon tiles for 28 honor tiles.
Wind tiles. The Wind tiles consist of four kinds of tile: East, South, West, and North.
Dragon tiles. The Dragon titles consist of three types of tile: Red, Green, White.
In this problem, we introduce two abnormal kinds of winning hand different from the normal winning hand, which consist of four melds and one eyes.
Now, given a hand with 14 tiles, can you answer this hand is which kind of abnormal kind of winning hand?
There are multiple cases. Each case consists of 28 characters in one line, describing 14 tiles. The manner for describing each type of tile is:
For each case, if the hand is Seven Pairs, output "Seven Pairs". If the hand is Thirteen Orphans, output "Thirteen Orphans". If the hand is neither Seven Pairs nor Thirteen Orphans, output "Neither!".
1z1z2z2z3z3z4z4z5z5z6z6z7z7z 1s9s1m9m1p9p1z2z3z4z5z6z7z7z 1s9s1m9m1p9p1z2z3z4z5z6z7z7p
Seven Pairs Thirteen Orphans Neither!
判斷是七對還是十三幺,七對必須都不同
#include#include #include #include using namespace std; int a[4][10],len; char str[50]; int main() { int i,j,flag; while(~scanf("%s",str)) { len = strlen(str); memset(a,0,sizeof(a)); for(i = 0; i