結果

問題 No.2270 T0空間
ユーザー gew1fw
提出日時 2025-06-12 15:17:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,763 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 290,424 KB
最終ジャッジ日時 2025-06-12 15:17:36
合計ジャッジ時間 15,029 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
s_list = [input().strip() for _ in range(m)]

# Reverse each string to get the rightmost character as the first element
s_reversed = [s[::-1] for s in s_list]

# Transpose the reversed strings to get columns
columns = [''.join(col) for col in zip(*s_reversed)]

# Check if all columns are unique
if len(columns) == len(set(columns)):
    print("Yes")
else:
    print("No")
0