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

这样那里错了,和过得代码对数据都一样啊!!!

Posted by 22220000 at 2009-08-08 17:40:37 on Problem 1664
#include<iostream>
#include<algorithm>
using namespace std;
int map[15][15],sign[15][15];
int main()
{
	int i,j,k,n,m;
	memset(map,0,sizeof(map));
	memset(sign,0,sizeof(sign));
	map[0][0]=1;
	for(i=1;i<=14;i++)
	{
		for(j=1;j<=14;j++)
		{
			map[j][i]=map[j-1][i-1]+map[j-i][i];
		}
	}
	for(i=1;i<=14;i++)
	{
		for(j=1;j<=14;j++)
		{
			sign[i][j]=sign[i][j-1]+map[i][j];
		}	
	}
	scanf("%d",&k);
	while(k--)
	{
		scanf("%d%d",&m,&n);
		printf("%d\n",sign[m][n]);
	}
}

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