QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#21590 | #2851. 生生不息 | Skyowo# | AC ✓ | 1ms | 3736kb | C++14 | 909b | 2022-03-07 15:51:22 | 2022-05-08 03:40:47 |
Judging History
answer
// Skyqwq
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
template <typename T> bool chkMax(T &x, T y) { return (y > x) ? x = y, 1 : 0; }
template <typename T> bool chkMin(T &x, T y) { return (y < x) ? x = y, 1 : 0; }
template <typename T> void inline read(T &x) {
int f = 1; x = 0; char s = getchar();
while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); }
while (s <= '9' && s >= '0') x = x * 10 + (s ^ 48), s = getchar();
x *= f;
}
int db[6][6] =
{
{0,0,0,0,0,},
{0,5,18,73,267,},
{0,18,150,1533,11398,},
{0,73,1533,31828,469972,},
{0,267,11398,469972,12785753,},
};
int main() {
int T; read(T);
while (T--) {
int n, m; read(n), read(m);
--n, --m;
printf("%d\n", db[n][m]);
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3736kb
input:
25 2 4 2 3 2 1 1 5 4 2 5 4 5 3 2 5 1 4 4 4 5 2 5 1 4 5 3 3 3 2 4 3 5 5 3 1 4 1 3 5 3 4 1 3 1 2 2 2 1 1
output:
73 18 0 0 73 469972 11398 267 0 31828 267 0 469972 150 18 1533 12785753 0 0 11398 1533 0 0 5 0
result:
ok 25 lines