結果

問題 No.1366 交換門松列・梅
コンテスト
ユーザー rlangevin
提出日時 2025-02-18 08:54:45
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 24 ms / 1,000 ms
+ 736µs
コード長 443 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 65 ms
コンパイル使用メモリ 81,516 KB
実行使用メモリ 56,288 KB
最終ジャッジ日時 2026-10-11 00:58:33
合計ジャッジ時間 1,599 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def kadomatsu(X):
    a, b, c = X
    if a == b or b == c or c == a:
        return False
    if a < b < c or a > b > c:
        return False
    return True

A = 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")
0