理系学生日記

おまえはいつまで学生気分なのか

忍者TOOLS

問題1.14

(count-charge 11)
(cc 11 5)-(cc -39 5)-0
(cc 11 4)-(cc -14 4)-0
(cc 11 3)-(cc 1 3)-(cc -9 3)-0
(cc 1 2)-(cc -4 2)-0
(cc 1 1)-(cc 0 1)-1
(cc 1 0)-0
(cc 11 2)-(cc 6 2)-(cc 1 2)-(cc -4 2)-0 │ | |
(cc 0 2)
│ | |
1
(cc 6 1)-(cc 5 1)-(cc 4 1)-(cc 3 1)-(cc 2 1)-(cc 1 1)-(cc 0 1)-1
│ | | | | | |
(cc 6 0) (cc 5 0) (cc 4 0) (cc 3 0) (cc 2 0) (cc 1 0)-0
│ | | | | |
0 0 0 0 0
(cc 11 1)-(cc 10 1)-(cc 9 1)-(cc 8 1)-(cc 7 1)-(cc 6 1)-(cc 5 1)-(cc 4 1)-(cc 3 1)-(cc 2 1)-(cc 1 1)-(cc 0 1)-1 │ | | | | | | | | | |
(cc 10 0) (cc 9 0) (cc 8 0) (cc 7 0) (cc 6 0) (cc 5 0) (cc 4 0) (cc 3 0) (cc 2 0) (cc 1 0)-0
│ | | | | | | | | |
0 0 0 0 0 0 0 0 0
(cc 11 0)-0

スペースは\theta(n)、ステップ数は\theta(n^5)