QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#501158#5151. Bottle FlipzmrzmrCompile Error//C++20557b2024-08-02 14:56:202024-08-02 14:56:20

Judging History

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

  • [2024-08-02 14:56:20]
  • 评测
  • [2024-08-02 14:56:20]
  • 提交

answer

#include<bitsdc++.h>
using namespace std;
#define int long long

void solve()
{
    double a,b,p1,p2,h,r,c,x,t;
    cin >> h >> r >> p1 >> p2;
    a = p1 * h * h;
    b = p1 * h;
    c = abs(p1 - p2);
    x = (-2 * b * c + sqrt(4.0 * b * b * c * c + 4.0 * a * c * c * c) ) / (2.0 * c * c);
    t = (a + c * x * x) / (b + c * x) / 2.0;
    printf("%.15lf\n",t);
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int T = 1;
    //cin >> T;
    while(T--) {
        solve();
    }
    return 0;
}

Details

answer.code:1:9: fatal error: bitsdc++.h: No such file or directory
    1 | #include<bitsdc++.h>
      |         ^~~~~~~~~~~~
compilation terminated.