FWIW iSSH on iOS has good X support.
root:censored
We can still read /etc/ssh/ssh_host_rsa_key, etc. #include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
using namespace std;
int main() {
int K;
cin >> K;
vector<int> numbers((istream_iterator<int>(cin)),
istream_iterator<int>());
nth_element(numbers.begin(), numbers.begin() + K, numbers.end(),
greater<int>());
for (int i = 0; i < K; ++i) {
cout << numbers[i] << ' ';
}
cout << '\n';
}
Input: 5
1 9 1 3 7 8 2 11 2 5 5 9 1 7
Output: 7 9 9 11 8
Note: the output is not sorted. ==== solution 1 =====
(0, 2, 5, 7, 9, 4, 8, 1, 3, 6)
terminate called after throwing an instance of '__shedskin__::TypeError*'
Aborted