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 alpc16 at 2008-06-15 18:38:45 on Problem 3412
void output()
{
	if ( n == 1 ) printf( "%.2lf\n", alpha );
	else
	{
		int i;
		double sa = sin( alpha );
		double sb;
		for ( i = 2; i <= n; i ++ )
		{
			sb = a[ i - 1 ] * sa / a[ i ];
			if ( dblcmp( sb, 0 ) < 0 || dblcmp( sb, 1 ) > 0 )
			{
				printf( "NO\n");
				break;//这样写是AC的
			}
			sa = sb;
		}
		printf( "%.2lf\n", asin( sb ) );
                //但实际上这里还有个输出啊,如果是break
	}
}
所以我认为测试数据里没有NO的情况,但是当我把NO改为YES提交却WA,这说明数据里还是有NO的情况啊,这是怎么一回事呢?

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