*IF statement [#i204bb42]
**Sample Code 1[#u01684dc]
 a(T):rsrrsr
 b(T):a(2-T)b(T-5)
 c(T):b(T)sc(T-1)
 c(20)

In this code, b(T) equals "rsrrsr" if T≡1 mod 5, and no moves otherwise. 

**Examples [#p8f6fdb5]
-素数 mod 11, divisors


*Rational Growth [#o3f31f90]
**Sample Code [#u01684dc]
**Examples [#p8f6fdb5]

*12B method [#c43b9803]
**Sample Code [#u01684dc]
 f(T):sf(T-4)rf(T+7)
 f(8)

This code realizes the loop
 a:ssrsssrsssrsssr
 a

In this loop, the number of "s" equals 4 + 7, and the number of "r" equals 7.~
In generally, the code
 f(T):[1]f(T-A)[2]f(T+B)
implies a loop with (A+B) times of "[1]" and B times of "[2]".

**Sample Code 2 [#yf2cc31b]
 a(T):sa(T-37)ra(T+83)
 a(1)
Since 83/37 approximately equals 9/4, this code is similar to 
 a(T):sa(T-4)ra(T+9)
 a(1)
but the small difference changes the direction of the movement. ~
Therefore, "square minus square" shape can be drawn by a 12B code. 

**Sample Code 3 [#b0833cb0]
係数が1じゃないやつ
**Examples [#p8f6fdb5]

*Random walk by a numerical function [#q769cd56]
**Sample Code [#wa54fc27]
 f(T):sf(T-4)rf(T-7)
 f(255)

**Examples [#uce7bcab]
Probably, no problems in HOJ requires this method (even for "best solution") at this moment.


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS