結果
| 問題 |
No.360 増加門松列
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2018-07-26 23:14:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 434 bytes |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-01 03:29:51 |
| 合計ジャッジ時間 | 2,201 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
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 len(set(slice)) == 3 and (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')
💕💖💞