답안 #1039539

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1039539 2024-07-31T03:58:17 Z pcc Measures (CEOI22_measures) C++17
35 / 100
59 ms 6992 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long

const ll mxn = 2e5+10;
ll 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;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 34 ms 4180 KB Output is correct
2 Correct 49 ms 6228 KB Output is correct
3 Correct 45 ms 6740 KB Output is correct
4 Correct 32 ms 4692 KB Output is correct
5 Correct 43 ms 5968 KB Output is correct
6 Correct 33 ms 4952 KB Output is correct
7 Correct 37 ms 5968 KB Output is correct
8 Correct 39 ms 4688 KB Output is correct
9 Correct 32 ms 4692 KB Output is correct
10 Correct 59 ms 6992 KB Output is correct
11 Correct 37 ms 5384 KB Output is correct
12 Correct 47 ms 6484 KB Output is correct
13 Correct 32 ms 4688 KB Output is correct
14 Correct 46 ms 6480 KB Output is correct
15 Correct 47 ms 6484 KB Output is correct
16 Correct 30 ms 4184 KB Output is correct
17 Correct 58 ms 5940 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 34 ms 4180 KB Output is correct
2 Correct 49 ms 6228 KB Output is correct
3 Correct 45 ms 6740 KB Output is correct
4 Correct 32 ms 4692 KB Output is correct
5 Correct 43 ms 5968 KB Output is correct
6 Correct 33 ms 4952 KB Output is correct
7 Correct 37 ms 5968 KB Output is correct
8 Correct 39 ms 4688 KB Output is correct
9 Correct 32 ms 4692 KB Output is correct
10 Correct 59 ms 6992 KB Output is correct
11 Correct 37 ms 5384 KB Output is correct
12 Correct 47 ms 6484 KB Output is correct
13 Correct 32 ms 4688 KB Output is correct
14 Correct 46 ms 6480 KB Output is correct
15 Correct 47 ms 6484 KB Output is correct
16 Correct 30 ms 4184 KB Output is correct
17 Correct 58 ms 5940 KB Output is correct
18 Incorrect 36 ms 6100 KB Output isn't correct
19 Halted 0 ms 0 KB -