梅花桩的最多步数
Redraiment的走法
http://www.nowcoder.com/questionTerminal/24e6243b9f0446b081b1d6d32f2aa3aa
import bisect def meihuazhaung(): while True: try: a, b = int(input()), map(int, input().split()) q = [] for v in b: pos = bisect.bisect_left(q, v) if pos == len(q): q.append(v) else: q[pos] = v print(len(q)) except: break meihuazhaung()