結果

問題 No.1319 最強とんがりコーン
ユーザー umezoumezo
提出日時 2020-12-16 02:11:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 607 bytes
コンパイル時間 1,947 ms
コンパイル使用メモリ 201,588 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 08:50:27
合計ジャッジ時間 32,935 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 447 ms
4,348 KB
testcase_03 WA -
testcase_04 AC 332 ms
4,348 KB
testcase_05 AC 437 ms
4,348 KB
testcase_06 AC 445 ms
4,348 KB
testcase_07 AC 463 ms
4,348 KB
testcase_08 AC 443 ms
4,348 KB
testcase_09 AC 436 ms
4,348 KB
testcase_10 AC 524 ms
4,348 KB
testcase_11 WA -
testcase_12 AC 446 ms
4,348 KB
testcase_13 AC 456 ms
4,348 KB
testcase_14 WA -
testcase_15 AC 452 ms
4,348 KB
testcase_16 AC 481 ms
4,348 KB
testcase_17 AC 417 ms
4,348 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 301 ms
4,348 KB
testcase_23 AC 303 ms
4,348 KB
testcase_24 AC 302 ms
4,348 KB
testcase_25 AC 309 ms
4,348 KB
testcase_26 AC 304 ms
4,348 KB
testcase_27 AC 302 ms
4,348 KB
testcase_28 AC 300 ms
4,348 KB
testcase_29 AC 301 ms
4,348 KB
testcase_30 WA -
testcase_31 AC 303 ms
4,348 KB
testcase_32 WA -
testcase_33 AC 369 ms
4,348 KB
testcase_34 WA -
testcase_35 AC 308 ms
4,348 KB
testcase_36 AC 304 ms
4,348 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 330 ms
4,348 KB
testcase_40 WA -
testcase_41 AC 526 ms
4,348 KB
testcase_42 AC 497 ms
4,348 KB
testcase_43 AC 518 ms
4,348 KB
testcase_44 AC 495 ms
4,348 KB
testcase_45 AC 527 ms
4,348 KB
testcase_46 AC 437 ms
4,348 KB
testcase_47 AC 511 ms
4,348 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 AC 514 ms
4,348 KB
testcase_51 AC 527 ms
4,348 KB
testcase_52 AC 519 ms
4,348 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 496 ms
4,348 KB
testcase_56 AC 522 ms
4,348 KB
testcase_57 AC 528 ms
4,348 KB
testcase_58 AC 527 ms
4,348 KB
testcase_59 WA -
testcase_60 AC 281 ms
4,348 KB
testcase_61 AC 280 ms
4,348 KB
testcase_62 AC 281 ms
4,348 KB
testcase_63 AC 281 ms
4,348 KB
testcase_64 AC 443 ms
4,348 KB
testcase_65 AC 444 ms
4,348 KB
testcase_66 AC 280 ms
4,348 KB
testcase_67 AC 299 ms
4,348 KB
testcase_68 WA -
testcase_69 AC 299 ms
4,348 KB
testcase_70 AC 505 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for (int i=0;i < (int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;

#include <bits/stdc++.h>
using namespace std;

double r,h,d;
double f(double x) {
  return 2*r*r/(h*h)*x*x*acos(d*h/(2*r*x))-d*r/h*x*sqrt(4*r*r*x*x-d*d*h*h)/(2*r*x);
}

int main() {
  cin>>r>>h>>d;
  
  double A=d*h/(2*r);
  double B=h;
  double N=10000000;

  const double delta = (B - A) / N;
  double value = 0.0;
    
  for(int i=0; i<N; i++) {
    double x = A + i * delta;      
    value += ( f(x) + f(x+delta) ) * delta / 2.0;
  }
  cout<<fixed<<setprecision(10)<<value<<endl;
    
  return 0;
}
0