Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
1.5 kB
0
Indexable
Never
#include<iostream>
using namespace std;
int T,N;
double x[11],m[11];

//int checkKC(int mid,int l,int r,int m1,int m2 ){
//	int f1=m1/((mid-l)*(mid-l));
//	int f2=m2/((mid-r)*(mid-r));
//	if(f1-f2)
//}
int idx;
double res[1001];
double abs(double a,double b){
	return (a>b)?a-b:b-a;
}
void backtrack(int x,double l,double r,double ml,double mr){
	//double mid=(l+r)/2;
	//double f1=ml/((mid-l)*(mid-l));
	//double f2=mr/((mid-r)*(mid-r));

	//if(abs(f1,f2)<0.000000001) {
	//	res[idx]=mid;
	//	idx++;
	//	return;
	//}
	//else if(f1>f2){
	//	backtrack(mid,r,ml,mr);
	//}
	//else if(f2>f1){
	//	backtrack(l,mid,ml,mr);
	//}

	for
}
int main(){
	freopen("input.txt","r",stdin);

	for (int t=1;t<=10;t++){
		cin>>N;
		idx=0;
		for (int i=0;i<N;i++){
			double a;
			cin>>a;
			x[i]=a;
		}
		for (int i=0 ;i<N;i++){
			double a;
			cin>>a;
			m[i]=a;
		}
		for (int i=0;i<N-1;i++){
			backtrack(i,x[i],x[i+1],m[i],m[i+1]);
		}
		cout<<"#"<<t<<" ";	
		cout.precision(10);
		for (int i=0;i<N-1;i++){
			cout<<fixed<<res[i]<<" ";
		}
		cout<<endl;
	}

	return 0;
}

2
1 2 1 1
2
1 2 1 1000
2
457 468 333 321
3
1 2 3 1 2 1
4
2 3 5 7 3 2 7 5
5
3 11 12 19 29 542 661 450 521 366	
6
42 75 88 94 113 144 669 551 355 344 294 155
7
62 86 279 323 363 516 579 810 749 736 297 136 107 52
8
10 34 64 73 93 97 101 122 466 463 441 373 315 292 225 83
10
9 14 38 39 48 73 179 190 207 302 560 497 640 722 437 259 449 470 709 520
Leave a Comment