LYDSY 1087

题目大意

暂无

题目解法

暂无

RTFC

#include <cstdio>
long long fun[10][82] = {
    {},
    {0, 1},
    {0, 4},
    {0, 9, 16, 8, 1},
    {0, 16, 78, 140, 79},
    {0, 25, 228, 964, 1987, 1974, 978, 242, 27, 1},
    {0, 36, 520, 3920, 16834, 42368, 62266, 51504, 21792, 3600},
    {0, 49, 1020, 11860, 85275, 397014, 1220298, 2484382, 3324193, 2882737, 1601292, 569818, 129657, 18389, 1520, 64, 1},
    {0, 64, 1806, 29708, 317471, 2326320, 12033330, 44601420, 119138166, 229095676, 314949564, 305560392, 204883338, 91802548, 25952226, 4142000, 281571},
    {0, 81,
     2968, 65240,
     962089, 10087628,
     77784658, 450193818,
     1979541332, 6655170642,
     17143061738, 33787564116,
     50734210126, 57647295377,
     49138545860, 31122500764,
     14518795348, 4959383037,
     1237072414, 224463798,
     29275410, 2673322,
     163088, 6150,
     125, 1}};
int main()
{
    int n, k;
    scanf("%d %d", &n, &k);
    printf("%lld", fun[n][k]);
    return 0;
}