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

这样都tle???

Posted by shenfangyi at 2006-11-09 14:22:47 on Problem 2992
#include<iostream>
using namespace std;
int s[83]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431},a[432][83]={{},{},{1},{0,1},{2},{0,0,1},{1,1},{0,0,0,1},{3},{0,2},{1,0,1},{0,0,0,0,1},{2,1},{0,0,0,0,0,1},{1,0,0,1},{0,1,1},{4},{0,0,0,0,0,0,1},{1,2},{0,0,0,0,0,0,0,1},{2,0,1},{0,1,0,1},{1,0,0,0,1},{0,0,0,0,0,0,0,0,1},{3,1},{0,0,2},{1,0,0,0,0,1},{0,3},{2,0,0,1},{0,0,0,0,0,0,0,0,0,1},{1,1,1},{0,0,0,0,0,0,0,0,0,0,1},{5},{0,1,0,0,1},{1,0,0,0,0,0,1},{0,0,1,1},{2,2},{0,0,0,0,0,0,0,0,0,0,0,1},{1,0,0,0,0,0,0,1},{0,1,0,0,0,1},{3,0,1},{0,0,0,0,0,0,0,0,0,0,0,0,1},{1,1,0,1},{0,0,0,0,0,0,0,0,0,0,0,0,0,1},{2,0,0,0,1},{0,2,1},{1,0,0,0,0,0,0,0,1},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},{4,1},{0,0,0,2},{1,0,2},{0,1,0,0,0,0,1},{2,0,0,0,0,1},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},{1,3},{0,0,1,0,1},{3,0,0,1},{0,1,0,0,0,0,0,1},{1,0,0,0,0,0,0,0,0,1},{0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}};
int main()
{
	int n,k;
	while(cin>>n>>k)
	{
		if(k*2>n)k=n-k;
		long long x=1;
		for(int i=0;i<83;i++)
		{
			int b=1;
			for(int j=n;j>n-k;j--)b+=a[j][i];
			for(int j=1;j<=k;j++)b-=a[j][i];
			x*=b;
		}
		cout<<x<<endl;
	}
}

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