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

怎么会compile error呢?

Posted by juventus at 2007-11-10 23:42:16 on Problem 1166
#include <stdio.h>
int mov[9][9]={{1,1,0,1,1,0,0,0,0},{1,1,1,0,0,0,0,0,0},{0,1,1,0,1,1,0,0,0},
				{1,0,0,1,0,0,1,0,0},{0,1,0,1,1,1,0,1,0},{0,0,1,0,0,1,0,0,1},
				{0,0,0,1,1,0,1,1,0},{0,0,0,0,0,0,1,1,1},{0,0,0,0,1,1,0,1,1}};
int min=28,result[9]={0,0,0,0,0,0,0,0,0};
void main()
{
	int clockTime[9];
	for (int i=0;i<9;i++)
	{
		scanf("%d",&clockTime[i]);
	}
	int moveused[9];
	for (moveused[0]=0;moveused[0]<=3;moveused[0]++)
	{
		for (moveused[1]=0;moveused[1]<=3;moveused[1]++)
		{
			for (moveused[2]=0;moveused[2]<=3;moveused[2]++)
			{
				for (moveused[3]=0;moveused[3]<=3;moveused[3]++)
				{
					for (moveused[4]=0;moveused[4]<=3;moveused[4]++)
					{
						for (moveused[5]=0;moveused[5]<=3;moveused[5]++)
						{
							for (moveused[6]=0;moveused[6]<=3;moveused[6]++)
							{
								for (moveused[7]=0;moveused[7]<=3;moveused[7]++)
								{
									for (moveused[8]=0;moveused[8]<=3;moveused[8]++)
									{
										int temp=0;
										for (int i=0;i<9;i++) //判断是否已拨正
										{
											temp=clockTime[i];
											for (int j=8;j>=0;j--)
											{
												temp+=moveused[j]*mov[j][i];
											}
											if (temp%4!=0) break;
										}
										if (i==9)
										{
											int temporory=0;
											for (int j=0;j<9;j++)
											{
												if (moveused[j]!=0) temporory++;
											}
											if (temporory<=min)
											{
												min=temporory;
												for (i=0;i<9;i++) result[i]=moveused[i];
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	for (int k=0;k<9;k++)
	{
		for (int m=0;m<result[k];m++)
		{
			printf("%d ",k+1);
		}
	}
	printf("\n");
}
难道POJ变编译器了?

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