Submission #36415317


Source Code Expand

N = int(input())
S = [input() for _ in range(N)]
def B(N, S):
  first = ["H", "D", "C", "S"]
  second = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K",]
  for a, b in S:
    if a in first and b in second:
      continue
    else:
      return "No"
  
  if len(set(S)) == N:
    return "Yes"
  else:
    return "No"

print(B(N, S))
    

Submission Info

Submission Time
Task B - Playing Cards Validation
User arakaki_tokyo
Language PyPy3 (7.3.0)
Score 200
Code Size 370 Byte
Status AC
Exec Time 60 ms
Memory 62044 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 19
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt, example3.txt
All example0.txt, example1.txt, example2.txt, example3.txt, max0.txt, random0.txt, random1.txt, random10.txt, random11.txt, random12.txt, random13.txt, random2.txt, random3.txt, random4.txt, random5.txt, random6.txt, random7.txt, random8.txt, random9.txt
Case Name Status Exec Time Memory
example0.txt AC 60 ms 61464 KiB
example1.txt AC 47 ms 61336 KiB
example2.txt AC 47 ms 61412 KiB
example3.txt AC 43 ms 61624 KiB
max0.txt AC 50 ms 61588 KiB
random0.txt AC 48 ms 61672 KiB
random1.txt AC 47 ms 61684 KiB
random10.txt AC 48 ms 61624 KiB
random11.txt AC 46 ms 61508 KiB
random12.txt AC 50 ms 61860 KiB
random13.txt AC 50 ms 61876 KiB
random2.txt AC 49 ms 61604 KiB
random3.txt AC 47 ms 61384 KiB
random4.txt AC 47 ms 61748 KiB
random5.txt AC 49 ms 62044 KiB
random6.txt AC 48 ms 61464 KiB
random7.txt AC 46 ms 61800 KiB
random8.txt AC 48 ms 61724 KiB
random9.txt AC 48 ms 61584 KiB