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

为什么WA啊?求测试数据!

Posted by adamgic at 2005-07-27 15:01:42 on Problem 2508
#include <iostream>
#include <math.h>
#include <conio.h>
using namespace std;
int main()
{
    freopen("2508.in","r",stdin);
    double r,h;
    double d1,A1,d2,A2;
    double R;
    double A;
    double dis;
    while(cin>>r>>h>>d1>>A1>>d2>>A2)
    {
        R=sqrt(r*r+h*h);
        A=(A1-A2);
        if(A>180)A-=180;
        A=A*r/R;
        if(A<0)A=A*(-1);
        dis=sqrt(d1*d1+d2*d2-2*d1*d2*cos(A/360*3.14159265897*2));
        printf("%.2f\n",dis);
    }    
    getch();
}    

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