Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
19821 张老师 2021北京队选拔模拟赛1-B C++ 解答错误 30 0 MS 248 KB 379 2023-03-30 12:31:33

Tests(3/10):


#include <iostream> //#include <bits/stdc++.h> #define int long long using namespace std; int ans[20] = {0, 1, 0, 0, 2, 14, 90, 646, 5242, 47622, 479306, 5296790, 63779034, 831283558, 11661506218, 175203184374}; int n, M; int dp[1008][1008][2]; signed main() { while(cin >> n >> M) { if(n <= 15) { cout << ans[n] % M << endl; continue; } } return 0; }


测评信息: