19-11-12-Ⅎ

好了,就Day2。

为什么看起来……不难?

很迷,文件名写对但是没收上去??

……

不管了,仿佛丢了$130$?

ZJ:

挂个:

14
Miemeng 100
00:00:01
50
00:00:03
80
00:00:03
230
00:00:03

但是事实上被玄学了。

39 Miemng 100 0 0 100

我写对了吧?

仿佛并没有问题。

但是……

我×为什么我在文件名前面写了一个空格啊,这谁扛的住啊

这种玄学问题早发现为好,

卒。

一定要用 find 检查文件名啊,不要只肉眼看!

忠告大家。

TJ:

T1

防止言而无信,先写个无脑T1的。

由各种物理公式可以得到结果。

于是:

记得翻库粘$pi$,不然会被卡精。

//physics

#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdio>
#include <cmath>
#define LF double

using namespace std;
const LF eps=1e-7,
		 PI=3.1415926535897932384626433832795029L;
LF theta,v,d,g;
LF ans;

int main(){
#ifndef LOCAL
	freopen("physics.in" ,"r",stdin);
	freopen("physics.out","w",stdout);
#endif
	ios_base::sync_with_stdio(false);
//	cout<<sin(30.0/360.0*2*PI)<<endl;
	int T;
	cin>>T;
	while(T--){
		ans=0;
		cin>>theta>>v>>d>>g;
		theta=theta/360.0*2*PI;
//		cout<<sin(theta)<<endl;
		LF dat=sin(theta)/g*2*cos(theta);
		while(v>eps){
//			cout<<v*sin(theta)<<endl;
			ans+=v*v;
			v=v*d;
		}
		cout<<fixed<<setprecision(5)<<ans*dat<<endl;
	}
}
原文地址:https://www.cnblogs.com/kalginamiemeng/p/Exam20191112.html