# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
134304 | sebinkim | Fibonacci representations (CEOI18_fib) | C++14 | 675 ms | 81572 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pll;
const ll mod = 1e9 + 7;
struct matrix{
ll aa, ab, ba, bb;
matrix() : aa(1), ab(0), ba(0), bb(1) {}
matrix(ll aa, ll ab, ll ba, ll bb) :
aa(aa), ab(ab), ba(ba), bb(bb) {}
matrix(ll x, ll d)
{
aa = x / 2 % mod; ab = (x - 1) / 2 % mod;
ba = (aa * (d - 1) + 1) % mod;
bb = (ab * (d - 1) + 1) % mod;
}
matrix operator * (matrix m)
{
return matrix((aa * m.aa + ab * m.ba) % mod, (aa * m.ab + ab * m.bb) % mod,
(ba * m.aa + bb * m.ba) % mod, (ba * m.ab + bb * m.bb) % mod);
}
};
struct node{
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |