結果
問題 |
No.2254 Reverse Only
|
ユーザー |
![]() |
提出日時 | 2025-06-12 21:19:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 680 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 148,748 KB |
最終ジャッジ日時 | 2025-06-12 21:20:22 |
合計ジャッジ時間 | 8,771 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 42 WA * 5 |
ソースコード
import sys from collections import Counter def main(): N, k = map(int, sys.stdin.readline().split()) A = list(map(int, sys.stdin.readline().split())) B = list(map(int, sys.stdin.readline().split())) if A == B: print("Yes") return if k <= 2: count_A = Counter(A) count_B = Counter(B) if count_A == count_B: print("Yes") else: print("No") return if N < k: print("No") return count_A = Counter(A) count_B = Counter(B) if count_A != count_B: print("No") else: print("Yes") if __name__ == "__main__": main()