# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
71721 | 유애나 (#119) | Cross on the Grid (FXCUP3_cross) | C++98 | 3 ms | 724 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int M = int(1e9) + 7;
struct Mat{
int a[9][9];
Mat operator*(const Mat &o) const {
Mat r;
for(int i = 0; i < 9; i++){
for(int j = 0; j < 9; j++){
r.a[i][j] = 0;
for(int k = 0; k < 9; k++)
r.a[i][j] = (r.a[i][j] + 1LL * a[i][k] * o.a[k][j]) % M;
}
}
return r;
}
} a;
Mat p(Mat x, int k){
if(k == 1) return x;
if(k & 1) return p(x * x, k / 2) * x;
return p(x * x, k / 2);
}
int n, r;
int t[9][9] = {
{1, 0, 0, 0, 1, 0, 1, 1, 0},
{1, 0, 0, 0, 0, 0, 1, 1, 0},
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |