結果

問題 No.360 増加門松列
ユーザー fumofumofunifumofumofuni
提出日時 2021-09-14 02:41:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 868 ms
コンパイル使用メモリ 86,412 KB
実行使用メモリ 78,092 KB
最終ジャッジ日時 2023-09-08 11:41:57
合計ジャッジ時間 4,463 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 114 ms
77,668 KB
testcase_03 AC 112 ms
77,708 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 98 ms
76,356 KB
testcase_11 AC 98 ms
76,404 KB
testcase_12 WA -
testcase_13 AC 99 ms
76,600 KB
testcase_14 AC 97 ms
76,584 KB
testcase_15 AC 82 ms
76,328 KB
testcase_16 AC 98 ms
76,432 KB
testcase_17 AC 114 ms
77,768 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
D=list(map(int,input().split()))
list.sort(D)
def isok(x):
    if x[0]==x[1] or x[1]==x[2] or x[0]==x[2]:
        return False
    if x[0]>x[1] and x[1]<x[2]:
        return True
    if x[0]<x[1] and x[1]>x[2]:
        return True
    return False
ans=False
pat=list(itertools.permutations(D))
for p in pat:
    for i in range(5):
        ans|=isok(p[i:i+3])
if ans:
    print('YES')
else:
    print('NO')
0