#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
ll n, m, d, i, z, la;
cin >> n >> m >> d;
multiset<ll> s;
while (n--)
{
cin >> i;
s.insert(i);
}
while (m--)
{
cin >> i;
s.insert(i);
z = 0;
la = -d;
for (auto h : s)
{
z += max(0LL, la + d - h);
la = h;
}
if (z % 2)
cout << z / 2 << ".5 ";
else
cout << z / 2 << " ";
}
return 0;
}
# |
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 |
Execution timed out |
1570 ms |
2040 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1570 ms |
2040 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |