結果
| 問題 |
No.2976 高階多点評価
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-05 21:25:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 2,123 ms |
| コンパイル使用メモリ | 194,364 KB |
| 最終ジャッジ日時 | 2025-02-19 01:54:17 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 27 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int n; double x;
cin >> n >> x;
complex<double> xp(x, 1), xn(x, -1), I(0, 1);
auto res = (pow(xn, -n - 1) - pow(xp, -n - 1)) / (2. * I);
res *= pow(x * x + 1, n / 2. + 1);
cout << fixed << setprecision(5) << res.real() << endl;
}
}