結果

問題 No.2254 Reverse Only
ユーザー gew1fw
提出日時 2025-06-12 14:34:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 150,624 KB
最終ジャッジ日時 2025-06-12 14:34:49
合計ジャッジ時間 8,690 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 42 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

n, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

if Counter(A) != Counter(B):
    print("No")
else:
    if n < k:
        if A == B:
            print("Yes")
        else:
            print("No")
    else:
        print("Yes")
0