#include #include #include using namespace std; int max_height(const vector &a, const int k) { const int n = a.size(); int min_h = 0; int max_h = *max_element(a.begin(), a.end()); while (min_h <= max_h) { int h = min_h + (max_h - min_h) / 2; int count = 0; for (int i = 0; i < n; i++) { count += a[i] / h; } if (count >= k) { min_h = h + 1; } else { max_h = h - 1; } } return max_h; } int main(void) { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int k; cin >> k; cout << max_height(a, k) << endl; return 0; }