hiho week 262 register

Ended

Participants:49

Verdict:Accepted
Score:100 / 100
Submitted:2019-07-08 20:56:45

Lang:Java

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
import java.util.Scanner;
public class Main{
    public static final long MOD = 1000000007;
  public static final int CON = 64;
  public static int[] dx = {1221-1-2-2-1};
  public static int[] dy = {-2-11221-1-2};
  public static int nrc;
  public static void main(String[] args) {
    Scanner sn = new Scanner(System.in);
    n =sn.nextInt();r = sn.nextInt();c = sn.nextInt();
    --r;--c;
    Matrix coef = pre();
    coef = Matrix.pow(coefn);
    long ans = 0;
    int position = r*8+c;
    for(int i=0;i<64;++i) {
        ans = (ans+coef.mat[position][i])%MOD;
    }
    System.out.println(ans);
  }
  public static Matrix pre() {
    Matrix ans = new Matrix(6464);
    for (int i = 0i < 8i ++) {
        for (int j = 0j < 8j ++) {
            for (int k = 0k < 8k ++) {
                int x = i + dx[k];
                int y = j + dy[k];
                if (x < 0 || y < 0 || x > 7 || y > 7) {
                    continue;
                }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX