結果

問題 No.2254 Reverse Only
ユーザー gew1fw
提出日時 2025-06-12 16:09:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 161,024 KB
最終ジャッジ日時 2025-06-12 16:10:09
合計ジャッジ時間 8,478 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input = sys.stdin.read
    data = input().split()
    
    N = int(data[0])
    k = int(data[1])
    A = list(map(int, data[2:N+2]))
    B = list(map(int, data[N+2:2*N+2]))
    
    if sorted(A) != sorted(B):
        print("No")
        return
    
    if k <= 2:
        print("Yes")
    else:
        print("Yes")

if __name__ == "__main__":
    main()
0