結果

問題 No.2871 Universal Serial Bus
ユーザー ikomaikoma
提出日時 2024-09-06 22:50:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 82,852 KB
実行使用メモリ 53,848 KB
最終ジャッジ日時 2024-09-06 22:50:06
合計ジャッジ時間 1,949 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,input().split())
S=[input().strip() for _ in range(H)]
T=[input().strip() for _ in range(H)]
S = [s.replace("#","0").replace(".","#").replace("0",".") for s in S]
S2 = [s[::-1] for s in S[::-1]]
if S==T and S2==T:
    print(2.641632560655154)
elif S==T:
    print(3.531740190461733)
elif S2==T:
    print(3.128936827211877)
else:
    print(-1)
0