# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
9335 | corea | Phibonacci (kriii2_P) | C++14 | 0 ms | 1676 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 <stdio.h>
#include <iostream>
#include <array>
#include <cstring>
using namespace std;
struct matrix {
array< array<long, 2>, 2> v;
matrix() { }
matrix(array< array<long, 2>, 2> &s) {
v = s;
}
};
#define REP(i, n) for(int i=0; i < n; ++i)
const int MOD = 1000000007;
matrix operator * (const matrix &a, const matrix &b) {
matrix c;
c.v[0][0] = c.v[0][1] = c.v[1][0] = c.v[1][1] = 0;
REP(k, 2) REP(i, 2) REP(j, 2) {
c.v[i][j] += a.v[i][k] * b.v[k][j];
c.v[i][j] %= MOD;
}
return c;
}
matrix I;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |