# Nineth Week 10.26---11.1

Source: Internet
Author: User

---------10.26

The CF is rolling again--

It's too stupid to be rough------

All Right--->_<

CF 591 D

Http://codeforces.com/problemset/problem/591/D

Look at the stick inside the puzzle, said is to change the reference system, the starting point as fixed, and then two minutes

Later wrote the next unchanged reference system, also can

There should be no difference,,,

`1#include <cstdio>2#include <cstring>3#include <iostream>4#include <algorithm>5#include <vector>6 using namespacestd;7 8 intx1,y1,x2,y2,v,t;9 intVx,vy,wx,wy;Ten Const intINF = (1<< -)-1;  One  A intOkDoublex) { -     DoubleX3,y3; -     if(x <=T) { thex3 =1.0*x1 + x*VX; -Y3 =1.0*y1 + x*vy; -     } -     if(X >T) { +x3 =1.0*x1 + T*VX + (x-t) *WX; -Y3 =1.0*y1 + T*vy + (x-t) *WY; +     } A     Doubledis = (x3-x2) * (X3-X2) *1.0+ (y3-y2) * (y3-y2) *1.0; at     returnDis >= v*v*x*x*1.0; - } -  - voidsolve () { -     DoubleL =0.0, r =1.0*Inf,mid; -      for(inti =0; I <= +; i++){ inMid = (l+r) *0.5; -         if(OK (mid)) L =mid; to         ElseR =mid; +          -     //printf ("L =%lf r =%lf mid =%lf\n", l,r,mid); the     } *printf"%.16lf\n", L); \$ } Panax Notoginseng  - intMain () { the      while(SCANF ("%d%d", &x1,&y1)! =EOF) { +scanf"%d%d",&x2,&y2); Ascanf"%d%d",&v,&T); thescanf"%d%d",&vx,&vy); +scanf"%d%d",&wx,&WY); -          \$ solve (); \$          -     } -     return 0; the}`
View Code

Nineth Week 10.26---11.1

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.