#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,k;
cin>>n>>m>>k;
vector<int> arr(n);
vector<int> barr(m);
for (int i = 0; i < n; ++i)
{
cin>>arr[i];
}
for (int i = 0; i < m; ++i)
{
cin>>barr[i];
}
int minel = -1;
int maxel = -1;
int crr = 0;
function<void(int)> add = [&](int x)->void{
crr++;
if (minel==-1) minel=x;
if (maxel==-1) maxel=x;
minel=min(minel,x);
maxel=max(maxel,x);
};
for (int i = 0; i < n; ++i)
{
add(arr[i]);
}
for (int i = 0; i < m; ++i)
{
add(barr[i]);
int hh = (crr-1)*k-(maxel-minel);
cout<<hh/2;
if (hh%2) cout<<".5";
cout<<" ";
}
cout<<endl;
}
# |
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 |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
72 ms |
3408 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
72 ms |
3408 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |