結果
問題 | No.360 増加門松列 |
ユーザー |
![]() |
提出日時 | 2020-12-18 05:03:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 759 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 81,872 KB |
実行使用メモリ | 73,496 KB |
最終ジャッジ日時 | 2024-09-21 08:54:27 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import sys from itertools import permutations sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) D = LI() for p in list(permutations([i for i in range(7)],7)): X = [D[p[i]] for i in range(7)] for i in range(5): x,y,z = X[i:i+3] if not (x < z < y or y < x < z): break else: print('YES') break else: print('NO')