結果

問題 No.3362 積分!!!
コンテスト
ユーザー memin
提出日時 2025-11-17 22:38:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,516 bytes
コンパイル時間 2,007 ms
コンパイル使用メモリ 197,876 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-17 22:38:18
合計ジャッジ時間 5,048 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 5 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll = long long;
using pp = pair<int,int>;
#define rep(i, n) for (i = 0; (i) < (n); ++(i))
#define reps(i, a, n) for (i = (a); (i) < (n); ++(i))
#define rrep(i, n) for (i = (n-1); (i) >= (0); --(i))
#define all(a) (a).begin(), (a).end()
#define oor(a,b,h,w) (a<0||a>=h||b<0||b>=w)//out of range
#define fi first
#define se second
#define mkpr(a,b) make_pair(a,b)
#define mktpl(a,b,c) make_tuple(a,b,c)
#define fixp(a) fixed<<setprecision(a) //小数点以下指定
vector<int> dx={1,0,-1,0};//{1,1,0,-1,-1,-1,0,1};
vector<int> dy={0,-1,0,1};//{0,-1,-1,-1,0,1,1,1};
//ll keta_calc(ll x){ll ans=0;while(x){x/=10;ans++;}return ans;}
//ll powll(ll x,ll y){ll ans=1;while(y){ans*=x;y--;}return ans;}
//alias g++='g++ -std=c++17'
#define chmin(a,b) a=min(a,(b))
#define chmax(a,b) a=max(a,(b))

int main(){
    int i=0,j=0;
    int n,m;
    double a,b;
    cin >> n >> a >> b;
    n++;
    vector<double> k(n);
    rep(i,n){
        cin >> k[i];
    }
    double ans = 0.0;
    for(double x=a; x < b; x+= 1e-6){
        double y = 1.0;
        rep(i,n){
            ans += k[i] * y;
            y*=x;
        }
    }
    ans /= 1e+6;
    ans += 1e-10;
    cout << (ll)ans << endl;

    //sort(aitem.begin(),aitem.end(),
    //[](const vector<int> &alpha,const vector<int> &beta){return alpha[1] < beta[1];});
    
    // cout << n << endl ;

    //if(flag==0)printf("Yes\n");
    //else printf("No\n");

    return 0;
}
0