Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
发现一个很怪异的情况!!!!!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator