提出 #74381694


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
int n, l, t[3010];
constexpr long double pi = 3.14159265358979323846264L;
int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> n >> l;
    for (int i = 1; i <= n; ++i)cin >> t[i];
    long double x = 0, y = 0;
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j){
            int ct = j - i - 1;
            long double tmp = pi * (t[i] + t[j]) / l;
            long double S, C;
            __builtin_sincosl(tmp, &S, &C);
            x += C * (n - 2 * ct - 2), y += S * (n - 2 * ct - 2);
        }
    x /= 1ll * n * (n - 1) * (n - 2) / 6;
    y /= 1ll * n * (n - 1) * (n - 2) / 6;
    cout << fixed << setprecision(20) << x << " " << y << "\n";
    return 0;
}

提出情報

提出日時
問題 D - Incenters
ユーザ szt100309
言語 C++23 (GCC 15.2.0)
得点 1000
コード長 775 Byte
結果 AC
実行時間 747 ms
メモリ 4288 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 1000 / 1000
結果
AC × 3
AC × 27
セット名 テストケース
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, s1.txt, s2.txt, s3.txt
ケース名 結果 実行時間 メモリ
01.txt AC 707 ms 4132 KiB
02.txt AC 704 ms 4248 KiB
03.txt AC 686 ms 4196 KiB
04.txt AC 700 ms 4136 KiB
05.txt AC 698 ms 4264 KiB
06.txt AC 687 ms 4036 KiB
07.txt AC 700 ms 3972 KiB
08.txt AC 704 ms 4240 KiB
09.txt AC 705 ms 4136 KiB
10.txt AC 706 ms 4120 KiB
11.txt AC 699 ms 4220 KiB
12.txt AC 694 ms 4220 KiB
13.txt AC 704 ms 4240 KiB
14.txt AC 704 ms 4176 KiB
15.txt AC 653 ms 4196 KiB
16.txt AC 645 ms 4100 KiB
17.txt AC 659 ms 4032 KiB
18.txt AC 653 ms 4288 KiB
19.txt AC 143 ms 3924 KiB
20.txt AC 143 ms 4232 KiB
21.txt AC 730 ms 4004 KiB
22.txt AC 747 ms 4180 KiB
23.txt AC 1 ms 3992 KiB
24.txt AC 1 ms 4004 KiB
s1.txt AC 1 ms 4160 KiB
s2.txt AC 1 ms 4144 KiB
s3.txt AC 1 ms 4160 KiB