QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#723943 | #2628. Self Study | ModyKachef# | 0 | 10ms | 3888kb | C++23 | 544b | 2024-11-08 04:17:29 | 2024-11-08 04:17:31 |
Judging History
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);
doWork();
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 0ms
memory: 3856kb
input:
1 1 548641561 724453206
output:
724453206
result:
ok single line: '724453206'
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 3808kb
input:
2 1 80304386 1597 1258971 98815137
output:
1258971
result:
wrong answer 1st lines differ - expected: '80304386', found: '1258971'
Subtask #2:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 0ms
memory: 3496kb
input:
3 3 430074929 299686894 507918575 430074929 299686894 507918575
output:
1000000000
result:
wrong answer 1st lines differ - expected: '1015837150', found: '1000000000'
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Wrong Answer
Test #54:
score: 0
Wrong Answer
time: 10ms
memory: 3888kb
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:
1000000000
result:
wrong answer 1st lines differ - expected: '1649349400858800', found: '1000000000'
Subtask #5:
score: 0
Skipped
Dependency #1:
0%