win7中用MinGW编译x264出现"No working C compiler found."错误

2020-12-13 01:35

阅读:312

标签:des   style   blog   class   c   code   

Description

Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.

Input

The input contains exactly one test case. The first line of input contains three positive integers n (n ≤ 30), k (k ≤ 109) and m (m 4). Then follow n lines each containing n nonnegative integers below 32,768, giving A’s elements in row-major order.

Output

Output the elements of S modulo m in the same way as A is given.

Sample Input

2 2 4
0 1
1 1

Sample Output

1 2
2 3
代码:
#include 
#include 
#include 
using namespace std;

struct mat
{
    int t[65][65];
    void set()
    {
        memset(t,0,sizeof(t));
    }
} a,b;

mat multiple(mat a,mat b,int n,int p)
{
    int i,j,k;
    mat temp;
    temp.set();
    for(i=0; i0)
                for(k=0; k>=1;
        b=multiple(b,b,n,p);
    }
    return t;
}
void init(int n,int m,int p)
{
    a.set();
    b.set();
    for(int i=0;i>n>>m>>p)
    {
        init(n,m,p);
    }
    return 0;
}

win7中用MinGW编译x264出现"No working C compiler found."错误,搜素材,soscw.com

win7中用MinGW编译x264出现"No working C compiler found."错误

标签:des   style   blog   class   c   code   

原文地址:http://blog.csdn.net/liuyangwuhan1980/article/details/26446893


评论


亲,登录后才可以留言!