QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#201265#5151. Bottle Flipnameless_story#Compile Error//C89687b2023-10-05 13:26:002023-10-05 13:26:01

Judging History

你现在查看的是最新测评结果

  • [2023-10-05 13:26:01]
  • 评测
  • [2023-10-05 13:26:00]
  • 提交

answer

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef double db;
template<class T1,class T2> bool cmin(T1 &x,const T2 &y) { if (y<x) { x=y; return 1; }return 0; }
template<class T1,class T2> bool cmax(T1 &x,const T2 &y) { if (x<y) { x=y; return 1; }return 0; }
#define all(x) (x).begin(),(x).end()
db solve(db a,db b,db x)
{
	a/=b;
	db c=a*x*x,d=x*x;
	return sqrt(d*d+c)-d;
}
const db pi=acos(-1);
int main()
{
	ios::sync_with_stdio(0); cin.tie(0);
	cout<<fixed<<setprecision(15);
	// int T; cin>>T;
	double h,r,a,b;
	cin>>h>>r>>a>>b;
	b-=a;
	double x=h/2;
	auto y=solve(a,b,x);sfg
	cerr<<y<<endl;
	db vol=(pi*r*r*y);
	cout<<vol<<'\n';
}

Details

answer.code:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include"bits/stdc++.h"
      |         ^~~~~~~~~~~~~~~
compilation terminated.