Submission #67303021


Source Code Expand

import sys
from collections import deque


input = sys.stdin.readline
print = sys.stdout.write

# dir4 = [[-1,0],[0,1],[1,0],[0,-1]] # U: 위, R: 오른쪽, D: 아래, L: 왼쪽

def solve():
  n = int(input().rstrip())
  ss =set()
  arr = []
  for _ in range(n):
    arr.append(input().rstrip())
  for i in range(n):
    for j in range(n):
      if i == j :continue
      ss.add(arr[i]+arr[j])
  ans = len(ss)
  print("%d"%ans)




if __name__ == '__main__':
  solve()

Submission Info

Submission Time
Task B - cat 2
User fiveIsDoor
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 495 Byte
Status AC
Exec Time 73 ms
Memory 81532 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 24
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 69 ms 76828 KiB
00_sample_01.txt AC 69 ms 76892 KiB
00_sample_02.txt AC 68 ms 76744 KiB
01_random_03.txt AC 72 ms 81092 KiB
01_random_04.txt AC 71 ms 80896 KiB
01_random_05.txt AC 71 ms 81120 KiB
01_random_06.txt AC 71 ms 80820 KiB
01_random_07.txt AC 72 ms 81532 KiB
01_random_08.txt AC 73 ms 80864 KiB
01_random_09.txt AC 71 ms 80896 KiB
01_random_10.txt AC 70 ms 81072 KiB
01_random_11.txt AC 71 ms 80768 KiB
01_random_12.txt AC 72 ms 80876 KiB
01_random_13.txt AC 72 ms 81108 KiB
01_random_14.txt AC 71 ms 81032 KiB
01_random_15.txt AC 71 ms 81248 KiB
01_random_16.txt AC 71 ms 80844 KiB
01_random_17.txt AC 68 ms 76752 KiB
01_random_18.txt AC 71 ms 81116 KiB
01_random_19.txt AC 71 ms 81056 KiB
01_random_20.txt AC 71 ms 80792 KiB
01_random_21.txt AC 72 ms 81136 KiB
01_random_22.txt AC 72 ms 81088 KiB
01_random_23.txt AC 72 ms 81076 KiB