这题太狠了 ,TLE的我难受,整整做了一天。。
借用别人的图片,就是这样构造矩阵。。。 其中 X = 2 * a2 , Y= -1;
code:
#include <cstdio>
#include <cstring>
#include <iostream>
#define LL __int64
using namespace std;
LL a2,n,M;
struct Matrix
{
LL mat[5][5];
}A,E,T;
Matrix operator * (const Matrix a,const Matrix b)
{
Matrix res;
int i,j,k;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
{
res.mat[i][j] = 0;
for(k......
阅读全文