# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
706663 | Dan4Life | Self Study (JOI22_ho_t2) | C++17 | 250 ms | 11452 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define pb push_back
const int mxN = (int)3e5+10;
int n, m, a[mxN], b[mxN];
bool chk(int lim){
int tot = n*m;
for(int i = 1; i <= n; i++){
int num = min((lim+a[i]-1)/a[i], m);
int x = num*a[i]; tot-=num;
if(lim>x) tot-=((lim-x)+b[i]-1)/b[i];
if(tot<0) return 0;
}
return 1;
}
void solve(){
cin >> n >> m;
for(int i = 1; i <= n; i++) cin >> a[i];
for(int i = 1; i <= n; i++) cin >> b[i], a[i]=max(a[i],b[i]);
int l = 0, r = (int)1e18;
while(l<r){
int mid = (l+r+1)/2;
# | 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... |