# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
922301 |
2024-02-05T11:46:38 Z |
12345678 |
Cipele (COCI18_cipele) |
C++17 |
|
27 ms |
3060 KB |
#include <bits/stdc++.h>
using namespace std;
int n, m;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n>>m;
vector<int> a(n), b(m);
for (auto &x:a) cin>>x;
for (auto &x:b) cin>>x;
if (n>m) swap(n, m), swap(a, b);
int l=0, r=1e9;
while (l<r)
{
int md=(l+r)/2, can=1, idx=0;
for (int i=0; i<n; i++)
{
while (idx<m&&abs(b[idx]-a[i])>md) idx++;
if (idx>=m) can=0;
else idx++;
}
if (can) r=md;
else l=md+1;
}
cout<<l;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
2648 KB |
Output is correct |
2 |
Incorrect |
24 ms |
3060 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
22 ms |
2892 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
472 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
21 ms |
2568 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
2908 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
27 ms |
2388 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |