public class Solution {
    public int[] MaxSubsequence(int[] nums, int k) {
        var pq = new PriorityQueue<int, int>();
 
        for (int i = 0; i < nums.Length; i++) {
            pq.Enqueue(i, nums[i]);
            if (pq.Count > k) pq.Dequeue();
        }
 
        int[] indices = new int[k];
 
        for (int i = 0; i < k; i++)
            indices[i] = pq.Dequeue();
 
        Array.Sort(indices); // restore original order
 
        return indices.Select(i => nums[i]).ToArray();
    }
}

We have a min heap of index of nums and value of nums.
We fill the min heap, such that it has k largest elements.

Now, we empty the heap in indices array, but we need to sort the indices to get the original order (for subsequence).

Then we return the actual values for those indices.