我是靠谱客的博主 传统白开水,这篇文章主要介绍HDOJ 5066 Harry And Physical Teacher,现在分享给大家,希望可以做个参考。

题意:小车和球发生完全弹性碰撞,车的质量远大于球,求碰撞后球的速度

链接:http://acm.hdu.edu.cn/showproblem.php?pid=5066

思路:物理题,建立动能守恒方程,推导公式后求得V' = 2V - V0

注意点:无。


以下为AC代码:

Run IDSubmit TimeJudge StatusPro.IDExe.TimeExe.MemoryCode Len.LanguageAuthor
119095772014-10-19 12:12:27Accepted50660MS336K534 BG++luminous

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <vector>
#include <deque>
#include <list>
#include <cctype>
#include <algorithm>
#include <climits>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <iomanip>
#include <cstdlib>
#include <ctime>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
int main()
{
int m, n;
while ( cin >> m >> n )
{
cout << m - ( n - m ) << endl;
}
return 0;
}


最后

以上就是传统白开水最近收集整理的关于HDOJ 5066 Harry And Physical Teacher的全部内容,更多相关HDOJ内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(86)

评论列表共有 0 条评论

立即
投稿
返回
顶部