結果
| 問題 |
No.1385 Simple Geometry 2
|
| コンテスト | |
| ユーザー |
蜜蜂
|
| 提出日時 | 2021-02-02 08:48:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 1,472 ms |
| コンパイル使用メモリ | 167,188 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-04 12:55:36 |
| 合計ジャッジ時間 | 10,796 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 1 -- * 54 |
ソースコード
#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;
}
蜜蜂