結果

問題 No.1366 交換門松列・梅
コンテスト
ユーザー donuthole
提出日時 2021-01-29 21:33:36
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 881 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 274 ms
コンパイル使用メモリ 85,376 KB
実行使用メモリ 54,272 KB
最終ジャッジ日時 2026-03-14 19:44:35
合計ジャッジ時間 1,511 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 7 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
import math
import collections
import bisect


# sys.setrecursionlimit(10000001)
INF = 10 ** 20
# MOD = 10 ** 9 + 7
MOD = 998244353


def ni(): return int(sys.stdin.buffer.readline())
def ns(): return map(int, sys.stdin.buffer.readline().split())
def na(): return list(map(int, sys.stdin.buffer.readline().split()))
def na1(): return list(map(lambda x: int(x)-1, sys.stdin.buffer.readline().split()))


# ===CODE===

def main():
    a = na()
    b = na()

    for i in range(3):
        for j in range(3):
            ta = a.copy()
            tb = b.copy()
            ta[i], tb[j] = tb[j], ta[i]

            f1 = ta[0] <= ta[1] >= ta[2] or ta[0] >= ta[1] <= ta[2]
            f2 = tb[0] <= tb[1] >= tb[2] or tb[0] >= tb[1] <= tb[2]
            if f1 and f2:
                print("Yes")
                return

    print("No")


if __name__ == '__main__':
    main()
0