Language: C++

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

typedef ll long long;

const ll M = 998244353;

vector<ll> fac(300001); 
vector<ll> ifac(300001); 

ll mpow(ll x, ll n){ 
    ll ans = 1;
    while(n != 0){
        if(n&1) ans = ans*x % M;
        x = x*x % M;
        n = n >> 1;
    }
    return ans;
}

ll comb(ll a, ll b){ //aCbをmod計算
    if(a == 0 && b == 0)return 1;
    if(a < b || a < 0)return 0;
    ll tmp = ifac[a-b]* ifac[b] % M;
    return tmp * fac[a] % M;
}

int main(){
    ll N,X,K;
    cin>>N>>X>>K;

    fac[0] = 1;
    ifac[0] = 1;
    for(ll i = 0; i<300000; i++){
        fac[i+1] = fac[i]*(i+1) % M; // n!(mod M)
        ifac[i+1] = ifac[i]*mpow(i+1, M-2) % M; 


    ll ans=0;
    for(long i=0;i<=K;i++){
      long Z=X;
      Z*=comb(N-1,i);
      Z%=M;
      for(long j=0;j<N-1-i;j++){
        Z*=X-1;
        Z%=M;
      }
      ans+=Z;
      ans%=M;
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:4:9: error: 'll' does not name a type
    4 | typedef ll long long;
      |         ^~
a.cc:6:7: error: 'll' does not name a type
    6 | const ll M = 998244353;
      |       ^~
a.cc:8:8: error: 'll' was not declared in this scope
    8 | vector<ll> fac(300001);
      |        ^~
a.cc:8:10: error: template argument 1 is invalid
    8 | vector<ll> fac(300001);
      |          ^
a.cc:8:10: error: template argument 2 is invalid
a.cc:9:8: error: 'll' was not declared in this scope
    9 | vector<ll> ifac(300001);
      |        ^~
a.cc:9:10: error: template argument 1 is invalid
    9 | vector<ll> ifac(300001);
      |          ^
a.cc:9:10: error: template argument 2 is invalid
a.cc:11:1: error: 'll' does not name a type
   11 | ll mpow(ll x, ll n){
      | ^~
a.cc:21:1: error: 'll' does not name a type
   21 | ll comb(ll a, ll b){ //aCbをmod計算
      | ^~
a.cc: In function 'int main()':
a.cc:29:5: error: 'll' was not declared in this scope
   29 |     ll N,X,K;
      |     ^~
a.cc:30:10: error: 'N' was not declared in this scope
   30 |     cin>>N>>X>>K;
      |          ^
a.cc:30:13: error: 'X' was not declared in this scope
   30 |     cin>>N>>X>>K;
      |             ^
a.cc:30:16: error: 'K' was not declared in this scope
   30 |     cin>>N>>X>>K;
      |                ^
a.cc:32:8: error: invalid types 'int[int]' for array subscript
   32 |     fac[0] = 1;
      |        ^
a.cc:33:9: error: invalid types 'int[int]' for array subscript
   33 |     ifac[0] = 1;
      |         ^
a.cc:34:11: error: expected ';' before 'i'
   34 |     for(ll i = 0; i<300000; i++){
      |           ^~
      |           ;
a.cc:34:19: error: 'i' was not declared in this scope
   34 |     for(ll i = 0; i<300000; i++){
      |                   ^
a.cc:35:35: error: 'M' was not declared in this scope
   35 |         fac[i+1] = fac[i]*(i+1) % M; // n!(mod M)
      |                                   ^
a.cc:36:29: error: 'mpow' was not declared in this scope; did you mean 'pow'?
   36 |         ifac[i+1] = ifac[i]*mpow(i+1, M-2) % M;
      |                             ^~~~
      |                             pow
a.cc:39:7: error: expected ';' before 'ans'
   39 |     ll ans=0;
      |       ^~~~
      |       ;
a.cc:42:10: error: 'comb' was not declared in this scope; did you mean 'wctomb'?
   42 |       Z*=comb(N-1,i);
      |          ^~~~
      |          wctomb
a.cc:48:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   48 |       ans+=Z;
      |       ^~~
      |       abs
a.cc:51:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |     cout << ans << endl;
      |             ^~~
      |             abs
a.cc:53:2: error: expected '}' at end of input
   53 | }
      |  ^
a.cc:28:11: note: to match this '{'
   28 | int main(){
      |           ^