結果
問題 | No.360 増加門松列 |
ユーザー |
|
提出日時 | 2021-09-14 02:41:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 77,240 KB |
最終ジャッジ日時 | 2024-06-26 04:58:09 |
合計ジャッジ時間 | 3,091 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 13 |
ソースコード
import itertoolsD=list(map(int,input().split()))list.sort(D)def isok(x):if x[0]==x[1] or x[1]==x[2] or x[0]==x[2]:return Falseif x[0]>x[1] and x[1]<x[2]:return Trueif x[0]<x[1] and x[1]>x[2]:return Truereturn Falseans=Falsepat=list(itertools.permutations(D))for p in pat:for i in range(5):ans|=isok(p[i:i+3])if ans:print('YES')else:print('NO')