結果

問題 No.3362 積分!!!
コンテスト
ユーザー Tyto alba
提出日時 2025-11-19 21:14:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 1,056 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-19 21:14:52
合計ジャッジ時間 2,871 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 11 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main(){
    int n, x[2], i, j;
    long long fx;
    double 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] += (double)k[j] / (j + 1) * pow(x[i], j + 1);
        }
    }

    fx = ans[1] - ans[0];
    cout << fx << endl;

}
0