Q. 8×8の格子点上にAから出発する点の軌跡を描くようにプログラムされてるコンピューターがあります。 点は上下左右の隣の点にランダムに移って行きますが既に描かれた軌跡の上をもう一度移動することはできません。 点は15回向きを変え、直進した後、止まります。 このコンピューターが描く可能性のある最長の軌跡の距離を求めなさい。
p p p p p p p p p p p p p p p p
package com.test; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PipedInputStream; | |
import java.io.PipedOutputStream; | |
import org.apache.commons.exec.CommandLine; | |
import org.apache.commons.exec.DefaultExecuteResultHandler; |
import io.Source | |
object Main { | |
val toFizzBuzz = ((x:Int) => (x%3,x%5) match { | |
case (0,0) => "fizzbuzz" | |
case (0,_) => "fizz" | |
case _ => "buzz" | |
}) |
<label><input type="radio"><input type="text" ></label> |
eval (%w( p | |
r i n | |
t f | |
( " %s ",[02* 0x0 2*0b1 | |
0 *0 b 10 1 0 0 0 | |
0 0 0 1 * 0b1 | |
1 0 0 1 0 00 | |
0 0 0 1 1 1 1 1 | |
1111 111 11* 0x86d 56fc3 35,0b |
Q. 8×8の格子点上にAから出発する点の軌跡を描くようにプログラムされてるコンピューターがあります。 点は上下左右の隣の点にランダムに移って行きますが既に描かれた軌跡の上をもう一度移動することはできません。 点は15回向きを変え、直進した後、止まります。 このコンピューターが描く可能性のある最長の軌跡の距離を求めなさい。
p p p p p p p p p p p p p p p p
escape ^z^z | |
# 画面行末にステータス行表示 | |
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" | |
# 画面バッファ行数を増やす | |
defscrollback 10000 |
walker:ProbWalker(80%) | |
steps:76 | |
turn:15 | |
List(Point(4,0), Point(4,1), Point(4,2), Point(4,3), Point(4,4), Point(4,5), Point(3,5), Point(2,5), Point(1,5), Point(1,4), Point(1,3), Point(1,2), Point(1,1), Point(2,1), Point(3,1), Point(4,1), Point(5,1), Point(6,1), Point(6,2), Point(6,3), Point(6,4), Point(6,5), Point(6,6), Point(5,6), Point(4,6), Point(3,6), Point(2,6), Point(1,6), Point(0,6), Point(0,5), Point(0,4), Point(1,4), Point(2,4), Point(3,4), Point(4,4), Point(5,4), Point(6,4), Point(7,4), Point(7,5), Point(7,6), Point(7,7), Point(6,7), Point(5,7), Point(4,7), Point(3,7), Point(2,7), Point(2,6), Point(2,5), Point(2,4), Point(2,3), Point(2,2), Point(2,1), Point(2,0), Point(3,0), Point(4,0), Point(5,0), Point(6,0), Point(7,0), Point(7,1), Point(7,2), Point(7,3), Point(6,3), Point(5,3), Point(4,3), Point(3,3), Point(2,3), Point(1,3), Point(0,3), Point(0,2), Point(1,2), Point(2,2), Point(3,2), Point(4,2), Point(5,2), Point(6,2), Point(7,2)) | |
p p |
Q. There is a computer that is programmed to draw a locus of points starting from the point A on grid 8 × 8. The point we move on to the next random point up, down, left, and right. We will not be able to move again on the trail drawn already, however. The point is able to straight any number of times, but turning is up to 15 times. Find the longest distance of the trajectory of this computer may be drawn.
p p p p p p p p
public class Man extends Human { | |
@Override | |
void ProtectMyself() { | |
drink(new Happoushu()); | |
} | |
private void drink(Alcohol alcohol) { | |
if (alcohol != null) { | |
memory = null; |
public class FileExist extends TypeSafeMatcher<File> { | |
private final boolean isEexpectedResult; | |
private File inspected; | |
public FileExist(boolean exceptedResult) { | |
this.isEexpectedResult = exceptedResult; | |
} | |
@Override |