Tr A Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4211 Accepted Submission(s): 3147 Problem Description A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973. Input 数据的第一行是一个T,表示有T组数据.每组数据的第一行有…
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1113 题意:中文题诶- 思路:矩阵快速幂模板 代码: #include <iostream> #define ll long long using namespace std; ; ; int n, m; typedef struct node{ ll x[MAXN][MAXN]; }matrix; matrix matrix_multi(matrix a,…