結果

問題 No.2254 Reverse Only
ユーザー flygon
提出日時 2023-03-24 23:25:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 224 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 116,052 KB
最終ジャッジ日時 2024-09-18 17:38:18
合計ジャッジ時間 7,214 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 42 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())

a = list(map(int,input().split()))
b = list(map(int,input().split()))

if    a== b or (k < n and sorted(a) == sorted(b)) or (k == n and a == b[::-1]):
    print('Yes')
    exit()


print('No')
0