P4708题解(打表)

· · 题解

这道黑题,蒟蒻我苦思良久后,啥也没想出来,这时,蒟蒻看到了数据范围:

这是,蒟蒻的脑子里闪烁出了~~邪恶的光芒~~一个想法:打表!!! ```cpp #include <bits/stdc++.h> using namespace std; int a[55] = {0, 1, 1, 2, 3, 7, 16, 54, 243, 2038, 33120, 1182004,87723296,907260828,445874017,131059413,750854059,85710140,46269468,106575268,569924828,477980796,853121491,916490672,848722293,179336057,577163661,709912061,916083428,988859367,286999618,29547862,713350279,194424628,553076032,609634772,876525030,182311698,148716617,346128108,650982654,373128192,361260409,524419271,834718796,514750301,478609700,386216865,881562716,715225681,602577017}, n; int main(){ cin >> n; cout << a[n]; return 0; } ``` [评测记录](https://www.luogu.com.cn/record/117942506) 就这样,一道黑题就被我们收入囊中了(~~逃~~)