QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#723939 | #2628. Self Study | ModyKachef# | 0 | 0ms | 3816kb | C++23 | 545b | 2024-11-08 04:12:48 | 2024-11-08 04:12:49 |
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
void doWork(){
int n , m;
cin >> n >> m;
vector<int> a(n) , b(n);
for (int i = 0 ; i < n; i++) cin >> a[i];
for (int i = 0 ; i < n ; i++) cin >> b[i];
int l = 0 , r = 1e9 , md;
while(l<=r){
md = (l+r)/2;
int sum = 0 ;
for (int i = 0 ; i < n ; i++){
sum += (md + b[i]-1)/b[i];
}
if (sum <= n*m) l = md+1;
else r = md-1;
}
cout << l-1;
}
signed main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cout << '\n';
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3524kb
input:
1 1 548641561 724453206
output:
result:
wrong answer 1st lines differ - expected: '724453206', found: ''
Subtask #2:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 0ms
memory: 3552kb
input:
3 3 430074929 299686894 507918575 430074929 299686894 507918575
output:
result:
wrong answer 1st lines differ - expected: '1015837150', found: ''
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Wrong Answer
Test #54:
score: 0
Wrong Answer
time: 0ms
memory: 3816kb
input:
46277 26082660 216820392 975920171 670198908 751879346 785464410 137803695 990316039 136082781 508319725 285053836 962754829 189537126 843451157 603648162 288458523 785309345 169328756 469187125 338962865 683500991 389745945 300198265 425154931 243946562 947186175 802786983 215106495 843125200 25944...
output:
result:
wrong answer 1st lines differ - expected: '1649349400858800', found: ''
Subtask #5:
score: 0
Skipped
Dependency #1:
0%