Language: C++

#include<bits/stdc++.h>
using namespace std;

#define ll long long int
#define N 100010
#define LD long double

int inf = 1e9;
int mod;

int power(int a, int b) {
    if(!b) {
        return 1;
    }
    int temp = power(a, b / 2);
    temp = 1LL * temp * temp % mod;
    if(b % 2) {
        temp = 1LL * temp * a % mod;
    }
    return temp;
}

int inv(int a) {
    return power(a, mod - 2);
}

struct poly {
    vector<int> mul(vector<int> &f1, vector<int> &f2) {
        int n = (int)f1.size() + (int)f2.size();
        vector<int> ans(n, 0);
        for(int i = 0; i < (int)f1.size(); i++) {
            for(int j = 0; j < (int)f2.size(); j++) {
                ans[i + j] = (ans[i + j] + 1LL * f1[i] * f2[j] % mod) % mod;
            }
        }
        return ans;
    }
    vector<int> mul(vector<int> &f1, int c) {
        vector<int> ans;
        for(int i = 0; i < (int)f1.size(); i++) {
            ans.push_back(1LL * f1[i] * c % mod);
        }
        return ans;
    }
    vector<int> add(vector<int> &f1, vector<int> &f2) {
        int n = max((int)f1.size(), (int)f2.size());
        vector<int> ans(n, 0);
        for(int i = 0; i < n; i++) {
            if((int)f1.size() > i) {
                ans[i] = (ans[i] + f1[i]) % mod;
            }
            if((int)f2.size() > i) {
                ans[i] = (ans[i] + f2[i]) % mod;
            }
        }
        return ans;
    }
    vector<int> div(vector<int> &f1, int c) {
        vector<int> ans;
        int cbar = inv(c);
        for(int i = 0; i < (int)f1.size(); i++) {
            ans.push_back(1LL * f1[i] * cbar % mod);
        }
        return ans;
    }
    int get(vector<int> &f, int x) {
        int ans = 0;
        int prime = 1;
        for(int i = 0; i < (int)f.size(); i++) {
            ans = (ans + 1LL * f[i] * prime % mod) % mod;
            prime = 1LL * prime * x % mod;
        }
        return ans;
    }
    void print(vector<int> &f) {
        for(int u : f) {
            cout << u << " ";
        }
        cout << "\n";
    }
    vector<int> divp(vector<int> f1, int k) {
        int n = (int)f1.size();
        vector<int> ans(n - 1, 0);
        for(int i = n - 1; i > 0; i--) {
            f1[i - 1] = (f1[i - 1] + 1LL * k * f1[i] % mod) % mod;
            ans[i - 1] = f1[i];
        }
        return ans;
    }
};

poly P;

int main()
{
    //freopen("IN.txt", "r", stdin);
    //freopen("OUT.txt", "w", stdout);

    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    int p;
    cin >> p;
    mod = p;
    int A[p];
    for(int i = 0; i < p; i++) {
        cin >> A[i];
    }

    vector<int> ans = (p, 0);
    vector<int> T = {1};

    for(int i = 0; i < p; i++) {
        vector<int> v = {-i, 1};
        T = P.mul(T, v);
    }

    //P.print(T);

    for(int i = 0; i < p; i++) {
        if(!A[i]) {
            continue;
        }
        vector<int> temp = P.divp(T, i);
        //P.print(temp);
        temp = P.div(temp, P.get(temp, i));
        temp = P.mul(temp, A[i]);
        //P.print(temp);
        ans = P.add(ans, temp);
    }
    for(int i = 0; i < p; i++) {
        cout << (ans[i] + p) % p << " ";
    }
    cout << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:110:27: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
  110 |     vector<int> ans = (p, 0);
      |                           ^