結果
| 問題 |
No.3362 積分!!!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-19 01:18:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 451 bytes |
| コンパイル時間 | 832 ms |
| コンパイル使用メモリ | 87,436 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-11-19 01:18:08 |
| 合計ジャッジ時間 | 1,860 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 6 WA * 8 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(){
int n, x[2], i, j, fx;
float ans[2] = {};
vector<int> k;
cin >> n >> x[0] >> x[1];
for(i=0; i<=n; i++){
cin >> j;
k.push_back(j);
}
for(i=0; i<2; i++){
for(j=n; j>=0; j--){
ans[i] += (float)k[j] / (j + 1) * pow(x[i], j + 1);
}
}
fx = ans[1] - ans[0];
cout << fx << endl;
}