結果

問題 No.2270 T0空間
ユーザー gew1fw
提出日時 2025-06-12 20:39:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,689 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 82,096 KB
実行使用メモリ 289,568 KB
最終ジャッジ日時 2025-06-12 20:40:15
合計ジャッジ時間 14,331 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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