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 checkoj at 2011-02-15 13:48:31 on Problem 1169
int main()
{
	int order[5];
	scanf("%d%d%d%d%d%d%d%d",&a1,&b1,&a2,&b2,&a3,&b3,&a4,&b4);
	top=0;
	for(int mask=0;mask<16;mask++)
	{
		order[0]=1;
		order[1]=2;
		order[2]=3;
		order[3]=4;
		for(int i=0;i<24;i++)
		{
			solve(mask,order[0],order[1],order[2],order[3]);
			next_permutation(order,order+4);
		}
	}
	sort(ans,ans+top);
	top=unique(ans,ans+top)-ans;
	printf("%d\n",ans[0].S);
	for(int i=0;i<top;i++)
	{
		if(ans[i].S!=ans[0].S)break;
		printf("%d %d\n",ans[i].f1,ans[i].f2);
	}
}

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