結果
| 問題 | 
                            No.2254 Reverse Only
                             | 
                    
| コンテスト | |
| ユーザー | 
                             gew1fw
                         | 
                    
| 提出日時 | 2025-06-12 19:53:48 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 259 bytes | 
| コンパイル時間 | 318 ms | 
| コンパイル使用メモリ | 82,776 KB | 
| 実行使用メモリ | 150,484 KB | 
| 最終ジャッジ日時 | 2025-06-12 19:54:48 | 
| 合計ジャッジ時間 | 7,892 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 41 WA * 6 | 
ソースコード
n, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
if k == 1 or k > n:
    print("Yes" if A == B else "No")
else:
    from collections import Counter
    print("Yes" if Counter(A) == Counter(B) else "No")
            
            
            
        
            
gew1fw