QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#21547#2851. 生生不息DaBenZhongXiaSongKuaiDi#AC ✓2ms3560kbC++20303b2022-03-07 14:56:492022-05-08 03:37:26

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-08 03:37:26]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3560kb
  • [2022-03-07 14:56:49]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int T;
int n,m;
int a[5][5]={
{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(){
	cin>>T;
	while(T--){
		cin>>n>>m;
		cout<<a[n-1][m-1]<<endl;
	}
}

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3560kb

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