結果
| 問題 |
No.360 増加門松列
|
| コンテスト | |
| ユーザー |
mkawa2
|
| 提出日時 | 2019-12-26 22:21:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,925 bytes |
| コンパイル時間 | 160 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 44,280 KB |
| 最終ジャッジ日時 | 2024-10-05 06:42:08 |
| 合計ジャッジ時間 | 12,477 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 1 |
ソースコード
from itertools import *
from bisect import *
from math import *
from collections import *
from heapq import *
from random import *
import numpy as np
import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
dij=[(1,0),(0,1),(-1,0),(0,-1)]
def main():
def check(aa):
for a0,a1,a2 in zip(aa,aa[1:],aa[2:]):
if a0==a1 or a1==a2 or a0==a2:return False
if a0<=a1<=a2:return False
return True
dd=LI()
dd.sort()
for i in range(5):
if dd[i]==dd[i+1]==dd[i+2]:
print("NO")
exit()
small=[]
big=[]
si=-1
while len(small)<3:
si+=1
if si!=0 and dd[si]==dd[si-1]:
big.append(dd[si])
continue
small.append(dd[si])
for i in range(si+1,7):
big.append(dd[i])
aa=[]
for i in range(4):
aa.append(big[i])
if i==3:break
aa.append(small[i])
if check(aa):
print("YES")
exit()
small=[]
big=[]
si=-1
while len(small)<4:
si+=1
if si!=0 and dd[si]==dd[si-1]:
big.append(dd[si])
continue
small.append(dd[si])
for i in range(si+1,7):
big.append(dd[i])
aa=[]
for i in range(4):
aa.append(small[i])
if i==3:break
aa.append(big[i])
if check(aa):
print("YES")
exit()
print("NO")
main()
mkawa2