hiho week 43 register

Ended

Participants:830

Verdict:Accepted
Score:100 / 100
Submitted:2015-04-27 12:40:03

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
#define MAX_K  7
#define STATUS_COUNT (2<<MAX_K)
using namespace std;
struct Matrix {
    int matrix[STATUS_COUNT][STATUS_COUNT];
    Matrix() {
        memset(matrix, 0, sizeof(matrix));
    }
};
class Solution {
public:
    Matrix unit_matrix;
    int dp_init[STATUS_COUNT];
    int K, N;
    const static int MOD = 12357;
    void print_matrix(Matrix &m) {
        int n = 1 << K;
        cout << "-----------" << endl;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) printf("%d ", m.matrix[i][j]);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX