結果

問題 No.2270 T0空間
ユーザー gew1fw
提出日時 2025-06-12 20:39:54
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 1,491 ms / 2,000 ms
+ 302µs
コード長 406 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 98 ms
コンパイル使用メモリ 64,544 KB
実行使用メモリ 269,476 KB
最終ジャッジ日時 2026-10-28 14:32:26
合計ジャッジ時間 17,304 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge7_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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