아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

biinfinite

시간 제한2초메모리 제한1024 MB

요약
매개변수 t에 대한 점화식으로 정의된 수열의 n번째 항을 202112210950으로 나눈 나머지를 구한다. |n|은 10^12까지이다.
난이도

보통10점 중 7점

유형
동적 계획법, 수학, 행렬
정답자
아직 제출이 없습니다

문제

A bi-infinite sequence means a sequence that is infinite in both directions. In other words, it means a function whose domain is the set of all integers. The writer of this problem defined their bi-infinite sequence (K_n)_n∈Z(K\_n)\_{n\in\mathbb Z} and called it "KSA bi-infinite sequence" with a parameter tt where tt is a positive integer. It satisfies the following for all integers nn.

  • K_n=5701.5+0.5⋅(−1)nK\_n=5701.5+0.5\cdot(-1)^n if 0≤n\<t0\le n\<t
  • K_n=∑_j=1t(t+1−j)K_n−jK\_n=\sum\_{j=1}^t(t+1-j)K\_{n-j}

Write a function biinfinite:

  • input parameter: two int-type objects whose values are tt and nn, respectively, where 1≤t≤81\le t\le 8 and ∣n∣≤1012|n|\le10^{12}
  • return value: the int-type object whose value is ⌊K_n⌋−M⌊K_nM⌋\lfloor K\_n\rfloor-M\left\lfloor\frac{K\_n}M\right\rfloor where M=202112210950M=202112210950 and K_nK\_n is the nn-th term of KSA bi-infinite sequence with a parameter tt

예제

이 문제는 공개된 예제가 없습니다.