Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:呵呵,真的是好简单啊,这样就过了

Posted by BU at 2005-11-12 23:24:42 on Problem 1398
In Reply To:Re:呵呵,真的是好简单啊,这样就过了 Posted by:PC0400322032 at 2004-07-22 01:37:43
> #include <stdio.h>
> void main(void)
> {
> 	int g[101][101];
> 	int t,n,k;
> 	int i,j,l;
> 	scanf("%d",&t);
> 	while(t-->0)
> 	{
> 		scanf("%d %d",&n,&k);
> 		for(i=0;i<n;i++)
> 			scanf("%d",&g[0][i]);
> 		for(j=1;j<n;j++)
> 			for(l=0;l<n-j;l++)
> 				g[j][l]=g[j-1][l+1]-g[j-1][l];
> 		for(l=1;l<=k;l++)
> 			g[n-1][l] = g[n-1][0];
> 		for(i=n-2;i>=0;i--)
> 			for(l=0;l<k;l++)
> 				g[i][n-i+l] = g[i][n-i+l-1] + g[i+1][n-i+l-1];
> 		for(i=0;i<k;i++)
> 			printf("%d ",g[0][i+n]);
> 		printf("\n");
> 	}
> }
等距离节点的NEWTON插值是不是可以


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator