| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1358043 | SulA | Self Study (JOI22_ho_t2) | C++20 | 51 ms | 988 KiB |
#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
int main() {
int n,m; cin >> n >> m;
int A[n];
for (int i = 0; i < n; cin >> A[i++]);
auto check = [&](long long x) {
long long need = 0;
for (int i = 0; i < n; i++) {
need += 1 + (x-1)/A[i];
}
return need <= 1ll*n*m;
};
long long l = 0, r = 2e18;
while (l+1 < r) {
auto mid = (l+r)/2;
if (check(mid)) l = mid;
else r = mid;
}
cout << l;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
