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 1360. Philosophical Dispute

WA5
Posted by kilik 7 Dec 2013 01:52
#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int main()
{
    double t = 0;
    double eps;
    double x, y;
    cin>>x>>y>>eps;


    eps=eps*0.001;
    while(1)
    {
        double c = cos(t) - y;
        double d = sin(sqrt(t)) - x ;
        if( c*c+d*d > eps/2)
            t+=0.007;
        else
        {
            break;
        }
    }
    cout<<fixed<<setprecision(5)<<t;
    return 0;
}
Can someone tell what is wrong or give some tests?(my mail kilik94@yandex.ru) Thanks in advance!

Edited by author 07.12.2013 01:58
Re: WA5
Posted by b108 29 Jan 2014 18:34
Why "> eps/2" ? May be "> eps**2"?