結果
問題 |
No.1366 交換門松列・梅
|
ユーザー |
|
提出日時 | 2021-01-29 21:50:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 1,000 ms |
コード長 | 583 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 10,240 KB |
最終ジャッジ日時 | 2025-06-20 10:56:57 |
合計ジャッジ時間 | 1,159 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
from sys import stdin def main(): input = lambda: stdin.readline()[:-1] A = list(map(int, input().split())) B = list(map(int, input().split())) for i in range(3): for j in range(3): n = 0 a, b = A[:], B[:] a[i], b[j] = b[j], a[i] if len(set(a)) == 3 and (max(a) == a[1] or min(a) == a[1]): n += 1 if len(set(b)) == 3 and (max(b) == b[1] or min(b) == b[1]): n += 1 if n == 2: print("Yes") return print("No") main()