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:这个*2.应该是这样的。。

Posted by 1110310214 at 2013-05-01 15:22:03 on Problem 2467 and last updated at 2013-05-01 15:22:53
In Reply To:顶一下,牛人来解释一下,这个*2........ Posted by:bluewind at 2006-04-15 19:57:06
The plow can clear exactly one lane of a road in a single pass.
All roads are perfectly straight, with one lane in each direction。
所一一条路需要来回各走一次才能清理完。因此车一直在雪上行走。


#include <cstdio>
#include <cmath>
int main()
{
    char line[256];
    while(gets(line) != NULL)
    {
        double d = 0;
        double bx, by, ex, ey;
        while(gets(line) != NULL && line[0] != 0)
        {
            sscanf(line, "%lf %lf %lf %lf", &bx, &by, &ex, &ey);
            d += sqrt((bx-ex)*(bx-ex)+(by-ey)*(by-ey));
        }
        int t = (int)(d/1000*2/20*60 + 0.5);
        printf("%d:%02d\n", t/60, t%60);
    }
    return 0;
}

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