Search found 3 matches

by tiwe
Sun Aug 19, 2012 10:53 pm
Forum: Challenges Solved
Topic: Ave
Replies: 17
Views: 1781

shell oneliner

in="cqrb lryqna rb fjh, fjh qjamna cqjw axc cqracnnw. qnan, hxd wnena twxf qxf oja cx bqroc! xq kh cqn fjh, cqn jwbfna rb mnjmvjwblqnbc."; a=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz; for i in $(seq 1 25); do echo "$in" | tr ${a:0:26} ${a:$i:26}; done
by tiwe
Sun Aug 19, 2012 10:50 pm
Forum: Challenges Solved
Topic: How is your Grammar?
Replies: 16
Views: 1648

using sed:
$ cat grammar.sed
:a
s/A/is/g
...
s/S/JKL/g
t a
$ echo S | sed -f grammar.sed
by tiwe
Tue Oct 11, 2011 3:37 pm
Forum: Runaway Robot Puzzle
Topic: Best algorithms?
Replies: 16
Views: 64063

I used a shell script for submitting results, downloading the next level and extracting the parameters. The actual solving is done in single-threaded C. Total CPU time (shell+C) for all levels is 30s in a 2.0GHz Core2. Most levels were solved in under 10ms, longest single-level runtime was 6.49s for...