結果

問題 No.360 増加門松列
ユーザー TawaraTawara
提出日時 2016-04-18 22:38:05
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-15 03:39:57
合計ジャッジ時間 1,094 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 12 ms
6,944 KB
testcase_03 AC 13 ms
6,940 KB
testcase_04 WA -
testcase_05 AC 17 ms
6,940 KB
testcase_06 WA -
testcase_07 AC 15 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 15 ms
6,940 KB
testcase_10 AC 10 ms
6,944 KB
testcase_11 AC 10 ms
6,944 KB
testcase_12 WA -
testcase_13 AC 11 ms
6,940 KB
testcase_14 AC 11 ms
6,940 KB
testcase_15 AC 15 ms
6,940 KB
testcase_16 AC 10 ms
6,940 KB
testcase_17 AC 11 ms
6,944 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
6,944 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations as perm
def iskadomatsu(a,b,c):
	return a != c and (a > b and c > b or b > a and b > c)
D = map(int,raw_input().split())
for P in perm(D,7):
	if all(iskadomatsu(*P[i:i+3]) for i in xrange(5)):
		print "YES"
		break
else:
	print "NO"
0