結果

問題 No.360 増加門松列
ユーザー TawaraTawara
提出日時 2016-04-18 22:39:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 6,620 KB
実行使用メモリ 6,128 KB
最終ジャッジ日時 2023-08-25 18:37:27
合計ジャッジ時間 1,316 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,128 KB
testcase_01 AC 16 ms
6,036 KB
testcase_02 AC 10 ms
6,084 KB
testcase_03 AC 11 ms
5,956 KB
testcase_04 AC 14 ms
6,084 KB
testcase_05 AC 15 ms
6,032 KB
testcase_06 AC 17 ms
5,952 KB
testcase_07 AC 15 ms
5,964 KB
testcase_08 AC 14 ms
6,032 KB
testcase_09 AC 15 ms
6,088 KB
testcase_10 AC 12 ms
5,980 KB
testcase_11 AC 11 ms
5,976 KB
testcase_12 AC 14 ms
6,068 KB
testcase_13 AC 10 ms
5,984 KB
testcase_14 AC 11 ms
5,952 KB
testcase_15 AC 15 ms
5,984 KB
testcase_16 AC 10 ms
5,976 KB
testcase_17 AC 11 ms
5,976 KB
testcase_18 AC 15 ms
6,064 KB
testcase_19 AC 15 ms
6,032 KB
testcase_20 AC 14 ms
5,968 KB
testcase_21 AC 15 ms
5,956 KB
権限があれば一括ダウンロードができます

ソースコード

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