题目: 题目背景 161114-练习-DAY1-AHSDFZ T2 题目描述 有 N 辆列车,标记为 1,2,3,…,N.它们按照一定的次序进站,站台共有 K 个轨道,轨道遵从先进先出的原则.列车进入站台内的轨道后可以等待任意时间后出站,且所有列车不可后退.现在要使出站的顺序变为 N,N-1,N-2,…,1,询问 K 的最小值是多少.…
Bridging signals Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2582 Accepted Submission(s): 1665 Problem Description 'Oh no, they've done it again', cries the chief designer at the Waferlan…
传送门:点我 978. Longest Turbulent Subarray A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if: For i <= k < j, A[k] > A[k+1] when k is odd, and A[k] < A[k+1] when k is even; OR, for i <= k < j, A[k] > A[k+1] wh…