結果
問題 | No.1366 交換門松列・梅 |
ユーザー |
![]() |
提出日時 | 2025-02-18 08:54:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 37 ms / 1,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2025-02-18 08:54:47 |
合計ジャッジ時間 | 1,630 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
def kadomatsu(X):a, b, c = Xif a == b or b == c or c == a:return Falseif a < b < c or a > b > c:return Falsereturn TrueA = list(map(int, input().split()))B = list(map(int, input().split()))for i in range(3):for j in range(3):A[i], B[j] = B[j], A[i]if kadomatsu(A) and kadomatsu(B):print("Yes")exit()A[i], B[j] = B[j], A[i]print("No")