ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1768. Circular Strings

WA 37!
Posted by IgorKoval(from Pskov) 7 Oct 2011 02:13
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!
Posted by [SESC USU] Zhirov Eugene 6 Feb 2012 23:54
For WA 12 helps either