Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

mint dp[55][55][2605];

int main() {
  int n, score;
  cin >> n >> score;
  dp[0][0][0] = 1;
  rep(i,n) {
    rep(j,i+1)rep(k,score+1) {
      {
        int nj = j;
        dp[i+1][nj][k+nj] += dp[i][j][k];
      }
      {
        int nj = j+1;
        dp[i+1][nj][k+nj] += dp[i][j][k];
      }
      {
        int nj = j;
        mint x = j*2;
        dp[i+1][nj][k+nj] += dp[i][j][k]*x;
      }
      if (j >= 1) {
        int nj = j-1;
        mint x = j*j;
        dp[i+1][nj][k+nj] += dp[i][j][k]*x;
      }
    }
  }
  mint ans = dp[n][0][score];
  cout << ans.x << endl;
  return 0;
}

Compiler output:
a.cc:11:3: error: 'll' does not name a type
   11 |   ll x; // typedef long long ll;
      |   ^~
a.cc:12:10: error: expected ')' before 'x'
   12 |   mint(ll x=0):x(x%mod){}
      |       ~  ^~
      |          )
a.cc:37:12: error: 'll' has not been declared
   37 |   mint pow(ll t) const {
      |            ^~
a.cc: In member function 'mint& mint::operator+=(mint)':
a.cc:14:10: error: 'x' was not declared in this scope
   14 |     if ((x += a.x) >= mod) x -= mod;
      |          ^
a.cc:14:17: error: 'const struct mint' has no member named 'x'
   14 |     if ((x += a.x) >= mod) x -= mod;
      |                 ^
a.cc: In member function 'mint& mint::operator-=(mint)':
a.cc:18:10: error: 'x' was not declared in this scope
   18 |     if ((x += mod-a.x) >= mod) x -= mod;
      |          ^
a.cc:18:21: error: 'const struct mint' has no member named 'x'
   18 |     if ((x += mod-a.x) >= mod) x -= mod;
      |                     ^
a.cc: In member function 'mint& mint::operator*=(mint)':
a.cc:22:6: error: 'x' was not declared in this scope
   22 |     (x *= a.x) %= mod;
      |      ^
a.cc:22:13: error: 'const struct mint' has no member named 'x'
   22 |     (x *= a.x) %= mod;
      |             ^
a.cc: In member function 'mint mint::pow(int) const':
a.cc:38:20: error: could not convert '1' from 'int' to 'mint'
   38 |     if (!t) return 1;
      |                    ^
      |                    |
      |                    int
a.cc: In function 'int main()':
a.cc:63:17: error: no match for 'operator=' (operand types are 'mint' and 'int')
   63 |   dp[0][0][0] = 1;
      |                 ^
a.cc:10:8: note: candidate: 'constexpr mint& mint::operator=(const mint&)'
   10 | struct mint {
      |        ^~~~
a.cc:10:8: note:   no known conversion for argument 1 from 'int' to 'const mint&'
a.cc:10:8: note: candidate: 'constexpr mint& mint::operator=(mint&&)'
a.cc:10:8: note:   no known conversion for argument 1 from 'int' to 'mint&&'
a.cc:76:19: error: conversion from 'int' to non-scalar type 'mint' requested
   76 |         mint x = j*2;
      |                  ~^~
a.cc:81:19: error: conversion from 'int' to non-scalar type 'mint' requested
   81 |         mint x = j*j;
      |                  ~^~
a.cc:87:15: error: 'struct mint' has no member named 'x'
   87 |   cout << ans.x << endl;
      |               ^