HDU 5066 Harry And Physical Teacher
来源:互联网 发布:廖雪峰python 编辑:程序博客网 时间:2024/05/16 10:09
这个题的话同方向的小车和球,可以把小车当做一个有速度的墙,什么物体撞到他都会原路返回,球的速度x,墙的速度y,球相对于墙速度为x-y所以返回的速度为(y-x)
加上他们都在正方向的的一个y,所以速度为2*y-x
没有提示多组数据,恶心了
#include<iostream>#include<math.h>#include<cstdio>#include<stdlib.h>#include<cstring>using namespace std;int main(){long long a,b;while(cin>>a>>b){cout<<(2*a-b)<<endl;} return 0;}
0 0
- HDU 5066 Harry And Physical Teacher 物理
- hdu 5066 Harry And Physical Teacher(数学)
- HDU 5066 Harry And Physical Teacher
- HDU 5066Harry And Physical Teacher(数学)
- HDU 5066 Harry And Physical Teacher
- HDU 5066 Harry And Physical Teacher(物理题)
- hdu 5066 Harry And Physical Teacher(Bestcoder Round #14)
- hdu 5066 Harry And Physical Teacher(物理题 弹性碰撞)
- hdu 5066 Harry And Physical Teacher(物理)
- HDOJ 5066 Harry And Physical Teacher
- HDU5066-Harry And Physical Teacher
- HDU 5066 Harry And Physical Teacher(物理 动量守恒 动能守恒)——BestCoder Round #14
- hdoj Harry And Physical Teacher 5066 (数学思想)
- Bestcoder Round 14# 1001 Harry And Physical Teacher
- BestCoder Round #14 A题 Harry And Physical Teacher
- hdu5066——Harry And Physical Teacher(物理)
- HDU 5068 Harry And Math Teacher
- hdu-5068 Harry And Math Teacher
- leetcodeOJ 537. Complex Number Multiplication
- Mac安装双系统Windows步骤问题总结
- Android View事件的分发机制
- CUDA-Ray Tracing
- 合并排序算法
- HDU 5066 Harry And Physical Teacher
- 二叉树的最大深度
- 无符号数 0 ( 0 -1 == -1 ?)
- html--1.html基础
- Java8新特性之默认方法
- Boyer-Moore算法Java实现
- 前端脚本化http
- [JZOJ5012]远行
- 2016年操作系统课程(大二下)演示程序集合