UVA 11880 Ball in a Rectanglefds
来源:互联网 发布:矩阵 方阵 编辑:程序博客网 时间:2024/05/16 01:27
运动问题,有边界,入射角等于出射角
所以x、y分别按周期变化
Description
Input: Standard Input Output: Standard Output
There is a rectangle on the cartesian plane, with bottom-left corner at (0,0) and top-right corner at (L, W). There is a ball centered at (x,y), with radius=R, shown below
At time 0, the ball starts to move along a ray with polar angle a (the angle from positive x-axis to the ray, rotating counter-clockwise). When hitting the rectangle boundary, the reflex angle always equals to the incidence angle. The ball's velocity is always v (i.e. it never changes when hitting the rectangle). Where is the center of the ball at time s?
Input
There will be at most 25 test cases, each contains a line with 8 integers L, W, x, y, R, a, v, s ( 100L, W109, 1R5, RxL - R, RyW - R, 0a < 360, 1v, s109), as stated above. The input terminates with L = W = x = y = R = a = v = s = 0, which should not be processed.Output
For each test case, output a line containing two floating-point numbers x, y, rounded to two decimal points, indicating that the center of ball will be at (x, y) at time s.Sample Input
100 100 80 10 5 90 2 23110 100 70 10 5 180 1 99990 0 0 0 0 0 0 0
Sample Output
80.00 56.0071.00 10.00
Problemsetter: Rujia Liu, Special Thanks: Yiming Li, Shamim Hafiz & Sohel Hafiz
0 0
- UVA 11880 Ball in a Rectanglefds
- UVA 11880 (Ball in a Rectangle) 平面几何
- UVA 11880 Ball in a Rectangle 几何
- uva 11880 Ball in a Rectangle(计算几何)
- UVA11880 Ball in a Rectangle
- URAL 1192. Ball in a Dream
- toj 4608 Ball in a Rectangle
- URAL 1192 Ball in a Dream(抛物线运动)
- UVA-679-DROPING BALL
- Ball Blasting Game UVA
- Trees in a Wood. UVA
- Trees in a Wood. UVA
- A simple bouncing ball
- A. Ball Game
- ROLL A BALL 小游戏
- A. Jumping Ball
- 725A Jumping Ball
- Roll a Ball
- 基于LSD算法的直线提取
- android 自定义主题样式
- 如何成为IOS大牛
- Go语言Http Server源码阅读
- 回文字符串 (动态规划,最长公共子序列)
- UVA 11880 Ball in a Rectanglefds
- Flex期中大作业实验单
- hpuoj 1673: Problem K Lexicographically Largest Substring
- Ubuntu 安装和配置SVN
- Unity5.0更新列表
- java学习之路的自我回顾1
- 第九周 项目三:分数类中的运算符重载(续)
- 自己封装UIPickerView加一个时间范围
- vector的size和capacity改变时空间分配的过程