% ECLiPSe % http://eclipse.crosscoreop.com/eclipse/examples/nono.ecl.txt % Problem n2 ( http://www.pro.or.jp/~fuji/java/puzzle/nonogram/index-eng.html ) % % fztini 4.5 seconds % fz: with int_search on row_start_pos ++ col_start_pos: the solution comes after % 3 seconds and then 7 minutes for verifying that it is the only solution. % with int_search on row_start_pos ++ col_start_pos and -solutions 1: 4 sec! % lazy: 1.5 sec rows = 10; row_rule_len = 4; row_rules = array2d(1..rows, 1..row_rule_len, [ 0,0,0,1, 0,0,0,3, 0,0,1,3, 0,0,2,4, 0,0,1,2, 0,2,1,1, 1,1,1,1, 0,2,1,1, 0,0,2,2, 0,0,0,5 ]); cols = 10; col_rule_len = 4; col_rules = array2d(1..cols, 1..col_rule_len, [0,0,0,4, 0,0,1,3, 0,0,2,3, 0,0,1,2, 0,0,2,2, 0,1,1,1, 1,1,1,1, 0,1,1,1, 0,0,1,2, 0,0,0,5]);