結果
| 問題 |
No.3362 積分!!!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-19 01:13:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 946 ms |
| コンパイル使用メモリ | 87,136 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-11-19 01:13:27 |
| 合計ジャッジ時間 | 2,147 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 WA * 2 |
| other | AC * 4 WA * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(){
int n, x[2], i, j;
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);
}
}
cout << (int)ans[1] - ans[0] << endl;
}