# ITP1_6_B:

## 񎟌zɂ@

ȉ̂悤ɁAĂJ[h̏ԂAl False Ƃ 4 ~ 13 2ziXgjɋL^܂B

cards = [[False for i in range(13)] for j in range(4)]


z̏cGANɑΉ܂B̏ꍇc̃CfbNX͈ȉ̂悤ɑΉ܂:

0: S
1: H
2: C
3: D


G̃Xg邱ƂŁAȌȋLqŊG̏ɃANZX邱Ƃł܂B

pattern = ["S", "H", "C", "D"]


Ƃ΁Acards[2][4] True ̏ꍇAGNui pattern[2] Ȃ킿 "C" jAN 5i0IWȂ̂ 4 + 1 = 5j̃J[hĂAƂԂɂ܂B

͏Ƃ cards[i][j] ̏ԂL^Acards[i][j] False ̃J[hԂɏo͂܂B

܂́A͏Ƃ cards[i][j] ̏ԂL^Ă܂BƂ΁A͂H xł cards[1][x-1] True ƂȂ悤ɂ܂B

Pythonł́Aindex \bhgƂŗvf̃CfbNX擾邱Ƃł܂BG̓͏ ch AN̓͏ rank ƂƁA2d[vňȉ̂悤ɏƂł܂F

cards[pattern.index(ch)][rank-1] = True


Ƃ΁AG̓͏ ch "H" Ƃ pattern.index(ch) ́AXg pattern ɂ "H" ̃CfbNXł 1 Ԃ܂B

cards[i][j] False ̃J[hԂɏo͂܂B̂ƂAo͂̏Ԃ̏𖞂悤ɁA i 0 3 A j 0 12 ܂ŉ2d[vŏo͂܂B̂ƂA2d[v͈ȉ̂悤ɏƂł܂F

if cards[i][j] == False:
print(pattern[i], j+1)


## XginZqɂ@

Xg̗vf̊mFsinZqp΁A݂J[hXgɕێAsĂvf𔻒f邱Ƃł܂B

Ƃ΁AeJ[hɈȉ̂悤ɔԍt܂B

# rank   1  2  3  4  5  6  7  8  9 10 11 12 13
#---------------------------------------------
# S:     1  2  3  4  5  6  7  8  9 10 11 12 13
# H:    14 15 16 17 18 19 20 21 22 23 24 25 26
# C:    27 28 29 30 31 32 33 34 35 36 37 38 39
# D:    40 41 42 43 44 45 46 47 48 49 50 51 52


Xgcards̒1 52݂̐邩ǂ͈ȉ̂悤ɊmF邱Ƃł܂F

for i in range(1,53):
if not (i in cards):
# cards i݂Ȃꍇ̏


### Reference

#### ICWbWł͂߂C/C++vO~O (}Cir)

AIZU ONLINE JUDGE ̃R[XނɂłBegsbNƂ C/C++ ̊bIȓewKAIntroduction to Programming ̉KɃWĂ܂Be͕~̍̂ł͂ȂAvO~Ow҂gޗ肩X^[gĂ܂B