| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1319534 | Ghulam_Junaid | Self Study (JOI22_ho_t2) | C++20 | 190 ms | 5088 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n, m;
cin >> n >> m;
ll a[n], b[n];
for (ll i = 0; i < n; i ++)
cin >> a[i];
for (ll i = 0; i < n; i ++)
cin >> b[i];
ll mn = 2e9;
for (ll i = 0; i < n; i ++)
a[i] = max(a[i], b[i]), mn = min(mn, a[i]);
cout << mn << endl;
// ll lo = 0, hi = 2e18;
// while (hi - lo > 1){
// ll mid = (lo + hi) / 2;
// ll rest = 0, del = 0;
// for (ll i = 0; i < n; i ++){
// ll need = mid / a[i];
// if (mid % a[i]) need++;
// del += min(m, need);
// if (need > m){
// ll rem = mid - a[i] * m;
// need = rem / b[i];
// if (rem % b[i]) need++;
// rest += need;
// }
// }
// if (del + rest <= n * m)
// lo = mid;
// else
// hi = mid;
// }
// cout << lo << endl;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
