Update grader.py
This commit is contained in:
parent
e3ab2dbd99
commit
c7372e913d
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
# Very easy problem. Compute a few values w/ brute force or something, then check OEIS.
|
||||||
|
# Part of: https://oeis.org/A001333
|
||||||
|
# Tells us: f(n) = (1/4) * Trace( [[0,0,1,0],[0,1,0,1],[1,0,2,0],[0,2,0,1]] )
|
||||||
|
# just write a program to compute this quickly
|
||||||
|
# this sol takes something like ~O(log n) i think?
|
||||||
|
|
||||||
x = input() + 1
|
x = input() + 1
|
||||||
|
|
||||||
mat = [[0,0,1,0],[0,1,0,1],[1,0,2,0],[0,2,0,1]]
|
mat = [[0,0,1,0],[0,1,0,1],[1,0,2,0],[0,2,0,1]]
|
||||||
|
|
Loading…
Reference in a new issue