結果
| 問題 |
No.360 増加門松列
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2018-07-26 23:12:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-07-01 03:28:57 |
| 合計ジャッジ時間 | 2,045 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 7 |
ソースコード
import itertools
import sys
xs = list(map(int, input().split()))
for ps in itertools.permutations(xs, len(xs)):
kc = []
bs = []
for i in range(0, len(ps)-2):
slice = ps[i:i+3]
if max(slice) == slice[1] or min(slice) == slice[1]:
kc.append(True)
else:
kc.append(False)
bs.append(slice[0] < slice[2])
if all(kc) and all(bs):
print('YES')
sys.exit()
print('NO')
💕💖💞