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

Re:想知道这题这么做的~~~ 麻烦ac了的人说说

Posted by 980616701 at 2009-04-09 20:28:08 on Problem 2641
In Reply To:想知道这题这么做的~~~ 麻烦ac了的人说说 Posted by:liangzhirong at 2005-10-14 10:15:03
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
const double Pi=3.141592653;
int main()
{
    double a,b,s,m,n;
    while(cin>>a>>b>>s>>m>>n)
    {
        double degree1,degree2,v;
        if(a==0&&b==b&&s==0&&m==0&&n==0)break;
        degree1=atan(n*b/(m*a));
        v=(b*n)/(sin(degree1)*s);
        degree2=degree1/Pi*180.0;
        cout<<fixed<<setprecision(2)<<degree2<<' '<<v<<endl;
    }
    return 0;
}
就是把速度分解一下,简单的高中物理!无论垂直还是水平运动,每折两次来回都是长或宽的2倍,我是用C++写的,47ms,那位大牛有更好的方法,还望多多指教!

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