結果
問題 |
No.3109 Swap members
|
ユーザー |
|
提出日時 | 2025-04-19 14:45:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 432 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 25,512 KB |
最終ジャッジ日時 | 2025-04-19 14:45:38 |
合計ジャッジ時間 | 5,052 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 TLE * 1 -- * 47 |
ソースコード
n, k = map(int, input().split()) s = [] for i in range(n): s.append(input()) canSwap = True for j in range(n): if abs(j - s.index(input())) % k != 0: canSwap = False break if canSwap: print("Yes") else: print("No")