結果

問題 No.1385 Simple Geometry 2
ユーザー 蜜蜂蜜蜂
提出日時 2021-02-02 08:48:31
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 557 bytes
コンパイル時間 1,829 ms
コンパイル使用メモリ 165,800 KB
実行使用メモリ 8,308 KB
最終ジャッジ日時 2023-09-17 18:24:30
合計ジャッジ時間 13,874 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 3 ms
4,564 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 198 ms
4,376 KB
testcase_09 AC 204 ms
4,376 KB
testcase_10 AC 205 ms
4,380 KB
testcase_11 AC 200 ms
4,380 KB
testcase_12 AC 203 ms
4,380 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using ll = long long;
using ld = long double;
#define fi first
#define se second
#define pb push_back

const double pi=3.141592653589793;

int main(){
  int n;
  int l;
  cin>>n>>l;

  int t[n];
  for(int i=0;i<n;i++){
    cin>>t[i];     
  } 
  
  double ans=0,p;
  
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      p=2*(t[j]-t[i]);
      p/=l;
      p*=pi;
      ans+=(2*j-2*i-n)*sin(p);
    }
  }
  ans*=-3;
  ans/=n;
  ans/=n-1;
  ans/=n-2;
  
  cout<<fixed<<setprecision(15);
  cout<<ans<<endl;
}
0