結果
| 問題 |
No.881 sin(x)/xの和
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2019-09-02 10:22:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 478 bytes |
| コンパイル時間 | 2,421 ms |
| コンパイル使用メモリ | 180,740 KB |
| 実行使用メモリ | 13,880 KB |
| 最終ジャッジ日時 | 2024-06-26 21:04:22 |
| 合計ジャッジ時間 | 16,232 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 22 TLE * 1 |
ソースコード
#pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri();
long double ans = 0;
for (int i = 0; i < n; i++) {
long double x, a;
scanf("%Lf%Lf", &x, &a);
long double res = sin(x) / x;
for (int j = 1; j <= 25000; j++) res += sin(x + j) / (x + j) + sin(x - j) / (x - j);
ans += res * a;
}
printf("%.12Lf\n", ans);
return 0;
}
QCFium