|
|
вернуться в форумWA 37! If WA 37 then add this code( check: if there exist equal points ): ////////////////////// void no(){ puts("NO"); exit(0); } ////////////////////// inline bool equal_lf( const double x, const double y ){ return fabs(x-y)<=EPS; return fabs(x-y) <= EPS*max( fabs(x),fabs(y) ); } ////////////////////// int main(){ ///////////lalalalalalalal for( short i = 0; i < n; ++i ){ for( short j = i+1; j < n; ++j ){ if( equal_lf(p[i].x,p[j].x) && equal_lf(p[i].y,p[j].y) ) no(); } } Re: WA 37! For WA 12 helps either |
|
|