# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1039538 |
2024-07-31T03:57:32 Z |
pcc |
Measures (CEOI22_measures) |
C++17 |
|
35 ms |
6488 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mxn = 2e5+10;
int N,M,D;
ll mx = -1e18;
ll arr[mxn];
ll l = 0,r = 3e15;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cin>>N>>M>>D;
assert(!N);
D<<=1;
for(int i = 0;i<M;i++){
cin>>arr[i];
arr[i]<<=1;
r = 3e15;
while(l != r){
ll mid = (l+r)>>1;
if(mx<=arr[i]+mid*2-D*i)r = mid;
else l = mid+1;
}
mx = max(mx,arr[i]-D*i);
cout<<(l>>1)<<(l&1?".5 ":" ");
}
cout<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
604 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
604 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
4944 KB |
Output is correct |
2 |
Incorrect |
35 ms |
6488 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
4944 KB |
Output is correct |
2 |
Incorrect |
35 ms |
6488 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |