# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203508 | coloredrabbit | Phibonacci (kriii2_P) | C++17 | 5 ms | 504 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<iostream>
#include<cstring>
using namespace std;
using ll = long long;
const int LIMIT = 62, M = 1e9 + 7;
struct _mt {
ll a, b, c, d;
_mt() { a = b = c = d = 0; }
_mt(ll a, ll b, ll c, ll d) : a(a), b(b), c(c), d(d) {}
void E() { a = d = 1; }
_mt operator*(const _mt& o) {
return _mt{ (a * o.a + b * o.c) % M
, (a * o.b + b * o.d) % M
, (c * o.a + d * o.c) % M
, (c * o.b + d * o.d) % M };
}
}F, NK, K, E, L, Lx[LIMIT], Fk;
_mt _pow(_mt a, ll n) {
if (n <= 1) return n % 2 ? a : E;
_mt h = _pow(a, n >> 1);
return h * h * (n % 2 ? a : E);
}
ll _pow(ll a, ll n) {
if (n <= 1) return n % 2 ? a : 1;
ll h = _pow(a, n >> 1);
return (h * h % M) * (n % 2 ? a : 1) % M;
}
ll f_2k[LIMIT], n, k;
ll gL(ll x) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |