Language: Java

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
const int MAXN = 5000+5, MAXM = 20+5;
int T, N, d[2][MAXN];
int qur[MAXM], r[MAXM], ans[MAXM];
bool cmp(const int a, const int b)
{
    return qur[a] < qur[b];
}
int main()
{
    freopen("D.in", "r", stdin);
    for (T = 0; scanf("%d", &N) != EOF; T++)
    {
        qur[T] = N;
        r[T] = T;
    }
    sort(r, r+T, cmp);
    memset(d, 0, sizeof(d));
    d[0][0] = 1;
    int s = 1, t = 0;
    for (int i = 1, k = 0; i <= 10000 && k < T; i++)
    {
        swap(s, t);
        for (int j = 0; j <= i && j <= N-i+1; j++)
        {
            if (j)
                d[t][j] = d[s][j-1]+d[s][j]+d[s][j+1];
            else
                d[t][j] = d[s][j]+d[s][j+1];
        }
        for (; i == qur[r[k]]/2; k++)
        {
            int sum = 0;
            if (i%2)
            {
                for (int j = 0; j <= i; j++)
                {
                    if (j)
                        sum += d[t][j]*(d[t][j-1]+d[t][j]+d[t][j+1]);
                    else
                        sum += d[t][j]*(d[t][j]+d[t][j+1]);
                }
            }
            else
            {
                for (int j = 0; j <= i; j++)
                    sum += d[t][j]*d[t][j];
            }
            ans[r[k]] = sum;
        }
    }
    for (int i = 0; i < T; i++)
        printf("%d\n", ans[i]);
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<cstdio>
^
Main.java:2: error: illegal character: '#'
#include<cstring>
^
Main.java:3: error: illegal character: '#'
#include<algorithm>
^
Main.java:4: error: illegal character: '#'
#include<vector>
^
Main.java:6: error: class, interface, enum, or record expected
const int MAXN = 5000+5, MAXM = 20+5;
^
Main.java:7: error: class, interface, enum, or record expected
int T, N, d[2][MAXN];
^
Main.java:8: error: class, interface, enum, or record expected
int qur[MAXM], r[MAXM], ans[MAXM];
^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
bool cmp(const int a, const int b)
^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: illegal start of type
bool cmp(const int a, const int b)
         ^
Main.java:9: error: class, interface, enum, or record expected
bool cmp(const int a, const int b)
               ^
Main.java:12: error: class, interface, enum, or record expected
}
^
Main.java:16: error: class, interface, enum, or record expected
    for (T = 0; scanf("%d", &N) != EOF; T++)
    ^
Main.java:16: error: class, interface, enum, or record expected
    for (T = 0; scanf("%d", &N) != EOF; T++)
                ^
Main.java:16: error: class, interface, enum, or record expected
    for (T = 0; scanf("%d", &N) != EOF; T++)
                                        ^
Main.java:19: error: class, interface, enum, or record expected
        r[T] = T;
        ^
Main.java:20: error: class, interface, enum, or record expected
    }
    ^
Main.java:22: error: class, interface, enum, or record expected
    memset(d, 0, sizeof(d));
    ^
Main.java:23: error: class, interface, enum, or record expected
    d[0][0] = 1;
    ^
Main.java:25: error: class, interface, enum, or record expected
    for (int i = 1, k = 0; i <= 10000 && k < T; i++)
    ^
Main.java:25: error: class, interface, enum, or record expected
    for (int i = 1, k = 0; i <= 10000 && k < T; i++)
                           ^
Main.java:25: error: class, interface, enum, or record expected
    for (int i = 1, k = 0; i <= 10000 && k < T; i++)
                                                ^
Main.java:28: error: class, interface, enum, or record expected
        for (int j = 0; j <= i && j <= N-i+1; j++)
        ^
Main.java:28: error: class, interface, enum, or record expected
        for (int j = 0; j <= i && j <= N-i+1; j++)
                        ^
Main.java:28: error: class, interface, enum, or record expected
        for (int j = 0; j <= i && j <= N-i+1; j++)
                                              ^
Main.java:32: error: class, interface, enum, or record expected
            else
            ^
Main.java:34: error: class, interface, enum, or record expected
        }
        ^
Main.java:35: error: class, interface, enum, or record expected
        for (; i == qur[r[k]]/2; k++)
               ^
Main.java:35: error: class, interface, enum, or record expected
        for (; i == qur[r[k]]/2; k++)
                                 ^
Main.java:38: error: class, interface, enum, or record expected
            if (i%2)
            ^
Main.java:40: error: class, interface, enum, or record expected
                for (int j = 0; j <= i; j++)
                                ^
Main.java:40: error: class, interface, enum, or record expected
                for (int j = 0; j <= i; j++)
                                        ^
Main.java:44: error: class, interface, enum, or record expected
                    else
                    ^
Main.java:46: error: class, interface, enum, or record expected
                }
                ^
Main.java:50: error: class, interface, enum, or record expected
                for (int j = 0; j <= i; j++)
                                ^
Main.java:50: error: class, interface, enum, or record expected
                for (int j = 0; j <= i; j++)
                                        ^
Main.java:52: error: class, interface, enum, or record expected
            }
            ^
Main.java:54: error: class, interface, enum, or record expected
        }
        ^
Main.java:56: error: class, interface, enum, or record expected
    for (int i = 0; i < T; i++)
                    ^
Main.java:56: error: class, interface, enum, or record expected
    for (int i = 0; i < T; i++)
                           ^
Main.java:58: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:59: error: class, interface, enum, or record expected
}
^
41 errors