結果
| 問題 | 
                            No.360 増加門松列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-10-26 10:35:26 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 17 ms / 2,000 ms | 
| コード長 | 424 bytes | 
| コンパイル時間 | 60 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 6,912 KB | 
| 最終ジャッジ日時 | 2024-12-24 04:35:37 | 
| 合計ジャッジ時間 | 1,074 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#yuki_360 import itertools import sys def kado(s): l=len(s) for i in xrange(l-2): if (s[i]<s[i+1]>s[i+2] or s[i]>s[i+1]<s[i+2]) and s[i]<s[i+2]: continue else: return False return True a=map(int,raw_input().split()) plist=list(itertools.permutations(a)) #for i in xrange(len(plist)): # print plist[i],kado(plist[i]) for i in xrange(len(plist)): if kado(plist[i])==True: print "YES" sys.exit() print "NO"