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

这样不就ACle

Posted by georgezhang at 2007-09-11 02:39:11 on Problem 1664
#include<iostream.h>
int a[10][10]={1,1,1,1,1,1,1,1,1,1,
1,2,2,3,3,4,4,5,5,6,
1,2,3,4,5,7,8,10,12,14,
1,2,3,5,6,9,11,15,18,23,
1,2,3,5,7,10,13,18,23,30,
1,2,3,5,7,11,14,20,26,35,
1,2,3,5,7,11,15,21,28,38,
1,2,3,5,7,11,15,22,29,40,
1,2,3,5,7,11,15,22,30,41,
1,2,3,5,7,11,15,22,30,42};
int main()
{
	int i,t,m,n;
	cin>>t;
	for(i=0;i<t;i++)
	{
		cin>>n>>m;
		cout<<a[m-1][n-1]<<endl;
	}
	return 0;

}

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