Codeforces Round 967 (Div. 2) D. Longest Max Min Subsequence Code : D. Longest Max Min Subsequence E1. Deterministic Heap (Easy Version) Editorial : Deterministic Heap (Easy Version) Code : Deterministic Heap (Easy Version)