[Offer收割]编程练习赛23 register

Ended

Participants:430

Verdict:Accepted
Score:100 / 100
Submitted:2017-08-20 13:46:02

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 <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
int SZ;
struct Matrix {
  int num[105][105];
  void setZero() {
    memset(num, 0, sizeof(num));
  }
  void setOne() {
    setZero();
    for (int i = 0; i < SZ; ++i)
      num[i][i] = 1;
  }
  
  void cp(const Matrix& other) {
    for (int i = 0; i < SZ; ++i)
      for (int j = 0; j < SZ; ++j)
        num[i][j] = other.num[i][j];
  }
  void build(const int& k) {
    setZero();
    for (int i = 0; i < SZ; ++i)
      for (int j = 0; j < SZ; ++j)
        if (i <= min(9, k) && j <= min(9, k) && i * j <= k)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX