#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std; const double eps = 1e-;
const double PI = acos(-1.0);
const double INF = 1000000000000000.000; struct Point{
double x,y;
Point(double x=, double y=) : x(x),y(y){ } //构造函数
};
typedef Point Vector; Vector operator + (Vector A , Vector B){return Vector(A.x+B.x,A.y+B.y);}
Vector operator - (Vector A , Vector B){return Vector(A.x-B.x,A.y-B.y);}
Vector operator * (double p,Vector A){return Vector(A.x*p,A.y*p);}
Vector operator / (Vector A , double p){return Vector(A.x/p,A.y/p);} bool operator < (const Point& a,const Point& b){
return a.x < b.x ||( a.x == b.x && a.y < b.y);
} int dcmp(double x){
if(fabs(x) < eps) return ;
else return x < ? - : ;
}
bool operator == (const Point& a, const Point& b){
return dcmp(a.x - b.x) == && dcmp(a.y - b.y) == ;
} ///向量(x,y)的极角用atan2(y,x);
inline double Dot(Vector A, Vector B){ return A.x*B.x + A.y*B.y; }
inline double Length(Vector A) { return sqrt(Dot(A,A)); }
inline double Angle(Vector A, Vector B) { return acos(Dot(A,B) / Length(A) / Length(B)); }
double Cross(Vector A, Vector B) { return A.x*B.y - A.y * B.x; } Point read_point(){
Point A;
scanf("%lf %lf",&A.x,&A.y);
return A;
} /*************************************分 割 线*****************************************/ int main()
{
//freopen("E:\\acm\\input.txt","r",stdin);
double W,D;
Point S,T;
char s[]; scanf("%lf %lf",&W,&D);
double x,y;
scanf("%lf %lf",&x,&y);
S = Point(-x,y);
scanf("%lf %lf",&x,&y);
T = Point(-x,y);
scanf("%s",s);
int len = strlen(s); for(int i=;i<len;i++){
if(s[i] == 'F'){
S.y = -S.y;
}
else if(s[i] == 'L'){
S.x = -S.x;
}
else if(s[i] == 'B'){
S.y = *D -S.y;
}
if(s[i] == 'R'){
S.x = -*W-S.x;
}
//cout<<S.x<<" "<<S.y<<endl;
}
double ans = Length(S-T); printf("%.4lf\n",ans);
}

最新文章

  1. tomcat server.xml中文版
  2. Vue基础理论
  3. View (二) 自定义属性 自定义属性的格式详解
  4. eclipse项目中启动项目无法载入类
  5. jquery的$.extend和$.fn.extend作用及区别
  6. Nginx 1.4.7图片缓存服务器
  7. YII中路径别名
  8. 如何在一个网站或者一个页面,去书写你的JS代码
  9. FusionCharts使用问题及解决方法(二)-FusionCharts常见问题大全
  10. JAVA基础知识(一)—JAVA概述
  11. Oracle SQL*Plus命令
  12. Neo4j导入本地csv问题
  13. dedecmsv5.7 ueditor编辑器上传视频/修改,视频显示空白,解决方案
  14. GO中DEFER的理解--DEFER执行的原理
  15. 2018.12.29 codeforces 940E. Cashback(线性dp)
  16. Ajax发送POST请求对数据的封装
  17. 【读书笔记】Linux内核设计与实现(第一章&amp;第二章)
  18. java NIO系列教程1
  19. redis live 如何安装
  20. JAXB简单样例

热门文章

  1. How to hanganalyze and systemstate dumps
  2. Struts2多文件上传
  3. 利用c++操作XML,主要是内部循环方法的使用
  4. 《wc》-linux命令五分钟系列之十七
  5. jquery技巧(持续更新。。)
  6. hierarchyviewer偶然不能使用的解决方法
  7. odoo9 install
  8. 获取网络图片的大小 改变 图片色值 灰度什么的方法集合-b
  9. Junit 源码剖析(二)
  10. [原创]dm642_HPI调通并boot成功