結果
| 問題 | No.360 増加門松列 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-01-07 02:32:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 415 bytes |
| 記録 | |
| コンパイル時間 | 328 ms |
| コンパイル使用メモリ | 82,216 KB |
| 実行使用メモリ | 70,824 KB |
| 最終ジャッジ日時 | 2026-01-07 02:32:34 |
| 合計ジャッジ時間 | 2,680 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 9 |
ソースコード
from itertools import permutations
def is_kadomatu(a, b, c):
if a == c: return False
return (a < b > c) or (a > b < c)
def solve():
for xs in permutations(DD):
for i in range(5):
if not is_kadomatu(*xs[i:i+3]):
break
else:
return True
return False
DD = list(map(int, input().split()))
if solve():
print('YES')
else:
print('NO')
norioc