mirror of
https://github.com/InternLM/InternBootcamp.git
synced 2026-04-19 12:58:04 +00:00
10900 lines
270 KiB
Python
Executable file
10900 lines
270 KiB
Python
Executable file
from .dsl import *
|
|
|
|
|
|
|
|
def verify_007bbfb7(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = other(x0, ZERO)
|
|
x2 = shape(I)
|
|
x3 = multiply(x2, x2)
|
|
x4 = canvas(ZERO, x3)
|
|
x5 = ofcolor(I, x1)
|
|
x6 = lbind(shift, x5)
|
|
x7 = shape(I)
|
|
x8 = rbind(multiply, x7)
|
|
x9 = apply(x8, x5)
|
|
x10 = mapply(x6, x9)
|
|
x11 = fill(x4, x1, x10)
|
|
return x11
|
|
|
|
|
|
def verify_00d62c1b(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = mostcolor(I)
|
|
x2 = colorfilter(x0, x1)
|
|
x3 = rbind(bordering, I)
|
|
x4 = compose(flip, x3)
|
|
x5 = mfilter(x2, x4)
|
|
x6 = fill(I, FOUR, x5)
|
|
return x6
|
|
|
|
|
|
def verify_017c7c7b(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = other(x0, ZERO)
|
|
x2 = ofcolor(I, x1)
|
|
x3 = asobject(I)
|
|
x4 = vperiod(x3)
|
|
x5 = height(I)
|
|
x6 = halve(x5)
|
|
x7 = add(x5, x6)
|
|
x8 = width(I)
|
|
x9 = astuple(x7, x8)
|
|
x10 = canvas(ZERO, x9)
|
|
x11 = increment(x7)
|
|
x12 = interval(ZERO, x11, x4)
|
|
x13 = lbind(shift, x2)
|
|
x14 = apply(toivec, x12)
|
|
x15 = mapply(x13, x14)
|
|
x16 = fill(x10, TWO, x15)
|
|
return x16
|
|
|
|
|
|
def verify_025d127b(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, T, T)
|
|
x2 = rbind(objects, F)
|
|
x3 = rbind(x2, F)
|
|
x4 = rbind(x3, T)
|
|
x5 = lbind(canvas, x0)
|
|
x6 = compose(x5, shape)
|
|
x7 = fork(paint, x6, normalize)
|
|
x8 = compose(x4, x7)
|
|
x9 = fork(colorfilter, x8, color)
|
|
x10 = rbind(shift, RIGHT)
|
|
x11 = rbind(argmax, rightmost)
|
|
x12 = compose(x11, x9)
|
|
x13 = fork(remove, x12, x9)
|
|
x14 = chain(x10, merge, x13)
|
|
x15 = rbind(argmax, rightmost)
|
|
x16 = compose(x15, x9)
|
|
x17 = fork(combine, x16, x14)
|
|
x18 = fork(shift, x17, ulcorner)
|
|
x19 = merge(x1)
|
|
x20 = fill(I, x0, x19)
|
|
x21 = mapply(x18, x1)
|
|
x22 = paint(x20, x21)
|
|
return x22
|
|
|
|
|
|
def verify_045e512c(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = argmax(x0, size)
|
|
x2 = height(x1)
|
|
x3 = width(x1)
|
|
x4 = neighbors(ORIGIN)
|
|
x5 = toindices(x1)
|
|
x6 = lbind(shift, x5)
|
|
x7 = height(I)
|
|
x8 = divide(x7, x2)
|
|
x9 = width(I)
|
|
x10 = divide(x9, x3)
|
|
x11 = astuple(x8, x10)
|
|
x12 = maximum(x11)
|
|
x13 = increment(x12)
|
|
x14 = interval(ONE, x13, ONE)
|
|
x15 = astuple(x2, x3)
|
|
x16 = lbind(multiply, x15)
|
|
x17 = compose(crement, x16)
|
|
x18 = lbind(mapply, x6)
|
|
x19 = rbind(apply, x14)
|
|
x20 = lbind(rbind, multiply)
|
|
x21 = compose(x20, x17)
|
|
x22 = chain(x18, x19, x21)
|
|
x23 = rbind(toobject, I)
|
|
x24 = compose(x6, x17)
|
|
x25 = chain(palette, x23, x24)
|
|
x26 = mostcolor(I)
|
|
x27 = rbind(equality, x26)
|
|
x28 = rbind(argmin, x27)
|
|
x29 = compose(x28, x25)
|
|
x30 = fork(recolor, x29, x22)
|
|
x31 = mapply(x30, x4)
|
|
x32 = paint(I, x31)
|
|
return x32
|
|
|
|
|
|
def verify_0520fde7(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = halve(x0)
|
|
x2 = tojvec(x1)
|
|
x3 = height(I)
|
|
x4 = decrement(x3)
|
|
x5 = astuple(x4, x1)
|
|
x6 = connect(x2, x5)
|
|
x7 = toobject(x6, I)
|
|
x8 = numcolors(x7)
|
|
x9 = equality(x8, ONE)
|
|
x10 = branch(x9, lefthalf, tophalf)
|
|
x11 = branch(x9, righthalf, bottomhalf)
|
|
x12 = x10(I)
|
|
x13 = x11(I)
|
|
x14 = palette(x12)
|
|
x15 = other(x14, ZERO)
|
|
x16 = palette(x13)
|
|
x17 = other(x16, ZERO)
|
|
x18 = shape(x12)
|
|
x19 = canvas(ZERO, x18)
|
|
x20 = ofcolor(x12, x15)
|
|
x21 = ofcolor(x13, x17)
|
|
x22 = intersection(x20, x21)
|
|
x23 = fill(x19, TWO, x22)
|
|
return x23
|
|
|
|
|
|
def verify_05269061(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = maximum(x0)
|
|
x2 = interval(ZERO, x1, ONE)
|
|
x3 = interval(ONE, x1, ONE)
|
|
x4 = rbind(toobject, I)
|
|
x5 = rbind(shoot, RIGHT)
|
|
x6 = chain(x4, x5, toivec)
|
|
x7 = rbind(shoot, DOWN)
|
|
x8 = chain(x4, x7, tojvec)
|
|
x9 = apply(x6, x2)
|
|
x10 = apply(x8, x2)
|
|
x11 = rbind(shoot, UP_RIGHT)
|
|
x12 = chain(x4, x11, toivec)
|
|
x13 = rbind(shoot, UP_RIGHT)
|
|
x14 = decrement(x1)
|
|
x15 = lbind(astuple, x14)
|
|
x16 = chain(x4, x13, x15)
|
|
x17 = apply(x12, x2)
|
|
x18 = apply(x16, x3)
|
|
x19 = combine(x17, x18)
|
|
x20 = rbind(shoot, NEG_UNITY)
|
|
x21 = decrement(x1)
|
|
x22 = lbind(astuple, x21)
|
|
x23 = chain(x4, x20, x22)
|
|
x24 = rbind(shoot, NEG_UNITY)
|
|
x25 = decrement(x1)
|
|
x26 = rbind(astuple, x25)
|
|
x27 = lbind(subtract, x25)
|
|
x28 = compose(x26, x27)
|
|
x29 = chain(x4, x24, x28)
|
|
x30 = apply(x23, x2)
|
|
x31 = apply(x29, x3)
|
|
x32 = combine(x30, x31)
|
|
x33 = rbind(valmax, numcolors)
|
|
x34 = matcher(x33, ONE)
|
|
x35 = x34(x9)
|
|
x36 = x34(x10)
|
|
x37 = x34(x19)
|
|
x38 = branch(x37, x19, x32)
|
|
x39 = branch(x36, x10, x38)
|
|
x40 = branch(x35, x9, x39)
|
|
x41 = apply(mostcolor, x40)
|
|
x42 = matcher(identity, ZERO)
|
|
x43 = compose(flip, x42)
|
|
x44 = sfilter(x41, x43)
|
|
x45 = size(x44)
|
|
x46 = double(x1)
|
|
x47 = divide(x46, x45)
|
|
x48 = increment(x47)
|
|
x49 = interval(ZERO, x48, ONE)
|
|
x50 = matcher(first, ZERO)
|
|
x51 = compose(flip, x50)
|
|
x52 = fork(recolor, first, last)
|
|
x53 = size(x40)
|
|
x54 = interval(ZERO, x53, ONE)
|
|
x55 = rbind(compose, first)
|
|
x56 = lbind(rbind, greater)
|
|
x57 = chain(x55, x56, decrement)
|
|
x58 = lbind(apply, last)
|
|
x59 = lbind(chain, x58)
|
|
x60 = rbind(x59, x57)
|
|
x61 = lbind(lbind, sfilter)
|
|
x62 = lbind(pair, x54)
|
|
x63 = chain(x60, x61, x62)
|
|
x64 = x63(x40)
|
|
x65 = x63(x41)
|
|
x66 = rbind(multiply, x45)
|
|
x67 = compose(x64, x66)
|
|
x68 = rbind(multiply, x45)
|
|
x69 = compose(x65, x68)
|
|
x70 = lbind(mapply, x52)
|
|
x71 = rbind(sfilter, x51)
|
|
x72 = lbind(pair, x41)
|
|
x73 = compose(x72, x67)
|
|
x74 = chain(x70, x71, x73)
|
|
x75 = lbind(mapply, x52)
|
|
x76 = rbind(sfilter, x51)
|
|
x77 = rbind(pair, x40)
|
|
x78 = compose(x77, x69)
|
|
x79 = chain(x75, x76, x78)
|
|
x80 = fork(combine, x74, x79)
|
|
x81 = mapply(x80, x49)
|
|
x82 = paint(I, x81)
|
|
return x82
|
|
|
|
|
|
def verify_05f2a901(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = extract(x0, x2)
|
|
x4 = other(x0, x3)
|
|
x5 = gravitate(x4, x3)
|
|
x6 = move(I, x4, x5)
|
|
return x6
|
|
|
|
|
|
def verify_06df4c85(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = frontiers(I)
|
|
x2 = merge(x1)
|
|
x3 = difference(x0, x2)
|
|
x4 = mostcolor(x3)
|
|
x5 = objects(I, T, F, F)
|
|
x6 = color(x2)
|
|
x7 = matcher(color, x6)
|
|
x8 = matcher(color, x4)
|
|
x9 = fork(either, x7, x8)
|
|
x10 = compose(flip, x9)
|
|
x11 = sfilter(x5, x10)
|
|
x12 = merge(x11)
|
|
x13 = palette(x12)
|
|
x14 = lbind(mfilter, x11)
|
|
x15 = lbind(matcher, color)
|
|
x16 = compose(x14, x15)
|
|
x17 = apply(x16, x13)
|
|
x18 = fork(either, vline, hline)
|
|
x19 = lbind(prapply, connect)
|
|
x20 = fork(x19, identity, identity)
|
|
x21 = compose(x20, toindices)
|
|
x22 = rbind(sfilter, x18)
|
|
x23 = chain(merge, x22, x21)
|
|
x24 = fork(recolor, color, x23)
|
|
x25 = mapply(x24, x17)
|
|
x26 = paint(I, x25)
|
|
x27 = paint(x26, x2)
|
|
return x27
|
|
|
|
|
|
def verify_08ed6ac7(I: Grid) -> Grid:
|
|
x0 = first(I)
|
|
x1 = mostcommon(x0)
|
|
x2 = dmirror(I)
|
|
x3 = matcher(identity, x1)
|
|
x4 = rbind(sfilter, x3)
|
|
x5 = compose(size, x4)
|
|
x6 = apply(x5, x2)
|
|
x7 = dedupe(x6)
|
|
x8 = order(x7, identity)
|
|
x9 = size(x8)
|
|
x10 = increment(x9)
|
|
x11 = increment(x10)
|
|
x12 = interval(ONE, x11, ONE)
|
|
x13 = pair(x8, x12)
|
|
x14 = height(I)
|
|
x15 = astuple(x14, x1)
|
|
x16 = repeat(x15, ONE)
|
|
x17 = combine(x16, x13)
|
|
x18 = lbind(extract, x17)
|
|
x19 = lbind(matcher, first)
|
|
x20 = chain(last, x18, x19)
|
|
x21 = compose(x20, x5)
|
|
x22 = fork(subtract, height, x5)
|
|
x23 = fork(repeat, x21, x22)
|
|
x24 = lbind(repeat, x1)
|
|
x25 = compose(x24, x5)
|
|
x26 = fork(combine, x25, x23)
|
|
x27 = apply(x26, x2)
|
|
x28 = dmirror(x27)
|
|
return x28
|
|
|
|
|
|
def verify_09629e4f(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = sfilter(x0, vline)
|
|
x3 = size(x1)
|
|
x4 = size(x2)
|
|
x5 = merge(x0)
|
|
x6 = color(x5)
|
|
x7 = shape(I)
|
|
x8 = canvas(x6, x7)
|
|
x9 = hconcat(I, x8)
|
|
x10 = objects(x9, F, T, T)
|
|
x11 = argmin(x10, numcolors)
|
|
x12 = normalize(x11)
|
|
x13 = toindices(x12)
|
|
x14 = increment(x3)
|
|
x15 = increment(x14)
|
|
x16 = increment(x4)
|
|
x17 = increment(x16)
|
|
x18 = astuple(x15, x17)
|
|
x19 = lbind(shift, x13)
|
|
x20 = rbind(multiply, x18)
|
|
x21 = chain(x19, x20, last)
|
|
x22 = fork(recolor, first, x21)
|
|
x23 = normalize(x11)
|
|
x24 = mapply(x22, x23)
|
|
x25 = paint(x8, x24)
|
|
return x25
|
|
|
|
|
|
def verify_0962bcdd(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = lbind(mapply, dneighbors)
|
|
x2 = compose(x1, toindices)
|
|
x3 = fork(recolor, mostcolor, x2)
|
|
x4 = compose(decrement, ulcorner)
|
|
x5 = compose(increment, lrcorner)
|
|
x6 = fork(connect, x4, x5)
|
|
x7 = compose(hmirror, x6)
|
|
x8 = fork(combine, x6, x7)
|
|
x9 = fork(recolor, leastcolor, x8)
|
|
x10 = mapply(x3, x0)
|
|
x11 = paint(I, x10)
|
|
x12 = mapply(x9, x0)
|
|
x13 = paint(x11, x12)
|
|
return x13
|
|
|
|
|
|
def verify_0a938d79(I: Grid) -> Grid:
|
|
x0 = portrait(I)
|
|
x1 = branch(x0, dmirror, identity)
|
|
x2 = x1(I)
|
|
x3 = objects(x2, T, F, T)
|
|
x4 = argmin(x3, leftmost)
|
|
x5 = argmax(x3, leftmost)
|
|
x6 = color(x4)
|
|
x7 = color(x5)
|
|
x8 = leftmost(x4)
|
|
x9 = leftmost(x5)
|
|
x10 = subtract(x9, x8)
|
|
x11 = double(x10)
|
|
x12 = multiply(THREE, TEN)
|
|
x13 = interval(x8, x12, x11)
|
|
x14 = interval(x9, x12, x11)
|
|
x15 = compose(vfrontier, tojvec)
|
|
x16 = mapply(x15, x13)
|
|
x17 = mapply(x15, x14)
|
|
x18 = recolor(x6, x16)
|
|
x19 = recolor(x7, x17)
|
|
x20 = combine(x18, x19)
|
|
x21 = paint(x2, x20)
|
|
x22 = x1(x21)
|
|
return x22
|
|
|
|
|
|
def verify_0b148d64(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmin(x0, x1)
|
|
x3 = subgrid(x2, I)
|
|
return x3
|
|
|
|
|
|
def verify_0ca9ddb6(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, ONE)
|
|
x1 = ofcolor(I, TWO)
|
|
x2 = mapply(dneighbors, x0)
|
|
x3 = mapply(ineighbors, x1)
|
|
x4 = fill(I, SEVEN, x2)
|
|
x5 = fill(x4, FOUR, x3)
|
|
return x5
|
|
|
|
|
|
def verify_0d3d703e(I: Grid) -> Grid:
|
|
x0 = switch(I, THREE, FOUR)
|
|
x1 = switch(x0, EIGHT, NINE)
|
|
x2 = switch(x1, TWO, SIX)
|
|
x3 = switch(x2, ONE, FIVE)
|
|
return x3
|
|
|
|
|
|
def verify_0dfd9992(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = lbind(colorfilter, x1)
|
|
x3 = compose(size, x2)
|
|
x4 = valmin(x0, x3)
|
|
x5 = matcher(x3, x4)
|
|
x6 = sfilter(x0, x5)
|
|
x7 = lbind(colorcount, I)
|
|
x8 = argmin(x6, x7)
|
|
x9 = asobject(I)
|
|
x10 = matcher(first, x8)
|
|
x11 = compose(flip, x10)
|
|
x12 = sfilter(x9, x11)
|
|
x13 = lbind(contained, x8)
|
|
x14 = compose(flip, x13)
|
|
x15 = sfilter(I, x14)
|
|
x16 = asobject(x15)
|
|
x17 = hperiod(x16)
|
|
x18 = dmirror(I)
|
|
x19 = sfilter(x18, x14)
|
|
x20 = asobject(x19)
|
|
x21 = hperiod(x20)
|
|
x22 = (x21, x17)
|
|
x23 = lbind(multiply, x22)
|
|
x24 = neighbors(ORIGIN)
|
|
x25 = mapply(neighbors, x24)
|
|
x26 = apply(x23, x25)
|
|
x27 = lbind(shift, x12)
|
|
x28 = mapply(x27, x26)
|
|
x29 = paint(I, x28)
|
|
return x29
|
|
|
|
|
|
def verify_0e206a2e(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = matcher(numcolors, FOUR)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = apply(normalize, x2)
|
|
x4 = merge(x2)
|
|
x5 = cover(I, x4)
|
|
x6 = lbind(compose, flip)
|
|
x7 = lbind(matcher, first)
|
|
x8 = chain(x6, x7, mostcolor)
|
|
x9 = fork(sfilter, identity, x8)
|
|
x10 = chain(invert, ulcorner, x9)
|
|
x11 = lbind(lbind, shift)
|
|
x12 = fork(shift, identity, x10)
|
|
x13 = compose(x11, x12)
|
|
x14 = lbind(fork, mapply)
|
|
x15 = lbind(x14, x13)
|
|
x16 = rbind(compose, x9)
|
|
x17 = lbind(lbind, occurrences)
|
|
x18 = chain(x15, x16, x17)
|
|
x19 = rbind(mapply, x3)
|
|
x20 = compose(x19, x18)
|
|
x21 = fork(paint, identity, x20)
|
|
x22 = chain(identity, x21, identity)
|
|
x23 = chain(dmirror, x21, dmirror)
|
|
x24 = chain(cmirror, x21, cmirror)
|
|
x25 = chain(hmirror, x21, hmirror)
|
|
x26 = chain(vmirror, x21, vmirror)
|
|
x27 = chain(rot90, x21, rot270)
|
|
x28 = chain(rot180, x21, rot180)
|
|
x29 = chain(rot270, x21, rot90)
|
|
x30 = chain(x29, x28, x27)
|
|
x31 = chain(x26, x25, x24)
|
|
x32 = compose(x23, x22)
|
|
x33 = chain(x30, x31, x32)
|
|
x34 = x33(x5)
|
|
return x34
|
|
|
|
|
|
def verify_10fcaaa3(I: Grid) -> Grid:
|
|
x0 = hconcat(I, I)
|
|
x1 = vconcat(x0, x0)
|
|
x2 = asindices(x1)
|
|
x3 = mostcolor(I)
|
|
x4 = ofcolor(x1, x3)
|
|
x5 = difference(x2, x4)
|
|
x6 = mapply(ineighbors, x5)
|
|
x7 = underfill(x1, EIGHT, x6)
|
|
return x7
|
|
|
|
|
|
def verify_11852cab(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = lbind(remove, x0)
|
|
x2 = chain(positive, size, x1)
|
|
x3 = compose(x2, palette)
|
|
x4 = multiply(FIVE, UNITY)
|
|
x5 = canvas(ZERO, x4)
|
|
x6 = asindices(x5)
|
|
x7 = fork(add, first, last)
|
|
x8 = chain(flip, even, x7)
|
|
x9 = sfilter(x6, x8)
|
|
x10 = initset(x0)
|
|
x11 = box(x6)
|
|
x12 = inbox(x6)
|
|
x13 = center(x6)
|
|
x14 = initset(x13)
|
|
x15 = lbind(toobject, x11)
|
|
x16 = compose(x3, x15)
|
|
x17 = lbind(toobject, x12)
|
|
x18 = compose(x3, x17)
|
|
x19 = lbind(toobject, x14)
|
|
x20 = compose(x3, x19)
|
|
x21 = fork(both, x18, x20)
|
|
x22 = fork(both, x16, x21)
|
|
x23 = compose(x22, trim)
|
|
x24 = compose(box, asindices)
|
|
x25 = fork(toobject, x24, identity)
|
|
x26 = compose(palette, x25)
|
|
x27 = matcher(x26, x10)
|
|
x28 = lbind(toobject, x9)
|
|
x29 = chain(palette, x28, trim)
|
|
x30 = matcher(x29, x10)
|
|
x31 = compose(minimum, shape)
|
|
x32 = chain(x31, merge, fgpartition)
|
|
x33 = matcher(x32, FIVE)
|
|
x34 = fork(both, x23, x27)
|
|
x35 = fork(both, x30, x33)
|
|
x36 = fork(both, x34, x35)
|
|
x37 = height(I)
|
|
x38 = subtract(x37, THREE)
|
|
x39 = interval(ONE, x38, ONE)
|
|
x40 = width(I)
|
|
x41 = subtract(x40, THREE)
|
|
x42 = interval(ONE, x41, ONE)
|
|
x43 = multiply(SEVEN, UNITY)
|
|
x44 = lbind(crop, I)
|
|
x45 = rbind(x44, x43)
|
|
x46 = chain(x36, x45, decrement)
|
|
x47 = product(x39, x42)
|
|
x48 = sfilter(x47, x46)
|
|
x49 = matcher(first, x0)
|
|
x50 = compose(flip, x49)
|
|
x51 = rbind(sfilter, x50)
|
|
x52 = compose(x51, dmirror)
|
|
x53 = fork(combine, x51, x52)
|
|
x54 = compose(x51, cmirror)
|
|
x55 = compose(x51, hmirror)
|
|
x56 = compose(x51, vmirror)
|
|
x57 = fork(combine, x55, x56)
|
|
x58 = fork(combine, x54, x57)
|
|
x59 = fork(combine, x53, x58)
|
|
x60 = multiply(FOUR, UNITY)
|
|
x61 = rbind(add, x60)
|
|
x62 = fork(insert, x61, initset)
|
|
x63 = compose(backdrop, x62)
|
|
x64 = rbind(toobject, I)
|
|
x65 = chain(x59, x64, x63)
|
|
x66 = mapply(x65, x48)
|
|
x67 = paint(I, x66)
|
|
return x67
|
|
|
|
|
|
def verify_1190e5a7(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = corners(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = palette(I)
|
|
x5 = rbind(equality, x3)
|
|
x6 = argmin(x4, x5)
|
|
x7 = asindices(I)
|
|
x8 = ofcolor(I, x3)
|
|
x9 = difference(x7, x8)
|
|
x10 = fill(I, x6, x9)
|
|
x11 = frontiers(x10)
|
|
x12 = sfilter(x11, vline)
|
|
x13 = difference(x11, x12)
|
|
x14 = astuple(x13, x12)
|
|
x15 = apply(size, x14)
|
|
x16 = increment(x15)
|
|
x17 = canvas(x3, x16)
|
|
return x17
|
|
|
|
|
|
def verify_137eaa0f(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = palette(x1)
|
|
x3 = objects(I, T, F, T)
|
|
x4 = totuple(x3)
|
|
x5 = apply(color, x4)
|
|
x6 = lbind(sfilter, x5)
|
|
x7 = lbind(matcher, identity)
|
|
x8 = chain(size, x6, x7)
|
|
x9 = valmax(x2, x8)
|
|
x10 = matcher(x8, x9)
|
|
x11 = sfilter(x2, x10)
|
|
x12 = lbind(colorcount, I)
|
|
x13 = argmin(x11, x12)
|
|
x14 = ofcolor(I, x13)
|
|
x15 = recolor(x13, x14)
|
|
x16 = apply(initset, x15)
|
|
x17 = remove(x15, x0)
|
|
x18 = lbind(argmin, x16)
|
|
x19 = lbind(rbind, manhattan)
|
|
x20 = compose(x18, x19)
|
|
x21 = fork(combine, identity, x20)
|
|
x22 = apply(x21, x17)
|
|
x23 = matcher(first, x13)
|
|
x24 = rbind(sfilter, x23)
|
|
x25 = chain(invert, ulcorner, x24)
|
|
x26 = fork(shift, identity, x25)
|
|
x27 = mapply(x26, x22)
|
|
x28 = normalize(x27)
|
|
x29 = shape(x28)
|
|
x30 = canvas(ZERO, x29)
|
|
x31 = paint(x30, x28)
|
|
return x31
|
|
|
|
|
|
def verify_150deff5(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = leastcolor(I)
|
|
x2 = shape(I)
|
|
x3 = add(TWO, x2)
|
|
x4 = canvas(x0, x3)
|
|
x5 = asobject(I)
|
|
x6 = shift(x5, UNITY)
|
|
x7 = paint(x4, x6)
|
|
x8 = astuple(TWO, ONE)
|
|
x9 = dneighbors(UNITY)
|
|
x10 = remove(x8, x9)
|
|
x11 = recolor(x0, x10)
|
|
x12 = initset(UNITY)
|
|
x13 = recolor(x1, x12)
|
|
x14 = combine(x11, x13)
|
|
x15 = astuple(THREE, ONE)
|
|
x16 = connect(UNITY, x15)
|
|
x17 = recolor(TWO, x16)
|
|
x18 = initset(TWO_BY_TWO)
|
|
x19 = insert(UNITY, x18)
|
|
x20 = backdrop(x19)
|
|
x21 = astuple(TWO, THREE)
|
|
x22 = astuple(THREE, TWO)
|
|
x23 = initset(x22)
|
|
x24 = insert(x21, x23)
|
|
x25 = insert(THREE_BY_THREE, x24)
|
|
x26 = recolor(x1, x20)
|
|
x27 = outbox(x20)
|
|
x28 = difference(x27, x25)
|
|
x29 = recolor(x0, x28)
|
|
x30 = combine(x26, x29)
|
|
x31 = recolor(EIGHT, x20)
|
|
x32 = lbind(lbind, shift)
|
|
x33 = compose(x32, last)
|
|
x34 = lbind(fork, paint)
|
|
x35 = lbind(x34, identity)
|
|
x36 = lbind(lbind, mapply)
|
|
x37 = compose(x36, x33)
|
|
x38 = lbind(rbind, occurrences)
|
|
x39 = compose(x38, first)
|
|
x40 = fork(compose, x37, x39)
|
|
x41 = compose(x35, x40)
|
|
x42 = astuple(x14, x17)
|
|
x43 = x41(x42)
|
|
x44 = compose(rot90, x43)
|
|
x45 = power(x44, FOUR)
|
|
x46 = astuple(x30, x31)
|
|
x47 = x41(x46)
|
|
x48 = compose(rot90, x47)
|
|
x49 = power(x48, FOUR)
|
|
x50 = compose(x45, x49)
|
|
x51 = initset(ORIGIN)
|
|
x52 = difference(x51, x51)
|
|
x53 = lbind(recolor, TWO)
|
|
x54 = rbind(ofcolor, TWO)
|
|
x55 = compose(x53, x54)
|
|
x56 = lbind(recolor, EIGHT)
|
|
x57 = rbind(ofcolor, EIGHT)
|
|
x58 = compose(x56, x57)
|
|
x59 = fork(combine, x55, x58)
|
|
x60 = lbind(recolor, x0)
|
|
x61 = compose(x60, x59)
|
|
x62 = fork(paint, identity, x61)
|
|
x63 = chain(x62, x50, first)
|
|
x64 = chain(x59, x50, first)
|
|
x65 = fork(combine, last, x64)
|
|
x66 = fork(astuple, x63, x65)
|
|
x67 = astuple(x7, x52)
|
|
x68 = power(x66, FIVE)
|
|
x69 = x68(x67)
|
|
x70 = first(x69)
|
|
x71 = last(x69)
|
|
x72 = paint(x70, x71)
|
|
x73 = trim(x72)
|
|
return x73
|
|
|
|
|
|
def verify_178fcbfb(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = ofcolor(I, THREE)
|
|
x2 = ofcolor(I, ONE)
|
|
x3 = mapply(vfrontier, x0)
|
|
x4 = mapply(hfrontier, x1)
|
|
x5 = mapply(hfrontier, x2)
|
|
x6 = fill(I, TWO, x3)
|
|
x7 = fill(x6, THREE, x4)
|
|
x8 = fill(x7, ONE, x5)
|
|
return x8
|
|
|
|
|
|
def verify_1a07d186(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = mostcolor(I)
|
|
x2 = asindices(I)
|
|
x3 = ofcolor(I, x1)
|
|
x4 = difference(x2, x3)
|
|
x5 = mapply(toindices, x0)
|
|
x6 = difference(x4, x5)
|
|
x7 = toobject(x6, I)
|
|
x8 = apply(initset, x7)
|
|
x9 = fill(I, x1, x6)
|
|
x10 = lbind(fork, shift)
|
|
x11 = lbind(x10, identity)
|
|
x12 = lbind(rbind, gravitate)
|
|
x13 = compose(x11, x12)
|
|
x14 = lbind(colorfilter, x8)
|
|
x15 = compose(x14, color)
|
|
x16 = fork(mapply, x13, x15)
|
|
x17 = mapply(x16, x0)
|
|
x18 = paint(x9, x17)
|
|
return x18
|
|
|
|
|
|
def verify_1b2d62fb(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = halve(x0)
|
|
x2 = tojvec(x1)
|
|
x3 = height(I)
|
|
x4 = decrement(x3)
|
|
x5 = astuple(x4, x1)
|
|
x6 = connect(x2, x5)
|
|
x7 = toobject(x6, I)
|
|
x8 = numcolors(x7)
|
|
x9 = equality(x8, ONE)
|
|
x10 = branch(x9, lefthalf, tophalf)
|
|
x11 = branch(x9, righthalf, bottomhalf)
|
|
x12 = x10(I)
|
|
x13 = x11(I)
|
|
x14 = shape(x12)
|
|
x15 = canvas(ZERO, x14)
|
|
x16 = ofcolor(x12, ZERO)
|
|
x17 = ofcolor(x13, ZERO)
|
|
x18 = intersection(x16, x17)
|
|
x19 = fill(x15, EIGHT, x18)
|
|
return x19
|
|
|
|
|
|
def verify_1b60fb0c(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = mapply(toindices, x0)
|
|
x2 = rot90(I)
|
|
x3 = fgpartition(x2)
|
|
x4 = mapply(toindices, x3)
|
|
x5 = normalize(x4)
|
|
x6 = ulcorner(x1)
|
|
x7 = shift(x5, x6)
|
|
x8 = shape(x1)
|
|
x9 = maximum(x8)
|
|
x10 = minimum(x8)
|
|
x11 = subtract(x9, x10)
|
|
x12 = increment(x11)
|
|
x13 = power(outbox, x12)
|
|
x14 = center(x7)
|
|
x15 = x13(x7)
|
|
x16 = backdrop(x15)
|
|
x17 = invert(x14)
|
|
x18 = shift(x16, x17)
|
|
x19 = lbind(combine, x1)
|
|
x20 = lbind(shift, x7)
|
|
x21 = compose(x19, x20)
|
|
x22 = rbind(ofcolor, ONE)
|
|
x23 = lbind(canvas, ZERO)
|
|
x24 = chain(x23, shape, x21)
|
|
x25 = lbind(recolor, ONE)
|
|
x26 = chain(x25, normalize, x21)
|
|
x27 = fork(paint, x24, x26)
|
|
x28 = chain(x22, rot90, x27)
|
|
x29 = compose(normalize, x21)
|
|
x30 = fork(equality, x29, x28)
|
|
x31 = sfilter(x18, x30)
|
|
x32 = lbind(intersection, x1)
|
|
x33 = lbind(shift, x7)
|
|
x34 = chain(size, x32, x33)
|
|
x35 = argmax(x31, x34)
|
|
x36 = shift(x7, x35)
|
|
x37 = difference(x36, x1)
|
|
x38 = fill(I, TWO, x37)
|
|
return x38
|
|
|
|
|
|
def verify_1bfc4729(I: Grid) -> Grid:
|
|
x0 = tophalf(I)
|
|
x1 = bottomhalf(I)
|
|
x2 = leastcolor(x0)
|
|
x3 = leastcolor(x1)
|
|
x4 = ofcolor(I, x2)
|
|
x5 = center(x4)
|
|
x6 = ofcolor(I, x3)
|
|
x7 = center(x6)
|
|
x8 = height(I)
|
|
x9 = width(I)
|
|
x10 = hfrontier(x5)
|
|
x11 = fill(I, x2, x10)
|
|
x12 = hfrontier(x7)
|
|
x13 = fill(x11, x3, x12)
|
|
x14 = decrement(x9)
|
|
x15 = decrement(x8)
|
|
x16 = halve(x8)
|
|
x17 = tojvec(x14)
|
|
x18 = connect(ORIGIN, x17)
|
|
x19 = fill(x13, x2, x18)
|
|
x20 = toivec(x15)
|
|
x21 = astuple(x15, x14)
|
|
x22 = connect(x20, x21)
|
|
x23 = fill(x19, x3, x22)
|
|
x24 = decrement(x16)
|
|
x25 = toivec(x24)
|
|
x26 = connect(ORIGIN, x25)
|
|
x27 = fill(x23, x2, x26)
|
|
x28 = tojvec(x14)
|
|
x29 = decrement(x16)
|
|
x30 = astuple(x29, x14)
|
|
x31 = connect(x28, x30)
|
|
x32 = fill(x27, x2, x31)
|
|
x33 = toivec(x16)
|
|
x34 = toivec(x15)
|
|
x35 = connect(x33, x34)
|
|
x36 = fill(x32, x3, x35)
|
|
x37 = astuple(x16, x14)
|
|
x38 = astuple(x15, x14)
|
|
x39 = connect(x37, x38)
|
|
x40 = fill(x36, x3, x39)
|
|
return x40
|
|
|
|
|
|
def verify_1c786137(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = lbind(colorfilter, x0)
|
|
x2 = compose(size, x1)
|
|
x3 = matcher(x2, ONE)
|
|
x4 = palette(I)
|
|
x5 = sfilter(x4, x3)
|
|
x6 = fork(equality, toindices, box)
|
|
x7 = rbind(contained, x5)
|
|
x8 = compose(x7, color)
|
|
x9 = sfilter(x0, x8)
|
|
x10 = rbind(greater, SEVEN)
|
|
x11 = compose(x10, size)
|
|
x12 = sfilter(x9, x11)
|
|
x13 = extract(x12, x6)
|
|
x14 = subgrid(x13, I)
|
|
x15 = trim(x14)
|
|
return x15
|
|
|
|
|
|
def verify_1caeab9d(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = ofcolor(I, ONE)
|
|
x2 = lowermost(x1)
|
|
x3 = lbind(subtract, x2)
|
|
x4 = chain(toivec, x3, lowermost)
|
|
x5 = fork(shift, identity, x4)
|
|
x6 = merge(x0)
|
|
x7 = cover(I, x6)
|
|
x8 = mapply(x5, x0)
|
|
x9 = paint(x7, x8)
|
|
return x9
|
|
|
|
|
|
def verify_1cf80156(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = palette(I)
|
|
x4 = other(x3, x2)
|
|
x5 = objects(I, T, T, F)
|
|
x6 = matcher(color, x4)
|
|
x7 = extract(x5, x6)
|
|
x8 = subgrid(x7, I)
|
|
return x8
|
|
|
|
|
|
def verify_1e0a9b12(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = rot270(I)
|
|
x2 = matcher(identity, x0)
|
|
x3 = rbind(sfilter, x2)
|
|
x4 = compose(flip, x2)
|
|
x5 = rbind(sfilter, x4)
|
|
x6 = fork(combine, x3, x5)
|
|
x7 = apply(x6, x1)
|
|
x8 = rot90(x7)
|
|
return x8
|
|
|
|
|
|
def verify_1e32b0e9(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = leastcommon(x2)
|
|
x4 = matcher(color, x3)
|
|
x5 = sfilter(x0, x4)
|
|
x6 = merge(x5)
|
|
x7 = color(x6)
|
|
x8 = shape(I)
|
|
x9 = canvas(x7, x8)
|
|
x10 = hconcat(I, x9)
|
|
x11 = objects(x10, F, T, T)
|
|
x12 = first(x11)
|
|
x13 = box(x12)
|
|
x14 = rbind(contained, x13)
|
|
x15 = compose(x14, last)
|
|
x16 = sfilter(x12, x15)
|
|
x17 = color(x16)
|
|
x18 = palette(I)
|
|
x19 = remove(x7, x18)
|
|
x20 = other(x19, x17)
|
|
x21 = rbind(colorcount, x17)
|
|
x22 = argmin(x11, x21)
|
|
x23 = apply(ulcorner, x11)
|
|
x24 = normalize(x22)
|
|
x25 = matcher(first, x20)
|
|
x26 = sfilter(x24, x25)
|
|
x27 = toindices(x26)
|
|
x28 = lbind(shift, x27)
|
|
x29 = mapply(x28, x23)
|
|
x30 = ofcolor(I, x20)
|
|
x31 = difference(x29, x30)
|
|
x32 = fill(I, x7, x31)
|
|
return x32
|
|
|
|
|
|
def verify_1f0c79e5(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = rbind(other, TWO)
|
|
x2 = compose(x1, palette)
|
|
x3 = matcher(first, TWO)
|
|
x4 = rbind(sfilter, x3)
|
|
x5 = compose(x4, normalize)
|
|
x6 = lbind(apply, double)
|
|
x7 = chain(x6, toindices, x5)
|
|
x8 = rbind(add, NEG_ONE)
|
|
x9 = lbind(apply, x8)
|
|
x10 = compose(x9, x7)
|
|
x11 = lbind(rbind, shoot)
|
|
x12 = rbind(compose, x11)
|
|
x13 = lbind(rbind, mapply)
|
|
x14 = chain(x12, x13, toindices)
|
|
x15 = fork(mapply, x14, x10)
|
|
x16 = fork(recolor, x2, x15)
|
|
x17 = mapply(x16, x0)
|
|
x18 = paint(I, x17)
|
|
return x18
|
|
|
|
|
|
def verify_1f642eb9(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = argmax(x3, size)
|
|
x5 = outbox(x4)
|
|
x6 = corners(x5)
|
|
x7 = toobject(x6, I)
|
|
x8 = color(x7)
|
|
x9 = asindices(I)
|
|
x10 = ofcolor(I, x8)
|
|
x11 = toindices(x4)
|
|
x12 = combine(x10, x11)
|
|
x13 = difference(x9, x12)
|
|
x14 = toobject(x13, I)
|
|
x15 = apply(initset, x14)
|
|
x16 = rbind(gravitate, x4)
|
|
x17 = compose(crement, x16)
|
|
x18 = fork(shift, identity, x17)
|
|
x19 = mapply(x18, x15)
|
|
x20 = paint(I, x19)
|
|
return x20
|
|
|
|
|
|
def verify_1f85a75f(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = lbind(sfilter, x2)
|
|
x4 = lbind(matcher, identity)
|
|
x5 = chain(size, x3, x4)
|
|
x6 = matcher(x5, ONE)
|
|
x7 = sfilter(x2, x6)
|
|
x8 = lbind(colorcount, I)
|
|
x9 = argmax(x7, x8)
|
|
x10 = matcher(color, x9)
|
|
x11 = extract(x0, x10)
|
|
x12 = subgrid(x11, I)
|
|
return x12
|
|
|
|
|
|
def verify_1f876c06(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = compose(last, first)
|
|
x2 = power(last, TWO)
|
|
x3 = fork(connect, x1, x2)
|
|
x4 = fork(recolor, color, x3)
|
|
x5 = mapply(x4, x0)
|
|
x6 = paint(I, x5)
|
|
return x6
|
|
|
|
|
|
def verify_1fad071e(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = colorfilter(x0, ONE)
|
|
x2 = sizefilter(x1, FOUR)
|
|
x3 = fork(equality, height, width)
|
|
x4 = sfilter(x2, x3)
|
|
x5 = size(x4)
|
|
x6 = subtract(FIVE, x5)
|
|
x7 = astuple(ONE, x5)
|
|
x8 = canvas(ONE, x7)
|
|
x9 = astuple(ONE, x6)
|
|
x10 = mostcolor(I)
|
|
x11 = canvas(x10, x9)
|
|
x12 = hconcat(x8, x11)
|
|
return x12
|
|
|
|
|
|
def verify_2013d3e2(I: Grid) -> Grid:
|
|
x0 = lbind(apply, last)
|
|
x1 = compose(positive, first)
|
|
x2 = lbind(interval, ZERO)
|
|
x3 = rbind(x2, ONE)
|
|
x4 = rbind(sfilter, x1)
|
|
x5 = compose(x3, size)
|
|
x6 = fork(pair, x5, identity)
|
|
x7 = chain(x0, x4, x6)
|
|
x8 = rbind(branch, identity)
|
|
x9 = rbind(x8, x7)
|
|
x10 = chain(size, dedupe, first)
|
|
x11 = lbind(equality, ONE)
|
|
x12 = chain(x9, x11, x10)
|
|
x13 = compose(initset, x12)
|
|
x14 = fork(rapply, x13, identity)
|
|
x15 = compose(first, x14)
|
|
x16 = rbind(branch, identity)
|
|
x17 = rbind(x16, x15)
|
|
x18 = chain(x17, positive, size)
|
|
x19 = compose(initset, x18)
|
|
x20 = fork(rapply, x19, identity)
|
|
x21 = compose(first, x20)
|
|
x22 = multiply(TEN, THREE)
|
|
x23 = power(x21, x22)
|
|
x24 = compose(rot90, x23)
|
|
x25 = power(x24, FOUR)
|
|
x26 = x25(I)
|
|
x27 = lefthalf(x26)
|
|
x28 = tophalf(x27)
|
|
return x28
|
|
|
|
|
|
def verify_2204b7a8(I: Grid) -> Grid:
|
|
x0 = first(I)
|
|
x1 = dedupe(x0)
|
|
x2 = size(x1)
|
|
x3 = equality(x2, ONE)
|
|
x4 = flip(x3)
|
|
x5 = branch(x4, lefthalf, tophalf)
|
|
x6 = branch(x4, righthalf, bottomhalf)
|
|
x7 = branch(x4, hconcat, vconcat)
|
|
x8 = x5(I)
|
|
x9 = x6(I)
|
|
x10 = index(x8, ORIGIN)
|
|
x11 = shape(x9)
|
|
x12 = decrement(x11)
|
|
x13 = index(x9, x12)
|
|
x14 = mostcolor(I)
|
|
x15 = mostcolor(I)
|
|
x16 = palette(I)
|
|
x17 = remove(x10, x16)
|
|
x18 = remove(x13, x17)
|
|
x19 = remove(x15, x18)
|
|
x20 = first(x19)
|
|
x21 = replace(x8, x20, x10)
|
|
x22 = branch(x4, dmirror, identity)
|
|
x23 = branch(x4, height, width)
|
|
x24 = x23(I)
|
|
x25 = astuple(ONE, x24)
|
|
x26 = canvas(x14, x25)
|
|
x27 = x22(x26)
|
|
x28 = replace(x9, x20, x13)
|
|
x29 = x7(x21, x27)
|
|
x30 = branch(x4, width, height)
|
|
x31 = x30(I)
|
|
x32 = even(x31)
|
|
x33 = branch(x32, x21, x29)
|
|
x34 = x7(x33, x28)
|
|
return x34
|
|
|
|
|
|
def verify_22168020(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = mostcolor(I)
|
|
x2 = remove(x1, x0)
|
|
x3 = lbind(ofcolor, I)
|
|
x4 = lbind(prapply, connect)
|
|
x5 = fork(x4, x3, x3)
|
|
x6 = compose(merge, x5)
|
|
x7 = fork(recolor, identity, x6)
|
|
x8 = mapply(x7, x2)
|
|
x9 = paint(I, x8)
|
|
return x9
|
|
|
|
|
|
def verify_22233c11(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = rbind(upscale, TWO)
|
|
x2 = chain(invert, halve, shape)
|
|
x3 = fork(combine, hfrontier, vfrontier)
|
|
x4 = compose(x1, vmirror)
|
|
x5 = fork(shift, x4, x2)
|
|
x6 = compose(toindices, x5)
|
|
x7 = lbind(mapply, x3)
|
|
x8 = compose(x7, toindices)
|
|
x9 = fork(difference, x6, x8)
|
|
x10 = mapply(x9, x0)
|
|
x11 = fill(I, EIGHT, x10)
|
|
return x11
|
|
|
|
|
|
def verify_2281f1f4(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = apply(first, x1)
|
|
x3 = apply(last, x1)
|
|
x4 = product(x2, x3)
|
|
x5 = difference(x4, x1)
|
|
x6 = fill(I, TWO, x5)
|
|
x7 = lbind(fork, either)
|
|
x8 = lbind(matcher, first)
|
|
x9 = compose(x8, first)
|
|
x10 = lbind(matcher, last)
|
|
x11 = compose(x10, last)
|
|
x12 = fork(x7, x9, x11)
|
|
x13 = lbind(sfilter, x1)
|
|
x14 = chain(size, x13, x12)
|
|
x15 = asindices(I)
|
|
x16 = corners(x15)
|
|
x17 = argmax(x16, x14)
|
|
x18 = mostcolor(I)
|
|
x19 = initset(x17)
|
|
x20 = fill(x6, x18, x19)
|
|
return x20
|
|
|
|
|
|
def verify_228f6490(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, T, F)
|
|
x2 = colorfilter(x1, x0)
|
|
x3 = compose(normalize, toindices)
|
|
x4 = difference(x1, x2)
|
|
x5 = rbind(bordering, I)
|
|
x6 = compose(flip, x5)
|
|
x7 = sfilter(x2, x6)
|
|
x8 = rbind(toobject, I)
|
|
x9 = lbind(mapply, neighbors)
|
|
x10 = compose(x9, toindices)
|
|
x11 = fork(difference, x10, identity)
|
|
x12 = chain(mostcolor, x8, x11)
|
|
x13 = totuple(x7)
|
|
x14 = apply(x12, x13)
|
|
x15 = mostcommon(x14)
|
|
x16 = matcher(x12, x15)
|
|
x17 = sfilter(x7, x16)
|
|
x18 = lbind(argmax, x4)
|
|
x19 = lbind(matcher, x3)
|
|
x20 = chain(x18, x19, x3)
|
|
x21 = compose(color, x20)
|
|
x22 = fork(recolor, x21, identity)
|
|
x23 = mapply(x20, x17)
|
|
x24 = cover(I, x23)
|
|
x25 = mapply(x22, x17)
|
|
x26 = paint(x24, x25)
|
|
return x26
|
|
|
|
|
|
def verify_22eb0ac0(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = asobject(I)
|
|
x2 = matcher(first, x0)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = apply(initset, x4)
|
|
x6 = product(x5, x5)
|
|
x7 = compose(color, first)
|
|
x8 = compose(color, last)
|
|
x9 = fork(equality, x7, x8)
|
|
x10 = sfilter(x6, x9)
|
|
x11 = compose(leftmost, first)
|
|
x12 = compose(leftmost, last)
|
|
x13 = fork(equality, x11, x12)
|
|
x14 = compose(uppermost, first)
|
|
x15 = compose(uppermost, last)
|
|
x16 = fork(equality, x14, x15)
|
|
x17 = fork(either, x13, x16)
|
|
x18 = sfilter(x10, x17)
|
|
x19 = compose(color, first)
|
|
x20 = compose(center, first)
|
|
x21 = compose(center, last)
|
|
x22 = fork(connect, x20, x21)
|
|
x23 = fork(recolor, x19, x22)
|
|
x24 = height(I)
|
|
x25 = width(I)
|
|
x26 = matcher(last, ZERO)
|
|
x27 = decrement(x25)
|
|
x28 = matcher(last, x27)
|
|
x29 = fork(either, x26, x28)
|
|
x30 = matcher(first, ZERO)
|
|
x31 = decrement(x24)
|
|
x32 = matcher(first, x31)
|
|
x33 = fork(either, x30, x32)
|
|
x34 = toindices(x4)
|
|
x35 = sfilter(x34, x29)
|
|
x36 = equality(x34, x35)
|
|
x37 = mapply(x23, x18)
|
|
x38 = paint(I, x37)
|
|
x39 = branch(x36, x29, x33)
|
|
x40 = asindices(I)
|
|
x41 = sfilter(x40, x39)
|
|
x42 = toobject(x41, I)
|
|
x43 = paint(x38, x42)
|
|
return x43
|
|
|
|
|
|
def verify_234bbc79(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = order(x0, leftmost)
|
|
x2 = astuple(ONE, TWO)
|
|
x3 = rbind(contained, x2)
|
|
x4 = lbind(compose, x3)
|
|
x5 = lbind(rbind, colorcount)
|
|
x6 = compose(x4, x5)
|
|
x7 = lbind(sfilter, x0)
|
|
x8 = chain(size, x7, x6)
|
|
x9 = size(x0)
|
|
x10 = matcher(x8, x9)
|
|
x11 = palette(I)
|
|
x12 = sfilter(x11, x10)
|
|
x13 = lbind(colorcount, I)
|
|
x14 = argmin(x12, x13)
|
|
x15 = matcher(first, x14)
|
|
x16 = rbind(extract, x15)
|
|
x17 = compose(x16, first)
|
|
x18 = fork(remove, x17, first)
|
|
x19 = rbind(compose, initset)
|
|
x20 = lbind(rbind, manhattan)
|
|
x21 = compose(initset, x17)
|
|
x22 = chain(x19, x20, x21)
|
|
x23 = fork(argmin, x18, x22)
|
|
x24 = compose(last, x17)
|
|
x25 = compose(first, x23)
|
|
x26 = fork(astuple, x25, x24)
|
|
x27 = fork(insert, x26, x18)
|
|
x28 = compose(last, last)
|
|
x29 = rbind(argmin, x28)
|
|
x30 = rbind(sfilter, x15)
|
|
x31 = compose(first, last)
|
|
x32 = chain(x29, x30, x31)
|
|
x33 = compose(flip, x15)
|
|
x34 = rbind(sfilter, x33)
|
|
x35 = compose(first, last)
|
|
x36 = fork(remove, x32, x35)
|
|
x37 = compose(x34, x36)
|
|
x38 = rbind(compose, initset)
|
|
x39 = lbind(rbind, manhattan)
|
|
x40 = compose(initset, x32)
|
|
x41 = chain(x38, x39, x40)
|
|
x42 = fork(argmin, x37, x41)
|
|
x43 = compose(first, x42)
|
|
x44 = compose(last, x32)
|
|
x45 = fork(astuple, x43, x44)
|
|
x46 = compose(first, last)
|
|
x47 = fork(remove, x32, x46)
|
|
x48 = fork(insert, x45, x47)
|
|
x49 = rbind(shift, RIGHT)
|
|
x50 = compose(last, x32)
|
|
x51 = fork(subtract, x24, x50)
|
|
x52 = fork(shift, x48, x51)
|
|
x53 = compose(x49, x52)
|
|
x54 = fork(combine, x27, x53)
|
|
x55 = compose(first, last)
|
|
x56 = fork(remove, x55, last)
|
|
x57 = fork(astuple, x54, x56)
|
|
x58 = size(x0)
|
|
x59 = decrement(x58)
|
|
x60 = power(x57, x59)
|
|
x61 = first(x1)
|
|
x62 = remove(x61, x1)
|
|
x63 = astuple(x61, x62)
|
|
x64 = x60(x63)
|
|
x65 = first(x64)
|
|
x66 = merge(x0)
|
|
x67 = cover(I, x66)
|
|
x68 = paint(x67, x65)
|
|
x69 = height(I)
|
|
x70 = width(x65)
|
|
x71 = (x69, x70)
|
|
x72 = crop(x68, ORIGIN, x71)
|
|
x73 = ofcolor(x72, x14)
|
|
x74 = mostcolor(I)
|
|
x75 = palette(x72)
|
|
x76 = contained(x14, x75)
|
|
x77 = matcher(first, x74)
|
|
x78 = compose(flip, x77)
|
|
x79 = rbind(sfilter, x78)
|
|
x80 = mapply(dneighbors, x73)
|
|
x81 = lbind(toobject, x80)
|
|
x82 = compose(x79, x81)
|
|
x83 = rbind(recolor, x73)
|
|
x84 = chain(x83, mostcolor, x82)
|
|
x85 = fork(paint, identity, x84)
|
|
x86 = branch(x76, x85, identity)
|
|
x87 = x86(x72)
|
|
return x87
|
|
|
|
|
|
def verify_23581191(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = totuple(x2)
|
|
x4 = fork(combine, hfrontier, vfrontier)
|
|
x5 = lbind(mapply, x4)
|
|
x6 = lbind(ofcolor, I)
|
|
x7 = compose(x5, x6)
|
|
x8 = first(x3)
|
|
x9 = last(x3)
|
|
x10 = x7(x8)
|
|
x11 = x7(x9)
|
|
x12 = ofcolor(I, x0)
|
|
x13 = intersection(x12, x10)
|
|
x14 = intersection(x12, x11)
|
|
x15 = intersection(x10, x11)
|
|
x16 = intersection(x12, x15)
|
|
x17 = fill(I, x8, x13)
|
|
x18 = fill(x17, x9, x14)
|
|
x19 = fill(x18, TWO, x16)
|
|
return x19
|
|
|
|
|
|
def verify_239be575(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = lbind(apply, normalize)
|
|
x2 = lbind(colorfilter, x0)
|
|
x3 = chain(size, x1, x2)
|
|
x4 = matcher(x3, ONE)
|
|
x5 = lbind(colorcount, I)
|
|
x6 = matcher(x5, EIGHT)
|
|
x7 = lbind(colorfilter, x0)
|
|
x8 = compose(size, x7)
|
|
x9 = matcher(x8, TWO)
|
|
x10 = fork(both, x6, x9)
|
|
x11 = fork(both, x10, x4)
|
|
x12 = palette(I)
|
|
x13 = extract(x12, x11)
|
|
x14 = colorfilter(x0, x13)
|
|
x15 = totuple(x14)
|
|
x16 = first(x15)
|
|
x17 = last(x15)
|
|
x18 = palette(I)
|
|
x19 = remove(ZERO, x18)
|
|
x20 = remove(x13, x19)
|
|
x21 = first(x20)
|
|
x22 = colorfilter(x0, x21)
|
|
x23 = rbind(adjacent, x16)
|
|
x24 = rbind(adjacent, x17)
|
|
x25 = fork(both, x23, x24)
|
|
x26 = sfilter(x22, x25)
|
|
x27 = size(x26)
|
|
x28 = positive(x27)
|
|
x29 = branch(x28, x21, ZERO)
|
|
x30 = canvas(x29, UNITY)
|
|
return x30
|
|
|
|
|
|
def verify_23b5c85d(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = argmin(x3, x1)
|
|
x5 = subgrid(x4, I)
|
|
return x5
|
|
|
|
|
|
def verify_253bf280(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = prapply(connect, x1, x1)
|
|
x3 = rbind(greater, ONE)
|
|
x4 = compose(x3, size)
|
|
x5 = sfilter(x2, x4)
|
|
x6 = fork(either, vline, hline)
|
|
x7 = mfilter(x5, x6)
|
|
x8 = fill(I, THREE, x7)
|
|
x9 = leastcolor(I)
|
|
x10 = fill(x8, x9, x1)
|
|
return x10
|
|
|
|
|
|
def verify_25d487eb(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = lbind(matcher, first)
|
|
x2 = compose(x1, leastcolor)
|
|
x3 = lbind(matcher, first)
|
|
x4 = compose(x3, mostcolor)
|
|
x5 = fork(extract, identity, x2)
|
|
x6 = compose(last, x5)
|
|
x7 = compose(dneighbors, x6)
|
|
x8 = lbind(apply, last)
|
|
x9 = fork(sfilter, identity, x4)
|
|
x10 = compose(x8, x9)
|
|
x11 = fork(difference, x7, x10)
|
|
x12 = compose(first, x11)
|
|
x13 = fork(subtract, x6, x12)
|
|
x14 = fork(shoot, x6, x13)
|
|
x15 = fork(recolor, leastcolor, x14)
|
|
x16 = mapply(x15, x0)
|
|
x17 = underpaint(I, x16)
|
|
return x17
|
|
|
|
|
|
def verify_25d8a9c8(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = rbind(branch, ZERO)
|
|
x2 = rbind(x1, FIVE)
|
|
x3 = compose(size, dedupe)
|
|
x4 = matcher(x3, ONE)
|
|
x5 = compose(x2, x4)
|
|
x6 = rbind(repeat, x0)
|
|
x7 = compose(x6, x5)
|
|
x8 = apply(x7, I)
|
|
return x8
|
|
|
|
|
|
def verify_25ff71a9(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = first(x0)
|
|
x2 = move(I, x1, DOWN)
|
|
return x2
|
|
|
|
|
|
def verify_264363fd(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = mostcolor(x2)
|
|
x4 = shape(I)
|
|
x5 = canvas(x3, x4)
|
|
x6 = hconcat(I, x5)
|
|
x7 = objects(x6, F, F, T)
|
|
x8 = argmin(x7, size)
|
|
x9 = cover(I, x8)
|
|
x10 = normalize(x8)
|
|
x11 = remove(x8, x7)
|
|
x12 = toindices(x10)
|
|
x13 = lbind(intersection, x12)
|
|
x14 = chain(x13, dneighbors, last)
|
|
x15 = rbind(greater, ONE)
|
|
x16 = chain(x15, size, x14)
|
|
x17 = sfilter(x10, x16)
|
|
x18 = center(x17)
|
|
x19 = matcher(last, x18)
|
|
x20 = extract(x17, x19)
|
|
x21 = first(x20)
|
|
x22 = difference(x10, x17)
|
|
x23 = color(x22)
|
|
x24 = center(x17)
|
|
x25 = invert(x24)
|
|
x26 = shift(x10, x25)
|
|
x27 = invert(x24)
|
|
x28 = shift(x22, x27)
|
|
x29 = toindices(x28)
|
|
x30 = rbind(mapply, x29)
|
|
x31 = lbind(lbind, shoot)
|
|
x32 = compose(x30, x31)
|
|
x33 = power(outbox, TWO)
|
|
x34 = chain(backdrop, x33, initset)
|
|
x35 = fork(difference, x32, x34)
|
|
x36 = lbind(recolor, x23)
|
|
x37 = compose(x36, x35)
|
|
x38 = lbind(shift, x26)
|
|
x39 = fork(combine, x37, x38)
|
|
x40 = lbind(mapply, x39)
|
|
x41 = rbind(ofcolor, x21)
|
|
x42 = compose(x40, x41)
|
|
x43 = fork(paint, identity, x42)
|
|
x44 = rbind(subgrid, I)
|
|
x45 = chain(asobject, x43, x44)
|
|
x46 = fork(shift, x45, ulcorner)
|
|
x47 = mapply(x46, x11)
|
|
x48 = paint(x9, x47)
|
|
return x48
|
|
|
|
|
|
def verify_272f95fa(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = index(I, ORIGIN)
|
|
x2 = colorfilter(x0, x1)
|
|
x3 = apply(toindices, x2)
|
|
x4 = rbind(bordering, I)
|
|
x5 = compose(flip, x4)
|
|
x6 = extract(x3, x5)
|
|
x7 = remove(x6, x3)
|
|
x8 = lbind(vmatching, x6)
|
|
x9 = lbind(hmatching, x6)
|
|
x10 = sfilter(x7, x8)
|
|
x11 = sfilter(x7, x9)
|
|
x12 = argmin(x10, uppermost)
|
|
x13 = argmax(x10, uppermost)
|
|
x14 = argmin(x11, leftmost)
|
|
x15 = argmax(x11, leftmost)
|
|
x16 = fill(I, SIX, x6)
|
|
x17 = fill(x16, TWO, x12)
|
|
x18 = fill(x17, ONE, x13)
|
|
x19 = fill(x18, FOUR, x14)
|
|
x20 = fill(x19, THREE, x15)
|
|
return x20
|
|
|
|
|
|
def verify_27a28665(I: Grid) -> Grid:
|
|
x0 = lbind(apply, last)
|
|
x1 = compose(positive, first)
|
|
x2 = lbind(interval, ZERO)
|
|
x3 = rbind(x2, ONE)
|
|
x4 = rbind(sfilter, x1)
|
|
x5 = compose(x3, size)
|
|
x6 = fork(pair, x5, identity)
|
|
x7 = chain(x0, x4, x6)
|
|
x8 = rbind(branch, identity)
|
|
x9 = rbind(x8, x7)
|
|
x10 = chain(size, dedupe, first)
|
|
x11 = lbind(equality, ONE)
|
|
x12 = chain(x9, x11, x10)
|
|
x13 = compose(initset, x12)
|
|
x14 = fork(rapply, x13, identity)
|
|
x15 = compose(first, x14)
|
|
x16 = rbind(branch, identity)
|
|
x17 = rbind(x16, x15)
|
|
x18 = chain(x17, positive, size)
|
|
x19 = compose(initset, x18)
|
|
x20 = fork(rapply, x19, identity)
|
|
x21 = compose(first, x20)
|
|
x22 = multiply(TEN, THREE)
|
|
x23 = power(x21, x22)
|
|
x24 = compose(rot90, x23)
|
|
x25 = power(x24, FOUR)
|
|
x26 = x25(I)
|
|
x27 = width(x26)
|
|
x28 = divide(x27, THREE)
|
|
x29 = downscale(x26, x28)
|
|
x30 = objects(x29, T, F, F)
|
|
x31 = valmax(x30, size)
|
|
x32 = equality(x31, ONE)
|
|
x33 = equality(x31, FOUR)
|
|
x34 = equality(x31, FIVE)
|
|
x35 = branch(x32, TWO, ONE)
|
|
x36 = branch(x33, THREE, x35)
|
|
x37 = branch(x34, SIX, x36)
|
|
x38 = canvas(x37, UNITY)
|
|
return x38
|
|
|
|
|
|
def verify_28bf18c6(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = first(x0)
|
|
x2 = subgrid(x1, I)
|
|
x3 = hconcat(x2, x2)
|
|
return x3
|
|
|
|
|
|
def verify_28e73c20(I: Grid) -> Grid:
|
|
x0 = astuple(RIGHT, DOWN)
|
|
x1 = astuple(DOWN, LEFT)
|
|
x2 = astuple(x0, x1)
|
|
x3 = astuple(LEFT, UP)
|
|
x4 = astuple(UP, RIGHT)
|
|
x5 = astuple(x3, x4)
|
|
x6 = combine(x2, x5)
|
|
x7 = height(I)
|
|
x8 = astuple(x7, ONE)
|
|
x9 = canvas(THREE, x8)
|
|
x10 = hconcat(x9, I)
|
|
x11 = height(x10)
|
|
x12 = width(x10)
|
|
x13 = decrement(x12)
|
|
x14 = tojvec(x13)
|
|
x15 = identity(DOWN)
|
|
x16 = connect(ORIGIN, x14)
|
|
x17 = fill(x10, THREE, x16)
|
|
x18 = identity(x12)
|
|
x19 = identity(x11)
|
|
x20 = identity(x11)
|
|
x21 = identity(F)
|
|
x22 = identity(ZERO)
|
|
x23 = compose(first, first)
|
|
x24 = chain(first, last, x23)
|
|
x25 = compose(first, first)
|
|
x26 = chain(last, last, x25)
|
|
x27 = chain(first, first, first)
|
|
x28 = chain(first, last, last)
|
|
x29 = chain(first, first, last)
|
|
x30 = chain(last, first, last)
|
|
x31 = compose(decrement, x24)
|
|
x32 = compose(decrement, x26)
|
|
x33 = fork(astuple, x31, x32)
|
|
x34 = compose(decrement, x26)
|
|
x35 = fork(multiply, x29, x34)
|
|
x36 = fork(add, x28, x35)
|
|
x37 = compose(decrement, x27)
|
|
x38 = fork(multiply, x29, x37)
|
|
x39 = fork(add, x28, x38)
|
|
x40 = fork(astuple, x39, x36)
|
|
x41 = lbind(extract, x6)
|
|
x42 = lbind(matcher, first)
|
|
x43 = compose(x42, x29)
|
|
x44 = chain(last, x41, x43)
|
|
x45 = compose(last, first)
|
|
x46 = lbind(recolor, THREE)
|
|
x47 = compose(decrement, x27)
|
|
x48 = fork(multiply, x29, x47)
|
|
x49 = fork(add, x28, x48)
|
|
x50 = fork(connect, x28, x49)
|
|
x51 = compose(x46, x50)
|
|
x52 = fork(paint, x45, x51)
|
|
x53 = compose(decrement, x26)
|
|
x54 = fork(multiply, x30, x53)
|
|
x55 = compose(flip, x30)
|
|
x56 = compose(decrement, x24)
|
|
x57 = fork(multiply, x55, x56)
|
|
x58 = fork(add, x54, x57)
|
|
x59 = power(first, THREE)
|
|
x60 = chain(flip, positive, x59)
|
|
x61 = fork(astuple, x58, x33)
|
|
x62 = compose(flip, x30)
|
|
x63 = fork(astuple, x44, x62)
|
|
x64 = fork(astuple, x61, x52)
|
|
x65 = fork(astuple, x63, x40)
|
|
x66 = fork(astuple, x64, x65)
|
|
x67 = rbind(branch, x66)
|
|
x68 = rbind(x67, identity)
|
|
x69 = chain(initset, x68, x60)
|
|
x70 = fork(rapply, x69, identity)
|
|
x71 = compose(first, x70)
|
|
x72 = multiply(TEN, THREE)
|
|
x73 = power(x71, x72)
|
|
x74 = astuple(x18, x19)
|
|
x75 = astuple(x15, x21)
|
|
x76 = astuple(x14, x22)
|
|
x77 = astuple(x20, x74)
|
|
x78 = astuple(x75, x76)
|
|
x79 = astuple(x77, x17)
|
|
x80 = astuple(x79, x78)
|
|
x81 = x73(x80)
|
|
x82 = first(x81)
|
|
x83 = last(x82)
|
|
x84 = dmirror(x83)
|
|
x85 = shape(x84)
|
|
x86 = add(x85, UP)
|
|
x87 = crop(x84, DOWN, x86)
|
|
x88 = dmirror(x87)
|
|
return x88
|
|
|
|
|
|
def verify_29623171(I: Grid) -> Grid:
|
|
x0 = compress(I)
|
|
x1 = leastcolor(x0)
|
|
x2 = mostcolor(x0)
|
|
x3 = frontiers(I)
|
|
x4 = sfilter(x3, hline)
|
|
x5 = size(x4)
|
|
x6 = increment(x5)
|
|
x7 = sfilter(x3, vline)
|
|
x8 = size(x7)
|
|
x9 = increment(x8)
|
|
x10 = height(I)
|
|
x11 = decrement(x6)
|
|
x12 = subtract(x10, x11)
|
|
x13 = divide(x12, x6)
|
|
x14 = width(I)
|
|
x15 = decrement(x9)
|
|
x16 = subtract(x14, x15)
|
|
x17 = divide(x16, x9)
|
|
x18 = astuple(x13, x17)
|
|
x19 = canvas(ZERO, x18)
|
|
x20 = asindices(x19)
|
|
x21 = astuple(x6, x9)
|
|
x22 = canvas(ZERO, x21)
|
|
x23 = asindices(x22)
|
|
x24 = astuple(x13, x17)
|
|
x25 = increment(x24)
|
|
x26 = rbind(multiply, x25)
|
|
x27 = apply(x26, x23)
|
|
x28 = rbind(toobject, I)
|
|
x29 = lbind(shift, x20)
|
|
x30 = compose(x28, x29)
|
|
x31 = apply(x30, x27)
|
|
x32 = rbind(colorcount, x1)
|
|
x33 = valmax(x31, x32)
|
|
x34 = rbind(colorcount, x1)
|
|
x35 = matcher(x34, x33)
|
|
x36 = mfilter(x31, x35)
|
|
x37 = replace(I, x1, x2)
|
|
x38 = fill(x37, x1, x36)
|
|
return x38
|
|
|
|
|
|
def verify_29c11459(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = product(x0, x0)
|
|
x2 = fork(hmatching, first, last)
|
|
x3 = fork(vmatching, first, last)
|
|
x4 = fork(either, x2, x3)
|
|
x5 = sfilter(x1, x4)
|
|
x6 = mostcolor(I)
|
|
x7 = rbind(toobject, I)
|
|
x8 = compose(delta, merge)
|
|
x9 = chain(palette, x7, x8)
|
|
x10 = initset(x6)
|
|
x11 = matcher(x9, x10)
|
|
x12 = sfilter(x5, x11)
|
|
x13 = shape(I)
|
|
x14 = subtract(x13, TWO_BY_ZERO)
|
|
x15 = crop(I, DOWN, x14)
|
|
x16 = numcolors(x15)
|
|
x17 = equality(ONE, x16)
|
|
x18 = branch(x17, vline, hline)
|
|
x19 = compose(center, first)
|
|
x20 = compose(center, last)
|
|
x21 = fork(add, x19, x20)
|
|
x22 = compose(halve, x21)
|
|
x23 = compose(color, first)
|
|
x24 = compose(color, last)
|
|
x25 = fork(connect, x19, x22)
|
|
x26 = fork(remove, x22, x25)
|
|
x27 = fork(recolor, x23, x26)
|
|
x28 = fork(connect, x20, x22)
|
|
x29 = fork(remove, x22, x28)
|
|
x30 = fork(recolor, x24, x29)
|
|
x31 = lbind(recolor, FIVE)
|
|
x32 = chain(x31, initset, x22)
|
|
x33 = fork(combine, x27, x30)
|
|
x34 = fork(combine, x33, x32)
|
|
x35 = apply(x34, x12)
|
|
x36 = mfilter(x35, x18)
|
|
x37 = paint(I, x36)
|
|
x38 = merge(x0)
|
|
x39 = paint(x37, x38)
|
|
return x39
|
|
|
|
|
|
def verify_29ec7d0e(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = lbind(colorfilter, x1)
|
|
x3 = compose(size, x2)
|
|
x4 = valmin(x0, x3)
|
|
x5 = matcher(x3, x4)
|
|
x6 = sfilter(x0, x5)
|
|
x7 = lbind(colorcount, I)
|
|
x8 = argmin(x6, x7)
|
|
x9 = asobject(I)
|
|
x10 = matcher(first, x8)
|
|
x11 = compose(flip, x10)
|
|
x12 = sfilter(x9, x11)
|
|
x13 = lbind(contained, x8)
|
|
x14 = compose(flip, x13)
|
|
x15 = sfilter(I, x14)
|
|
x16 = asobject(x15)
|
|
x17 = hperiod(x16)
|
|
x18 = dmirror(I)
|
|
x19 = sfilter(x18, x14)
|
|
x20 = asobject(x19)
|
|
x21 = hperiod(x20)
|
|
x22 = (x21, x17)
|
|
x23 = lbind(multiply, x22)
|
|
x24 = neighbors(ORIGIN)
|
|
x25 = mapply(neighbors, x24)
|
|
x26 = apply(x23, x25)
|
|
x27 = lbind(shift, x12)
|
|
x28 = mapply(x27, x26)
|
|
x29 = paint(I, x28)
|
|
return x29
|
|
|
|
|
|
def verify_2bcee788(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = remove(x2, x0)
|
|
x4 = argmin(x3, size)
|
|
x5 = argmax(x3, size)
|
|
x6 = hmatching(x4, x5)
|
|
x7 = branch(x6, vmirror, hmirror)
|
|
x8 = x7(x5)
|
|
x9 = branch(x6, leftmost, uppermost)
|
|
x10 = branch(x6, tojvec, toivec)
|
|
x11 = x9(x4)
|
|
x12 = x9(x5)
|
|
x13 = greater(x11, x12)
|
|
x14 = double(x13)
|
|
x15 = decrement(x14)
|
|
x16 = x10(x15)
|
|
x17 = shape(x5)
|
|
x18 = multiply(x16, x17)
|
|
x19 = shift(x8, x18)
|
|
x20 = fill(I, THREE, x2)
|
|
x21 = paint(x20, x19)
|
|
return x21
|
|
|
|
|
|
def verify_2bee17df(I: Grid) -> Grid:
|
|
x0 = trim(I)
|
|
x1 = mostcolor(x0)
|
|
x2 = repeat(x1, ONE)
|
|
x3 = lbind(repeat, THREE)
|
|
x4 = compose(x3, size)
|
|
x5 = matcher(dedupe, x2)
|
|
x6 = rbind(branch, identity)
|
|
x7 = rbind(x6, x4)
|
|
x8 = compose(x7, x5)
|
|
x9 = compose(initset, x8)
|
|
x10 = fork(rapply, x9, identity)
|
|
x11 = compose(first, x10)
|
|
x12 = apply(x11, x0)
|
|
x13 = dmirror(x0)
|
|
x14 = apply(x11, x13)
|
|
x15 = dmirror(x14)
|
|
x16 = ofcolor(x12, THREE)
|
|
x17 = ofcolor(x15, THREE)
|
|
x18 = combine(x16, x17)
|
|
x19 = shift(x18, UNITY)
|
|
x20 = fill(I, THREE, x19)
|
|
return x20
|
|
|
|
|
|
def verify_2c608aff(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = argmax(x2, size)
|
|
x4 = color(x3)
|
|
x5 = palette(I)
|
|
x6 = remove(x4, x5)
|
|
x7 = lbind(colorcount, I)
|
|
x8 = argmin(x6, x7)
|
|
x9 = toindices(x3)
|
|
x10 = apply(first, x9)
|
|
x11 = toindices(x3)
|
|
x12 = apply(last, x11)
|
|
x13 = rbind(contained, x10)
|
|
x14 = compose(x13, first)
|
|
x15 = rbind(contained, x12)
|
|
x16 = compose(x15, last)
|
|
x17 = fork(either, x14, x16)
|
|
x18 = ofcolor(I, x8)
|
|
x19 = sfilter(x18, x17)
|
|
x20 = rbind(gravitate, x3)
|
|
x21 = compose(x20, initset)
|
|
x22 = fork(add, identity, x21)
|
|
x23 = fork(connect, identity, x22)
|
|
x24 = mapply(x23, x19)
|
|
x25 = fill(I, x8, x24)
|
|
return x25
|
|
|
|
|
|
def verify_2dc579da(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = mfilter(x0, hline)
|
|
x2 = mfilter(x0, vline)
|
|
x3 = uppermost(x1)
|
|
x4 = leftmost(x2)
|
|
x5 = astuple(x3, x4)
|
|
x6 = add(x5, NEG_UNITY)
|
|
x7 = uppermost(x1)
|
|
x8 = rightmost(x2)
|
|
x9 = astuple(x7, x8)
|
|
x10 = add(x9, UP_RIGHT)
|
|
x11 = lowermost(x1)
|
|
x12 = leftmost(x2)
|
|
x13 = astuple(x11, x12)
|
|
x14 = add(x13, DOWN_LEFT)
|
|
x15 = lowermost(x1)
|
|
x16 = rightmost(x2)
|
|
x17 = astuple(x15, x16)
|
|
x18 = add(x17, UNITY)
|
|
x19 = initset(ORIGIN)
|
|
x20 = insert(x6, x19)
|
|
x21 = width(I)
|
|
x22 = decrement(x21)
|
|
x23 = tojvec(x22)
|
|
x24 = initset(x23)
|
|
x25 = insert(x10, x24)
|
|
x26 = height(I)
|
|
x27 = decrement(x26)
|
|
x28 = toivec(x27)
|
|
x29 = initset(x28)
|
|
x30 = insert(x14, x29)
|
|
x31 = shape(I)
|
|
x32 = decrement(x31)
|
|
x33 = initset(x32)
|
|
x34 = insert(x18, x33)
|
|
x35 = astuple(x20, x25)
|
|
x36 = astuple(x30, x34)
|
|
x37 = combine(x35, x36)
|
|
x38 = rbind(toobject, I)
|
|
x39 = compose(x38, backdrop)
|
|
x40 = apply(x39, x37)
|
|
x41 = matcher(numcolors, ONE)
|
|
x42 = sfilter(x40, x41)
|
|
x43 = apply(color, x42)
|
|
x44 = mostcommon(x43)
|
|
x45 = initset(x44)
|
|
x46 = matcher(palette, x45)
|
|
x47 = compose(flip, x46)
|
|
x48 = extract(x40, x47)
|
|
x49 = subgrid(x48, I)
|
|
return x49
|
|
|
|
|
|
def verify_2dd70a9a(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = vline(x0)
|
|
x2 = branch(x1, dmirror, identity)
|
|
x3 = x2(I)
|
|
x4 = ofcolor(x3, THREE)
|
|
x5 = ofcolor(x3, TWO)
|
|
x6 = center(x4)
|
|
x7 = hfrontier(x6)
|
|
x8 = center(x5)
|
|
x9 = hfrontier(x8)
|
|
x10 = mostcolor(I)
|
|
x11 = palette(I)
|
|
x12 = remove(THREE, x11)
|
|
x13 = remove(TWO, x12)
|
|
x14 = other(x13, x10)
|
|
x15 = replace(x3, THREE, x10)
|
|
x16 = difference(x7, x4)
|
|
x17 = underfill(x15, THREE, x16)
|
|
x18 = replace(x3, TWO, x10)
|
|
x19 = difference(x9, x5)
|
|
x20 = underfill(x18, TWO, x19)
|
|
x21 = objects(x17, T, F, F)
|
|
x22 = colorfilter(x21, THREE)
|
|
x23 = rbind(adjacent, x4)
|
|
x24 = sfilter(x22, x23)
|
|
x25 = objects(x20, T, F, F)
|
|
x26 = colorfilter(x25, TWO)
|
|
x27 = rbind(adjacent, x5)
|
|
x28 = sfilter(x26, x27)
|
|
x29 = mapply(toindices, x24)
|
|
x30 = rbind(equality, x14)
|
|
x31 = lbind(index, x3)
|
|
x32 = compose(x30, x31)
|
|
x33 = rbind(add, LEFT)
|
|
x34 = compose(x32, x33)
|
|
x35 = rbind(add, RIGHT)
|
|
x36 = compose(x32, x35)
|
|
x37 = fork(either, x34, x36)
|
|
x38 = rbind(add, UP)
|
|
x39 = compose(x32, x38)
|
|
x40 = rbind(add, DOWN)
|
|
x41 = compose(x32, x40)
|
|
x42 = fork(either, x39, x41)
|
|
x43 = sfilter(x29, x37)
|
|
x44 = mapply(toindices, x28)
|
|
x45 = sfilter(x44, x42)
|
|
x46 = fork(connect, first, last)
|
|
x47 = product(x43, x45)
|
|
x48 = compose(vline, x46)
|
|
x49 = rbind(toobject, x3)
|
|
x50 = chain(numcolors, x49, x46)
|
|
x51 = matcher(x50, ONE)
|
|
x52 = fork(both, x48, x51)
|
|
x53 = extract(x47, x52)
|
|
x54 = x46(x53)
|
|
x55 = center(x4)
|
|
x56 = center(x5)
|
|
x57 = fork(either, hline, vline)
|
|
x58 = lbind(connect, x55)
|
|
x59 = corners(x54)
|
|
x60 = apply(x58, x59)
|
|
x61 = mfilter(x60, x57)
|
|
x62 = lbind(connect, x56)
|
|
x63 = corners(x54)
|
|
x64 = apply(x62, x63)
|
|
x65 = mfilter(x64, x57)
|
|
x66 = combine(x61, x65)
|
|
x67 = combine(x54, x66)
|
|
x68 = fill(x3, THREE, x67)
|
|
x69 = fill(x68, TWO, x5)
|
|
x70 = x2(x69)
|
|
return x70
|
|
|
|
|
|
def verify_2dee498d(I: Grid) -> Grid:
|
|
x0 = hsplit(I, THREE)
|
|
x1 = first(x0)
|
|
return x1
|
|
|
|
|
|
def verify_31aa019c(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = first(x1)
|
|
x3 = neighbors(x2)
|
|
x4 = mostcolor(I)
|
|
x5 = shape(I)
|
|
x6 = canvas(x4, x5)
|
|
x7 = initset(x2)
|
|
x8 = fill(x6, x0, x7)
|
|
x9 = fill(x8, TWO, x3)
|
|
return x9
|
|
|
|
|
|
def verify_321b1fc6(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = argmax(x0, numcolors)
|
|
x2 = remove(x1, x0)
|
|
x3 = normalize(x1)
|
|
x4 = apply(ulcorner, x2)
|
|
x5 = lbind(shift, x3)
|
|
x6 = mapply(x5, x4)
|
|
x7 = paint(I, x6)
|
|
x8 = cover(x7, x1)
|
|
return x8
|
|
|
|
|
|
def verify_32597951(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmin(x0, x1)
|
|
x3 = delta(x2)
|
|
x4 = fill(I, THREE, x3)
|
|
return x4
|
|
|
|
|
|
def verify_3345333e(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = partition(I)
|
|
x5 = fork(multiply, height, width)
|
|
x6 = fork(equality, size, x5)
|
|
x7 = extract(x4, x6)
|
|
x8 = color(x7)
|
|
x9 = palette(I)
|
|
x10 = remove(x3, x9)
|
|
x11 = other(x10, x8)
|
|
x12 = ofcolor(I, x11)
|
|
x13 = vmirror(x12)
|
|
x14 = hmirror(x12)
|
|
x15 = toindices(x7)
|
|
x16 = combine(x15, x12)
|
|
x17 = height(x16)
|
|
x18 = halve(x17)
|
|
x19 = increment(x18)
|
|
x20 = width(x16)
|
|
x21 = halve(x20)
|
|
x22 = increment(x21)
|
|
x23 = astuple(x19, x22)
|
|
x24 = maximum(x23)
|
|
x25 = invert(x24)
|
|
x26 = increment(x24)
|
|
x27 = interval(x25, x26, ONE)
|
|
x28 = product(x27, x27)
|
|
x29 = initset(x14)
|
|
x30 = insert(x13, x29)
|
|
x31 = product(x28, x30)
|
|
x32 = ofcolor(I, x3)
|
|
x33 = rbind(intersection, x32)
|
|
x34 = fork(shift, last, first)
|
|
x35 = chain(size, x33, x34)
|
|
x36 = matcher(x35, ZERO)
|
|
x37 = sfilter(x31, x36)
|
|
x38 = rbind(intersection, x12)
|
|
x39 = fork(shift, last, first)
|
|
x40 = chain(size, x38, x39)
|
|
x41 = argmax(x37, x40)
|
|
x42 = first(x41)
|
|
x43 = last(x41)
|
|
x44 = fill(I, x3, x7)
|
|
x45 = shift(x43, x42)
|
|
x46 = fill(x44, x11, x45)
|
|
return x46
|
|
|
|
|
|
def verify_3428a4f5(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = halve(x0)
|
|
x2 = tojvec(x1)
|
|
x3 = height(I)
|
|
x4 = decrement(x3)
|
|
x5 = astuple(x4, x1)
|
|
x6 = connect(x2, x5)
|
|
x7 = toobject(x6, I)
|
|
x8 = numcolors(x7)
|
|
x9 = equality(x8, ONE)
|
|
x10 = branch(x9, lefthalf, tophalf)
|
|
x11 = branch(x9, righthalf, bottomhalf)
|
|
x12 = x10(I)
|
|
x13 = x11(I)
|
|
x14 = palette(x12)
|
|
x15 = other(x14, ZERO)
|
|
x16 = palette(x13)
|
|
x17 = other(x16, ZERO)
|
|
x18 = shape(x12)
|
|
x19 = canvas(ZERO, x18)
|
|
x20 = ofcolor(x12, x15)
|
|
x21 = ofcolor(x13, x17)
|
|
x22 = combine(x20, x21)
|
|
x23 = intersection(x20, x21)
|
|
x24 = difference(x22, x23)
|
|
x25 = fill(x19, THREE, x24)
|
|
return x25
|
|
|
|
|
|
def verify_3618c87e(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = sizefilter(x1, ONE)
|
|
x3 = totuple(x2)
|
|
x4 = apply(color, x3)
|
|
x5 = mostcommon(x4)
|
|
x6 = palette(I)
|
|
x7 = remove(x5, x6)
|
|
x8 = other(x7, x0)
|
|
x9 = replace(I, x5, x0)
|
|
x10 = ofcolor(I, x5)
|
|
x11 = repeat(x8, ONE)
|
|
x12 = rbind(equality, x11)
|
|
x13 = first(I)
|
|
x14 = dedupe(x13)
|
|
x15 = x12(x14)
|
|
x16 = last(I)
|
|
x17 = dedupe(x16)
|
|
x18 = x12(x17)
|
|
x19 = dmirror(I)
|
|
x20 = first(x19)
|
|
x21 = dedupe(x20)
|
|
x22 = x12(x21)
|
|
x23 = dmirror(I)
|
|
x24 = last(x23)
|
|
x25 = dedupe(x24)
|
|
x26 = x12(x25)
|
|
x27 = apply(last, x10)
|
|
x28 = apply(first, x10)
|
|
x29 = either(x15, x18)
|
|
x30 = branch(x29, x27, x28)
|
|
x31 = branch(x29, lbind, rbind)
|
|
x32 = lbind(x31, astuple)
|
|
x33 = branch(x29, height, width)
|
|
x34 = x33(I)
|
|
x35 = decrement(x34)
|
|
x36 = either(x15, x22)
|
|
x37 = branch(x36, ZERO, x35)
|
|
x38 = x32(x37)
|
|
x39 = apply(x38, x30)
|
|
x40 = fill(x9, x5, x39)
|
|
return x40
|
|
|
|
|
|
def verify_3631a71a(I: Grid) -> Grid:
|
|
x0 = lbind(compose, flip)
|
|
x1 = lbind(matcher, first)
|
|
x2 = compose(x0, x1)
|
|
x3 = rbind(compose, asobject)
|
|
x4 = lbind(rbind, sfilter)
|
|
x5 = chain(x3, x4, x2)
|
|
x6 = rbind(shift, ORIGIN)
|
|
x7 = compose(x6, dmirror)
|
|
x8 = rbind(shift, TWO_BY_TWO)
|
|
x9 = compose(x8, cmirror)
|
|
x10 = rbind(shift, TWO_BY_ZERO)
|
|
x11 = compose(x10, hmirror)
|
|
x12 = rbind(shift, ZERO_BY_TWO)
|
|
x13 = compose(x12, vmirror)
|
|
x14 = lbind(fork, paint)
|
|
x15 = lbind(x14, identity)
|
|
x16 = lbind(compose, x7)
|
|
x17 = chain(x15, x16, x5)
|
|
x18 = lbind(compose, x9)
|
|
x19 = chain(x15, x18, x5)
|
|
x20 = lbind(compose, x11)
|
|
x21 = chain(x15, x20, x5)
|
|
x22 = lbind(compose, x13)
|
|
x23 = chain(x15, x22, x5)
|
|
x24 = rbind(rapply, I)
|
|
x25 = chain(first, x24, initset)
|
|
x26 = fork(compose, x23, x21)
|
|
x27 = fork(compose, x19, x17)
|
|
x28 = fork(compose, x26, x27)
|
|
x29 = compose(x25, x28)
|
|
x30 = palette(I)
|
|
x31 = fork(equality, identity, dmirror)
|
|
x32 = compose(x31, x29)
|
|
x33 = argmax(x30, x32)
|
|
x34 = x29(x33)
|
|
return x34
|
|
|
|
|
|
def verify_363442ee(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = mostcolor(I)
|
|
x3 = fill(I, x2, x1)
|
|
x4 = objects(x3, F, F, T)
|
|
x5 = argmax(x4, size)
|
|
x6 = remove(x5, x4)
|
|
x7 = apply(center, x6)
|
|
x8 = normalize(x5)
|
|
x9 = shape(x5)
|
|
x10 = halve(x9)
|
|
x11 = invert(x10)
|
|
x12 = shift(x8, x11)
|
|
x13 = lbind(shift, x12)
|
|
x14 = mapply(x13, x7)
|
|
x15 = paint(I, x14)
|
|
return x15
|
|
|
|
|
|
def verify_36d67576(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = argmax(x0, size)
|
|
x2 = remove(x1, x0)
|
|
x3 = merge(x2)
|
|
x4 = palette(x3)
|
|
x5 = repeat(identity, ONE)
|
|
x6 = astuple(cmirror, dmirror)
|
|
x7 = astuple(vmirror, hmirror)
|
|
x8 = combine(x6, x7)
|
|
x9 = combine(x5, x8)
|
|
x10 = fork(compose, first, last)
|
|
x11 = product(x9, x9)
|
|
x12 = apply(x10, x11)
|
|
x13 = rbind(contained, x4)
|
|
x14 = compose(x13, first)
|
|
x15 = rbind(sfilter, x14)
|
|
x16 = lbind(chain, ulcorner)
|
|
x17 = lbind(x16, x15)
|
|
x18 = lbind(fork, shift)
|
|
x19 = lbind(lbind, shift)
|
|
x20 = lbind(occurrences, I)
|
|
x21 = rbind(rapply, x1)
|
|
x22 = chain(first, x21, initset)
|
|
x23 = lbind(compose, invert)
|
|
x24 = compose(x23, x17)
|
|
x25 = lbind(compose, x15)
|
|
x26 = fork(x18, x25, x24)
|
|
x27 = compose(x22, x26)
|
|
x28 = rbind(rapply, x1)
|
|
x29 = chain(first, x28, initset)
|
|
x30 = rbind(rapply, x1)
|
|
x31 = compose(initset, x17)
|
|
x32 = chain(first, x30, x31)
|
|
x33 = compose(invert, x32)
|
|
x34 = fork(shift, x29, x33)
|
|
x35 = compose(x19, x34)
|
|
x36 = compose(x20, x27)
|
|
x37 = fork(mapply, x35, x36)
|
|
x38 = rbind(astuple, x37)
|
|
x39 = compose(last, x38)
|
|
x40 = rbind(astuple, x12)
|
|
x41 = compose(last, x40)
|
|
x42 = fork(mapply, x39, x41)
|
|
x43 = fork(paint, identity, x42)
|
|
x44 = rbind(contained, x4)
|
|
x45 = compose(x44, first)
|
|
x46 = sfilter(x1, x45)
|
|
x47 = size(x46)
|
|
x48 = equality(x47, ZERO)
|
|
x49 = branch(x48, identity, x43)
|
|
x50 = x49(I)
|
|
return x50
|
|
|
|
|
|
def verify_36fdfd69(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = fork(subtract, first, last)
|
|
x3 = fork(multiply, sign, identity)
|
|
x4 = compose(x3, x2)
|
|
x5 = lbind(greater, THREE)
|
|
x6 = chain(x5, maximum, x4)
|
|
x7 = lbind(lbind, astuple)
|
|
x8 = rbind(chain, x7)
|
|
x9 = lbind(compose, x6)
|
|
x10 = rbind(x8, x9)
|
|
x11 = lbind(lbind, sfilter)
|
|
x12 = compose(x10, x11)
|
|
x13 = lbind(mapply, backdrop)
|
|
x14 = fork(apply, x12, identity)
|
|
x15 = compose(x13, x14)
|
|
x16 = power(x15, TWO)
|
|
x17 = x16(x1)
|
|
x18 = fill(I, FOUR, x17)
|
|
x19 = fill(x18, x0, x1)
|
|
return x19
|
|
|
|
|
|
def verify_3906de3d(I: Grid) -> Grid:
|
|
x0 = first(I)
|
|
x1 = dedupe(x0)
|
|
x2 = size(x1)
|
|
x3 = equality(ONE, x2)
|
|
x4 = branch(x3, dmirror, identity)
|
|
x5 = x4(I)
|
|
x6 = first(x5)
|
|
x7 = first(x6)
|
|
x8 = first(x5)
|
|
x9 = matcher(identity, x7)
|
|
x10 = sfilter(x8, x9)
|
|
x11 = size(x10)
|
|
x12 = last(x5)
|
|
x13 = sfilter(x12, x9)
|
|
x14 = size(x13)
|
|
x15 = greater(x11, x14)
|
|
x16 = branch(x15, hmirror, identity)
|
|
x17 = x16(x5)
|
|
x18 = partition(x17)
|
|
x19 = matcher(color, x7)
|
|
x20 = extract(x18, x19)
|
|
x21 = remove(x20, x18)
|
|
x22 = argmin(x21, uppermost)
|
|
x23 = other(x21, x22)
|
|
x24 = color(x22)
|
|
x25 = color(x23)
|
|
x26 = fill(x17, TWO, x20)
|
|
x27 = fill(x26, ONE, x23)
|
|
x28 = fill(x27, ZERO, x22)
|
|
x29 = rbind(order, identity)
|
|
x30 = dmirror(x28)
|
|
x31 = apply(x29, x30)
|
|
x32 = dmirror(x31)
|
|
x33 = x16(x32)
|
|
x34 = x4(x33)
|
|
x35 = ofcolor(x34, TWO)
|
|
x36 = fill(x34, x7, x35)
|
|
x37 = ofcolor(x34, ONE)
|
|
x38 = fill(x36, x25, x37)
|
|
x39 = ofcolor(x34, ZERO)
|
|
x40 = fill(x38, x24, x39)
|
|
return x40
|
|
|
|
|
|
def verify_39a8645d(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = totuple(x0)
|
|
x2 = apply(normalize, x1)
|
|
x3 = mostcommon(x2)
|
|
x4 = mostcolor(I)
|
|
x5 = shape(x3)
|
|
x6 = canvas(x4, x5)
|
|
x7 = paint(x6, x3)
|
|
return x7
|
|
|
|
|
|
def verify_39e1d7f9(I: Grid) -> Grid:
|
|
x0 = compress(I)
|
|
x1 = objects(x0, F, F, T)
|
|
x2 = argmax(x1, numcolors)
|
|
x3 = remove(x2, x1)
|
|
x4 = merge(x3)
|
|
x5 = size(x4)
|
|
x6 = positive(x5)
|
|
x7 = astuple(color, x4)
|
|
x8 = astuple(leastcolor, x2)
|
|
x9 = branch(x6, x7, x8)
|
|
x10 = compose(initset, first)
|
|
x11 = fork(rapply, x10, last)
|
|
x12 = compose(first, x11)
|
|
x13 = x12(x9)
|
|
x14 = normalize(x2)
|
|
x15 = matcher(first, x13)
|
|
x16 = sfilter(x14, x15)
|
|
x17 = ulcorner(x16)
|
|
x18 = invert(x17)
|
|
x19 = shift(x14, x18)
|
|
x20 = lbind(shift, x19)
|
|
x21 = objects(x0, T, F, T)
|
|
x22 = colorfilter(x21, x13)
|
|
x23 = apply(ulcorner, x22)
|
|
x24 = mapply(x20, x23)
|
|
x25 = paint(x0, x24)
|
|
x26 = height(x0)
|
|
x27 = frontiers(I)
|
|
x28 = sfilter(x27, hline)
|
|
x29 = size(x28)
|
|
x30 = increment(x29)
|
|
x31 = divide(x26, x30)
|
|
x32 = width(x0)
|
|
x33 = frontiers(I)
|
|
x34 = sfilter(x33, vline)
|
|
x35 = size(x34)
|
|
x36 = increment(x35)
|
|
x37 = divide(x32, x36)
|
|
x38 = rbind(multiply, x37)
|
|
x39 = rbind(divide, x37)
|
|
x40 = compose(x38, x39)
|
|
x41 = fork(equality, x40, identity)
|
|
x42 = compose(x41, first)
|
|
x43 = rbind(multiply, x31)
|
|
x44 = rbind(divide, x31)
|
|
x45 = compose(x43, x44)
|
|
x46 = fork(equality, x45, identity)
|
|
x47 = compose(x46, first)
|
|
x48 = lbind(interval, ZERO)
|
|
x49 = rbind(x48, ONE)
|
|
x50 = compose(x49, size)
|
|
x51 = fork(pair, x50, identity)
|
|
x52 = lbind(apply, last)
|
|
x53 = rbind(sfilter, x42)
|
|
x54 = chain(x52, x53, x51)
|
|
x55 = compose(x54, last)
|
|
x56 = height(x25)
|
|
x57 = interval(ZERO, x56, ONE)
|
|
x58 = pair(x57, x25)
|
|
x59 = sfilter(x58, x47)
|
|
x60 = apply(x55, x59)
|
|
x61 = increment(x37)
|
|
x62 = hupscale(x60, x61)
|
|
x63 = increment(x31)
|
|
x64 = vupscale(x62, x63)
|
|
x65 = frontiers(I)
|
|
x66 = merge(x65)
|
|
x67 = paint(x64, x66)
|
|
x68 = shape(I)
|
|
x69 = crop(x67, ORIGIN, x68)
|
|
return x69
|
|
|
|
|
|
def verify_3aa6fb7a(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = mapply(corners, x0)
|
|
x2 = underfill(I, ONE, x1)
|
|
return x2
|
|
|
|
|
|
def verify_3ac3eb23(I: Grid) -> Grid:
|
|
x0 = astuple(identity, dmirror)
|
|
x1 = astuple(cmirror, hmirror)
|
|
x2 = combine(x0, x1)
|
|
x3 = chain(lowermost, merge, fgpartition)
|
|
x4 = rbind(rapply, I)
|
|
x5 = lbind(compose, x3)
|
|
x6 = compose(initset, x5)
|
|
x7 = chain(first, x4, x6)
|
|
x8 = matcher(x7, ZERO)
|
|
x9 = extract(x2, x8)
|
|
x10 = x9(I)
|
|
x11 = objects(x10, T, F, T)
|
|
x12 = height(x10)
|
|
x13 = interval(ZERO, x12, TWO)
|
|
x14 = height(x10)
|
|
x15 = interval(ONE, x14, TWO)
|
|
x16 = rbind(apply, x13)
|
|
x17 = lbind(rbind, astuple)
|
|
x18 = chain(x16, x17, last)
|
|
x19 = rbind(apply, x15)
|
|
x20 = lbind(rbind, astuple)
|
|
x21 = compose(increment, last)
|
|
x22 = chain(x19, x20, x21)
|
|
x23 = rbind(apply, x15)
|
|
x24 = lbind(rbind, astuple)
|
|
x25 = compose(decrement, last)
|
|
x26 = chain(x23, x24, x25)
|
|
x27 = fork(combine, x18, x22)
|
|
x28 = fork(combine, x27, x26)
|
|
x29 = compose(x28, center)
|
|
x30 = fork(recolor, color, x29)
|
|
x31 = mapply(x30, x11)
|
|
x32 = paint(x10, x31)
|
|
x33 = x9(x32)
|
|
return x33
|
|
|
|
|
|
def verify_3af2c5a8(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(I, x0)
|
|
x2 = hmirror(x1)
|
|
x3 = vconcat(x1, x2)
|
|
return x3
|
|
|
|
|
|
def verify_3bd67248(I: Grid) -> Grid:
|
|
x0 = astuple(identity, identity)
|
|
x1 = astuple(rot90, rot270)
|
|
x2 = astuple(x0, x1)
|
|
x3 = astuple(rot180, rot180)
|
|
x4 = astuple(rot270, rot90)
|
|
x5 = astuple(x3, x4)
|
|
x6 = combine(x2, x5)
|
|
x7 = leastcolor(I)
|
|
x8 = repeat(x7, ONE)
|
|
x9 = rbind(rapply, I)
|
|
x10 = chain(x9, initset, first)
|
|
x11 = compose(first, x10)
|
|
x12 = chain(dedupe, first, x11)
|
|
x13 = matcher(x12, x8)
|
|
x14 = extract(x6, x13)
|
|
x15 = first(x14)
|
|
x16 = last(x14)
|
|
x17 = x15(I)
|
|
x18 = ofcolor(x17, x7)
|
|
x19 = height(x18)
|
|
x20 = interval(ZERO, x19, ONE)
|
|
x21 = lbind(astuple, x19)
|
|
x22 = apply(x21, x20)
|
|
x23 = rbind(shoot, DOWN)
|
|
x24 = mapply(x23, x22)
|
|
x25 = fill(x17, FOUR, x24)
|
|
x26 = astuple(x19, x19)
|
|
x27 = canvas(ZERO, x26)
|
|
x28 = asindices(x27)
|
|
x29 = shift(x28, x26)
|
|
x30 = shape(I)
|
|
x31 = maximum(x30)
|
|
x32 = lbind(shift, x29)
|
|
x33 = interval(ZERO, x31, x19)
|
|
x34 = pair(x33, x33)
|
|
x35 = mapply(x32, x34)
|
|
x36 = fill(x25, TWO, x35)
|
|
x37 = x16(x36)
|
|
return x37
|
|
|
|
|
|
def verify_3bdb4ada(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = compose(flip, x2)
|
|
x4 = extract(x0, x3)
|
|
x5 = remove(x4, x0)
|
|
x6 = compose(flip, even)
|
|
x7 = rbind(chain, first)
|
|
x8 = rbind(chain, last)
|
|
x9 = lbind(rbind, subtract)
|
|
x10 = lbind(x7, x6)
|
|
x11 = lbind(x8, x6)
|
|
x12 = chain(x10, x9, uppermost)
|
|
x13 = chain(x11, x9, leftmost)
|
|
x14 = lbind(fork, both)
|
|
x15 = fork(x14, x12, x13)
|
|
x16 = fork(sfilter, toindices, x15)
|
|
x17 = mapply(x16, x5)
|
|
x18 = color(x4)
|
|
x19 = fill(I, x18, x17)
|
|
return x19
|
|
|
|
|
|
def verify_3befdf3e(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = rbind(compose, last)
|
|
x2 = lbind(rbind, contained)
|
|
x3 = chain(x1, x2, box)
|
|
x4 = fork(sfilter, identity, x3)
|
|
x5 = compose(color, x4)
|
|
x6 = fork(other, palette, x5)
|
|
x7 = chain(decrement, decrement, height)
|
|
x8 = chain(decrement, decrement, width)
|
|
x9 = compose(toivec, x7)
|
|
x10 = fork(shift, toindices, x9)
|
|
x11 = chain(toivec, invert, x7)
|
|
x12 = fork(shift, toindices, x11)
|
|
x13 = compose(tojvec, x8)
|
|
x14 = fork(shift, toindices, x13)
|
|
x15 = chain(tojvec, invert, x8)
|
|
x16 = fork(shift, toindices, x15)
|
|
x17 = fork(combine, x10, x12)
|
|
x18 = fork(combine, x14, x16)
|
|
x19 = fork(combine, x17, x18)
|
|
x20 = fork(combine, backdrop, x19)
|
|
x21 = fork(difference, x20, box)
|
|
x22 = fork(recolor, x5, x21)
|
|
x23 = fork(recolor, x6, box)
|
|
x24 = fork(combine, x22, x23)
|
|
x25 = mapply(x24, x0)
|
|
x26 = paint(I, x25)
|
|
return x26
|
|
|
|
|
|
def verify_3c9b0459(I: Grid) -> Grid:
|
|
x0 = rot180(I)
|
|
return x0
|
|
|
|
|
|
def verify_3de23699(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = corners(x0)
|
|
x2 = mapply(dneighbors, x1)
|
|
x3 = toobject(x2, I)
|
|
x4 = mostcolor(x3)
|
|
x5 = palette(I)
|
|
x6 = remove(x4, x5)
|
|
x7 = order(x6, identity)
|
|
x8 = first(x7)
|
|
x9 = last(x7)
|
|
x10 = ofcolor(I, x8)
|
|
x11 = ofcolor(I, x9)
|
|
x12 = switch(I, x9, x8)
|
|
x13 = combine(x10, x11)
|
|
x14 = subgrid(x13, x12)
|
|
x15 = trim(x14)
|
|
return x15
|
|
|
|
|
|
def verify_3e980e27(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, THREE)
|
|
x1 = ofcolor(I, TWO)
|
|
x2 = matcher(first, THREE)
|
|
x3 = matcher(first, TWO)
|
|
x4 = rbind(objects, T)
|
|
x5 = rbind(x4, T)
|
|
x6 = rbind(x5, F)
|
|
x7 = lbind(contained, THREE)
|
|
x8 = compose(x7, palette)
|
|
x9 = lbind(contained, TWO)
|
|
x10 = compose(x9, palette)
|
|
x11 = rbind(sfilter, x8)
|
|
x12 = compose(x11, x6)
|
|
x13 = rbind(sfilter, x10)
|
|
x14 = compose(x13, x6)
|
|
x15 = rbind(argmax, numcolors)
|
|
x16 = chain(normalize, x15, x12)
|
|
x17 = rbind(argmax, numcolors)
|
|
x18 = compose(x17, x14)
|
|
x19 = chain(normalize, vmirror, x18)
|
|
x20 = rbind(sfilter, x2)
|
|
x21 = chain(ulcorner, x20, x16)
|
|
x22 = rbind(sfilter, x3)
|
|
x23 = chain(ulcorner, x22, x19)
|
|
x24 = rbind(sfilter, x3)
|
|
x25 = chain(center, x24, x18)
|
|
x26 = lbind(lbind, shift)
|
|
x27 = compose(x26, x16)
|
|
x28 = lbind(lbind, shift)
|
|
x29 = compose(x28, x19)
|
|
x30 = rbind(apply, x0)
|
|
x31 = lbind(lbind, add)
|
|
x32 = compose(invert, x21)
|
|
x33 = chain(x30, x31, x32)
|
|
x34 = rbind(remove, x1)
|
|
x35 = compose(x34, x25)
|
|
x36 = lbind(lbind, add)
|
|
x37 = chain(x36, invert, x23)
|
|
x38 = fork(apply, x37, x35)
|
|
x39 = fork(mapply, x27, x33)
|
|
x40 = fork(mapply, x29, x38)
|
|
x41 = fork(paint, identity, x39)
|
|
x42 = fork(paint, identity, x40)
|
|
x43 = size(x0)
|
|
x44 = positive(x43)
|
|
x45 = size(x1)
|
|
x46 = positive(x45)
|
|
x47 = branch(x44, x41, identity)
|
|
x48 = branch(x46, x42, identity)
|
|
x49 = compose(x47, x48)
|
|
x50 = x49(I)
|
|
return x50
|
|
|
|
|
|
def verify_3eda0437(I: Grid) -> Grid:
|
|
x0 = matcher(identity, ZERO)
|
|
x1 = rbind(sfilter, x0)
|
|
x2 = compose(size, x1)
|
|
x3 = apply(x2, I)
|
|
x4 = maximum(x3)
|
|
x5 = dmirror(I)
|
|
x6 = apply(x2, x5)
|
|
x7 = maximum(x6)
|
|
x8 = increment(x7)
|
|
x9 = interval(TWO, x8, ONE)
|
|
x10 = increment(x4)
|
|
x11 = interval(TWO, x10, ONE)
|
|
x12 = product(x9, x11)
|
|
x13 = fork(multiply, first, last)
|
|
x14 = apply(x13, x12)
|
|
x15 = lbind(sfilter, x12)
|
|
x16 = lbind(matcher, x13)
|
|
x17 = compose(x15, x16)
|
|
x18 = apply(x17, x14)
|
|
x19 = lbind(occurrences, I)
|
|
x20 = lbind(recolor, ZERO)
|
|
x21 = lbind(canvas, NEG_ONE)
|
|
x22 = compose(asindices, x21)
|
|
x23 = chain(x19, x20, x22)
|
|
x24 = lbind(mapply, x23)
|
|
x25 = chain(positive, size, x24)
|
|
x26 = sfilter(x18, x25)
|
|
x27 = compose(x13, first)
|
|
x28 = rbind(argmax, x27)
|
|
x29 = lbind(recolor, ZERO)
|
|
x30 = lbind(canvas, NEG_ONE)
|
|
x31 = chain(x29, asindices, x30)
|
|
x32 = lbind(lbind, shift)
|
|
x33 = lbind(occurrences, I)
|
|
x34 = fork(mapply, x32, x33)
|
|
x35 = compose(x34, x31)
|
|
x36 = size(x26)
|
|
x37 = positive(x36)
|
|
x38 = lbind(recolor, SIX)
|
|
x39 = lbind(mapply, x35)
|
|
x40 = chain(x38, x39, x28)
|
|
x41 = fork(difference, identity, identity)
|
|
x42 = branch(x37, x40, x41)
|
|
x43 = x42(x26)
|
|
x44 = paint(I, x43)
|
|
return x44
|
|
|
|
|
|
def verify_3f7978a0(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = compose(double, height)
|
|
x3 = fork(equality, x2, size)
|
|
x4 = compose(double, width)
|
|
x5 = fork(equality, x4, size)
|
|
x6 = fork(either, x3, x5)
|
|
x7 = rbind(equality, TWO)
|
|
x8 = lbind(colorfilter, x1)
|
|
x9 = rbind(sfilter, vline)
|
|
x10 = rbind(sfilter, hline)
|
|
x11 = chain(x9, x8, color)
|
|
x12 = chain(x7, size, x11)
|
|
x13 = chain(x10, x8, color)
|
|
x14 = chain(x7, size, x13)
|
|
x15 = fork(either, x12, x14)
|
|
x16 = fork(both, x6, x15)
|
|
x17 = extract(x0, x16)
|
|
x18 = color(x17)
|
|
x19 = colorfilter(x1, x18)
|
|
x20 = first(x19)
|
|
x21 = vline(x20)
|
|
x22 = ulcorner(x17)
|
|
x23 = lrcorner(x17)
|
|
x24 = branch(x21, UP, LEFT)
|
|
x25 = add(x22, x24)
|
|
x26 = branch(x21, DOWN, RIGHT)
|
|
x27 = add(x23, x26)
|
|
x28 = initset(x27)
|
|
x29 = insert(x25, x28)
|
|
x30 = subgrid(x29, I)
|
|
return x30
|
|
|
|
|
|
def verify_40853293(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(recolor, color, backdrop)
|
|
x2 = apply(x1, x0)
|
|
x3 = mfilter(x2, hline)
|
|
x4 = mfilter(x2, vline)
|
|
x5 = paint(I, x3)
|
|
x6 = paint(x5, x4)
|
|
return x6
|
|
|
|
|
|
def verify_4093f84a(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = palette(x1)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = lbind(ofcolor, I)
|
|
x5 = compose(x3, x4)
|
|
x6 = argmin(x2, x5)
|
|
x7 = palette(I)
|
|
x8 = remove(x6, x7)
|
|
x9 = lbind(colorcount, I)
|
|
x10 = argmin(x8, x9)
|
|
x11 = ofcolor(I, x6)
|
|
x12 = leftmost(x11)
|
|
x13 = positive(x12)
|
|
x14 = branch(x13, identity, dmirror)
|
|
x15 = x14(I)
|
|
x16 = ofcolor(x15, x6)
|
|
x17 = subgrid(x16, x15)
|
|
x18 = leftmost(x16)
|
|
x19 = rightmost(x16)
|
|
x20 = lbind(greater, x18)
|
|
x21 = compose(x20, last)
|
|
x22 = rbind(greater, x19)
|
|
x23 = compose(x22, last)
|
|
x24 = asindices(x15)
|
|
x25 = sfilter(x24, x21)
|
|
x26 = subgrid(x25, x15)
|
|
x27 = asindices(x15)
|
|
x28 = sfilter(x27, x23)
|
|
x29 = subgrid(x28, x15)
|
|
x30 = rbind(equality, x10)
|
|
x31 = rbind(order, x30)
|
|
x32 = apply(x31, x26)
|
|
x33 = vmirror(x29)
|
|
x34 = apply(x31, x33)
|
|
x35 = vmirror(x34)
|
|
x36 = hconcat(x32, x17)
|
|
x37 = hconcat(x36, x35)
|
|
x38 = x14(x37)
|
|
x39 = replace(x38, x10, x6)
|
|
return x39
|
|
|
|
|
|
def verify_41e4d17e(I: Grid) -> Grid:
|
|
x0 = lbind(equality, NINE)
|
|
x1 = compose(x0, size)
|
|
x2 = fork(equality, height, width)
|
|
x3 = fork(both, x1, x2)
|
|
x4 = objects(I, T, F, F)
|
|
x5 = sfilter(x4, x3)
|
|
x6 = fork(combine, vfrontier, hfrontier)
|
|
x7 = compose(x6, center)
|
|
x8 = mapply(x7, x5)
|
|
x9 = underfill(I, SIX, x8)
|
|
return x9
|
|
|
|
|
|
def verify_4258a5f9(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = mapply(neighbors, x1)
|
|
x3 = difference(x2, x1)
|
|
x4 = fill(I, ONE, x3)
|
|
return x4
|
|
|
|
|
|
def verify_4290ef0e(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = fgpartition(I)
|
|
x2 = objects(I, T, F, T)
|
|
x3 = rbind(valmax, width)
|
|
x4 = lbind(colorfilter, x2)
|
|
x5 = chain(x3, x4, color)
|
|
x6 = compose(maximum, shape)
|
|
x7 = fork(add, x6, x5)
|
|
x8 = compose(invert, x7)
|
|
x9 = order(x1, x8)
|
|
x10 = rbind(add, DOWN)
|
|
x11 = compose(x10, ulcorner)
|
|
x12 = fork(contained, x11, toindices)
|
|
x13 = rbind(add, RIGHT)
|
|
x14 = compose(x13, ulcorner)
|
|
x15 = fork(contained, x14, toindices)
|
|
x16 = fork(add, x12, x15)
|
|
x17 = rbind(argmax, x16)
|
|
x18 = compose(initset, identity)
|
|
x19 = fork(insert, vmirror, x18)
|
|
x20 = fork(insert, cmirror, x19)
|
|
x21 = fork(insert, hmirror, x20)
|
|
x22 = compose(x17, x21)
|
|
x23 = apply(x22, x9)
|
|
x24 = size(x1)
|
|
x25 = apply(size, x1)
|
|
x26 = contained(ONE, x25)
|
|
x27 = increment(x24)
|
|
x28 = branch(x26, x24, x27)
|
|
x29 = double(x28)
|
|
x30 = decrement(x29)
|
|
x31 = apply(normalize, x23)
|
|
x32 = interval(ZERO, x28, ONE)
|
|
x33 = pair(x32, x32)
|
|
x34 = mpapply(shift, x31, x33)
|
|
x35 = astuple(x30, x30)
|
|
x36 = canvas(x0, x35)
|
|
x37 = paint(x36, x34)
|
|
x38 = rot90(x37)
|
|
x39 = paint(x38, x34)
|
|
x40 = rot90(x39)
|
|
x41 = paint(x40, x34)
|
|
x42 = rot90(x41)
|
|
x43 = paint(x42, x34)
|
|
return x43
|
|
|
|
|
|
def verify_42a50994(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = sizefilter(x0, ONE)
|
|
x2 = merge(x1)
|
|
x3 = cover(I, x2)
|
|
return x3
|
|
|
|
|
|
def verify_4347f46a(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = fork(difference, toindices, box)
|
|
x2 = mapply(x1, x0)
|
|
x3 = mostcolor(I)
|
|
x4 = fill(I, x3, x2)
|
|
return x4
|
|
|
|
|
|
def verify_444801d8(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = sizefilter(x0, ONE)
|
|
x2 = difference(x0, x1)
|
|
x3 = rbind(toobject, I)
|
|
x4 = chain(leastcolor, x3, delta)
|
|
x5 = rbind(shift, UP)
|
|
x6 = fork(connect, ulcorner, urcorner)
|
|
x7 = compose(x5, x6)
|
|
x8 = rbind(shift, DOWN)
|
|
x9 = fork(connect, llcorner, lrcorner)
|
|
x10 = compose(x8, x9)
|
|
x11 = fork(astuple, x7, x10)
|
|
x12 = lbind(rbind, manhattan)
|
|
x13 = compose(x12, delta)
|
|
x14 = fork(argmin, x11, x13)
|
|
x15 = fork(combine, delta, x14)
|
|
x16 = fork(recolor, x4, x15)
|
|
x17 = mapply(x16, x2)
|
|
x18 = paint(I, x17)
|
|
return x18
|
|
|
|
|
|
def verify_445eab21(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = color(x2)
|
|
x4 = canvas(x3, TWO_BY_TWO)
|
|
return x4
|
|
|
|
|
|
def verify_447fd412(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = shape(I)
|
|
x2 = shift(x0, x1)
|
|
x3 = mostcolor(I)
|
|
x4 = shape(I)
|
|
x5 = multiply(x4, THREE)
|
|
x6 = canvas(x3, x5)
|
|
x7 = paint(x6, x2)
|
|
x8 = objects(x7, F, T, T)
|
|
x9 = argmax(x8, numcolors)
|
|
x10 = normalize(x9)
|
|
x11 = remove(x10, x8)
|
|
x12 = merge(x11)
|
|
x13 = mostcolor(x12)
|
|
x14 = palette(x10)
|
|
x15 = matcher(identity, x13)
|
|
x16 = argmin(x14, x15)
|
|
x17 = matcher(first, x13)
|
|
x18 = sfilter(x10, x17)
|
|
x19 = matcher(first, x16)
|
|
x20 = sfilter(x10, x19)
|
|
x21 = recolor(x3, x20)
|
|
x22 = combine(x18, x21)
|
|
x23 = lbind(mfilter, x8)
|
|
x24 = lbind(occurrences, x7)
|
|
x25 = lbind(upscale, x22)
|
|
x26 = compose(x24, x25)
|
|
x27 = lbind(lbind, shift)
|
|
x28 = lbind(upscale, x10)
|
|
x29 = compose(x27, x28)
|
|
x30 = fork(apply, x29, x26)
|
|
x31 = compose(positive, size)
|
|
x32 = lbind(chain, x31)
|
|
x33 = rbind(x32, toindices)
|
|
x34 = lbind(rbind, intersection)
|
|
x35 = chain(x23, x33, x34)
|
|
x36 = chain(size, x35, toindices)
|
|
x37 = rbind(colorcount, x13)
|
|
x38 = fork(equality, x36, x37)
|
|
x39 = rbind(sfilter, x38)
|
|
x40 = chain(merge, x39, x30)
|
|
x41 = interval(ONE, SIX, ONE)
|
|
x42 = mapply(x40, x41)
|
|
x43 = paint(x7, x42)
|
|
x44 = subgrid(x2, x43)
|
|
return x44
|
|
|
|
|
|
def verify_44d8ac46(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = apply(delta, x0)
|
|
x2 = mfilter(x1, square)
|
|
x3 = fill(I, TWO, x2)
|
|
return x3
|
|
|
|
|
|
def verify_44f52bb0(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = equality(x0, I)
|
|
x2 = hmirror(I)
|
|
x3 = equality(x2, I)
|
|
x4 = either(x1, x3)
|
|
x5 = branch(x4, ONE, SEVEN)
|
|
x6 = canvas(x5, UNITY)
|
|
return x6
|
|
|
|
|
|
def verify_4522001f(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = multiply(THREE, x0)
|
|
x2 = mostcolor(I)
|
|
x3 = canvas(x2, x1)
|
|
x4 = objects(I, F, F, T)
|
|
x5 = merge(x4)
|
|
x6 = mostcolor(x5)
|
|
x7 = first(x4)
|
|
x8 = matcher(first, x6)
|
|
x9 = sfilter(x7, x8)
|
|
x10 = normalize(x9)
|
|
x11 = delta(x10)
|
|
x12 = first(x11)
|
|
x13 = subtract(ONE, x12)
|
|
x14 = asobject(I)
|
|
x15 = shape(I)
|
|
x16 = double(x15)
|
|
x17 = multiply(x13, x16)
|
|
x18 = shift(x14, x17)
|
|
x19 = paint(x3, x18)
|
|
x20 = objects(x19, F, F, T)
|
|
x21 = lbind(mapply, dneighbors)
|
|
x22 = matcher(first, x6)
|
|
x23 = rbind(sfilter, x22)
|
|
x24 = chain(x21, delta, x23)
|
|
x25 = ineighbors(ORIGIN)
|
|
x26 = apply(double, x25)
|
|
x27 = rbind(apply, x26)
|
|
x28 = lbind(lbind, shift)
|
|
x29 = compose(x27, x28)
|
|
x30 = lbind(rbind, adjacent)
|
|
x31 = compose(x30, x24)
|
|
x32 = fork(extract, x29, x31)
|
|
x33 = fork(combine, identity, x32)
|
|
x34 = compose(backdrop, x33)
|
|
x35 = double(x12)
|
|
x36 = decrement(x35)
|
|
x37 = multiply(x36, FOUR)
|
|
x38 = rbind(shift, x37)
|
|
x39 = compose(x38, x34)
|
|
x40 = fork(combine, x34, x39)
|
|
x41 = mapply(x40, x20)
|
|
x42 = fill(x19, x6, x41)
|
|
return x42
|
|
|
|
|
|
def verify_4612dd53(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = box(x1)
|
|
x3 = fill(I, TWO, x2)
|
|
x4 = subgrid(x1, x3)
|
|
x5 = ofcolor(x4, x0)
|
|
x6 = mapply(vfrontier, x5)
|
|
x7 = mapply(hfrontier, x5)
|
|
x8 = size(x6)
|
|
x9 = size(x7)
|
|
x10 = greater(x8, x9)
|
|
x11 = branch(x10, x7, x6)
|
|
x12 = fill(x4, TWO, x11)
|
|
x13 = ofcolor(x12, TWO)
|
|
x14 = ulcorner(x1)
|
|
x15 = shift(x13, x14)
|
|
x16 = underfill(I, TWO, x15)
|
|
return x16
|
|
|
|
|
|
def verify_46442a0e(I: Grid) -> Grid:
|
|
x0 = rot90(I)
|
|
x1 = rot180(I)
|
|
x2 = rot270(I)
|
|
x3 = hconcat(I, x0)
|
|
x4 = hconcat(x2, x1)
|
|
x5 = vconcat(x3, x4)
|
|
return x5
|
|
|
|
|
|
def verify_469497ad(I: Grid) -> Grid:
|
|
x0 = numcolors(I)
|
|
x1 = decrement(x0)
|
|
x2 = upscale(I, x1)
|
|
x3 = rbind(toobject, I)
|
|
x4 = lbind(ofcolor, I)
|
|
x5 = compose(outbox, x4)
|
|
x6 = chain(numcolors, x3, x5)
|
|
x7 = matcher(x6, ONE)
|
|
x8 = palette(I)
|
|
x9 = sfilter(x8, x7)
|
|
x10 = fork(multiply, height, width)
|
|
x11 = lbind(ofcolor, I)
|
|
x12 = compose(x10, x11)
|
|
x13 = argmin(x9, x12)
|
|
x14 = ofcolor(x2, x13)
|
|
x15 = outbox(x14)
|
|
x16 = toobject(x15, x2)
|
|
x17 = mostcolor(x16)
|
|
x18 = ulcorner(x14)
|
|
x19 = shoot(x18, NEG_UNITY)
|
|
x20 = lrcorner(x14)
|
|
x21 = shoot(x20, UNITY)
|
|
x22 = urcorner(x14)
|
|
x23 = shoot(x22, UP_RIGHT)
|
|
x24 = llcorner(x14)
|
|
x25 = shoot(x24, DOWN_LEFT)
|
|
x26 = combine(x19, x21)
|
|
x27 = combine(x23, x25)
|
|
x28 = combine(x26, x27)
|
|
x29 = ofcolor(x2, x17)
|
|
x30 = intersection(x28, x29)
|
|
x31 = fill(x2, TWO, x30)
|
|
return x31
|
|
|
|
|
|
def verify_46f33fce(I: Grid) -> Grid:
|
|
x0 = rot180(I)
|
|
x1 = downscale(x0, TWO)
|
|
x2 = rot180(x1)
|
|
x3 = upscale(x2, FOUR)
|
|
return x3
|
|
|
|
|
|
def verify_47c1f68c(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = compress(I)
|
|
x4 = mostcolor(x3)
|
|
x5 = tophalf(I)
|
|
x6 = lefthalf(x5)
|
|
x7 = vmirror(x6)
|
|
x8 = hconcat(x6, x7)
|
|
x9 = hmirror(x8)
|
|
x10 = vconcat(x8, x9)
|
|
x11 = tophalf(I)
|
|
x12 = righthalf(x11)
|
|
x13 = vmirror(x12)
|
|
x14 = hconcat(x13, x12)
|
|
x15 = hmirror(x14)
|
|
x16 = vconcat(x14, x15)
|
|
x17 = bottomhalf(I)
|
|
x18 = lefthalf(x17)
|
|
x19 = vmirror(x18)
|
|
x20 = hconcat(x18, x19)
|
|
x21 = hmirror(x20)
|
|
x22 = vconcat(x21, x20)
|
|
x23 = bottomhalf(I)
|
|
x24 = righthalf(x23)
|
|
x25 = vmirror(x24)
|
|
x26 = hconcat(x25, x24)
|
|
x27 = hmirror(x26)
|
|
x28 = vconcat(x27, x26)
|
|
x29 = astuple(x10, x16)
|
|
x30 = astuple(x22, x28)
|
|
x31 = combine(x29, x30)
|
|
x32 = argmax(x31, numcolors)
|
|
x33 = asindices(x32)
|
|
x34 = ofcolor(x32, x4)
|
|
x35 = difference(x33, x34)
|
|
x36 = fill(x32, x2, x35)
|
|
return x36
|
|
|
|
|
|
def verify_484b58aa(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = lbind(colorfilter, x1)
|
|
x3 = compose(size, x2)
|
|
x4 = valmin(x0, x3)
|
|
x5 = matcher(x3, x4)
|
|
x6 = sfilter(x0, x5)
|
|
x7 = lbind(colorcount, I)
|
|
x8 = argmin(x6, x7)
|
|
x9 = asobject(I)
|
|
x10 = matcher(first, x8)
|
|
x11 = compose(flip, x10)
|
|
x12 = sfilter(x9, x11)
|
|
x13 = lbind(contained, x8)
|
|
x14 = compose(flip, x13)
|
|
x15 = sfilter(I, x14)
|
|
x16 = asobject(x15)
|
|
x17 = hperiod(x16)
|
|
x18 = dmirror(I)
|
|
x19 = sfilter(x18, x14)
|
|
x20 = asobject(x19)
|
|
x21 = hperiod(x20)
|
|
x22 = (x21, x17)
|
|
x23 = lbind(multiply, x22)
|
|
x24 = neighbors(ORIGIN)
|
|
x25 = mapply(neighbors, x24)
|
|
x26 = apply(x23, x25)
|
|
x27 = lbind(shift, x12)
|
|
x28 = mapply(x27, x26)
|
|
x29 = paint(I, x28)
|
|
return x29
|
|
|
|
|
|
def verify_48d8fb45(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = argmax(x0, numcolors)
|
|
x2 = mostcolor(x1)
|
|
x3 = matcher(first, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = shape(x4)
|
|
x6 = normalize(x4)
|
|
x7 = mostcolor(I)
|
|
x8 = canvas(x7, x5)
|
|
x9 = paint(x8, x6)
|
|
return x9
|
|
|
|
|
|
def verify_4938f0c2(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = matcher(size, FOUR)
|
|
x2 = fork(both, square, x1)
|
|
x3 = extract(x0, x2)
|
|
x4 = color(x3)
|
|
x5 = merge(x0)
|
|
x6 = compose(hmirror, vmirror)
|
|
x7 = initset(x6)
|
|
x8 = insert(vmirror, x7)
|
|
x9 = insert(hmirror, x8)
|
|
x10 = rapply(x9, x5)
|
|
x11 = ulcorner(x3)
|
|
x12 = lbind(subtract, x11)
|
|
x13 = matcher(first, x4)
|
|
x14 = rbind(sfilter, x13)
|
|
x15 = chain(x12, ulcorner, x14)
|
|
x16 = fork(shift, identity, x15)
|
|
x17 = mapply(x16, x10)
|
|
x18 = paint(I, x17)
|
|
return x18
|
|
|
|
|
|
def verify_496994bd(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = vsplit(I, TWO)
|
|
x2 = apply(numcolors, x1)
|
|
x3 = contained(ONE, x2)
|
|
x4 = branch(x3, hmirror, vmirror)
|
|
x5 = x4(I)
|
|
x6 = asobject(x5)
|
|
x7 = matcher(first, x0)
|
|
x8 = compose(flip, x7)
|
|
x9 = sfilter(x6, x8)
|
|
x10 = paint(I, x9)
|
|
return x10
|
|
|
|
|
|
def verify_49d1d64f(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = increment(x0)
|
|
x2 = increment(x1)
|
|
x3 = canvas(ZERO, x2)
|
|
x4 = asobject(I)
|
|
x5 = shift(x4, UNITY)
|
|
x6 = shift(x5, LEFT)
|
|
x7 = paint(x3, x6)
|
|
x8 = shift(x5, RIGHT)
|
|
x9 = paint(x7, x8)
|
|
x10 = shift(x5, UP)
|
|
x11 = paint(x9, x10)
|
|
x12 = shift(x5, DOWN)
|
|
x13 = paint(x11, x12)
|
|
x14 = paint(x13, x5)
|
|
return x14
|
|
|
|
|
|
def verify_4be741c5(I: Grid) -> Grid:
|
|
x0 = first(I)
|
|
x1 = dedupe(x0)
|
|
x2 = size(x1)
|
|
x3 = equality(x2, ONE)
|
|
x4 = branch(x3, dmirror, identity)
|
|
x5 = branch(x3, height, width)
|
|
x6 = x5(I)
|
|
x7 = astuple(ONE, x6)
|
|
x8 = x4(I)
|
|
x9 = crop(x8, ORIGIN, x7)
|
|
x10 = apply(dedupe, x9)
|
|
x11 = x4(x10)
|
|
return x11
|
|
|
|
|
|
def verify_4c4377d9(I: Grid) -> Grid:
|
|
x0 = hmirror(I)
|
|
x1 = vconcat(x0, I)
|
|
return x1
|
|
|
|
|
|
def verify_4c5c2cf0(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = compose(dneighbors, center)
|
|
x2 = fork(difference, backdrop, x1)
|
|
x3 = fork(equality, toindices, x2)
|
|
x4 = matcher(size, FIVE)
|
|
x5 = fork(both, x3, x4)
|
|
x6 = extract(x0, x5)
|
|
x7 = color(x6)
|
|
x8 = merge(x0)
|
|
x9 = compose(hmirror, vmirror)
|
|
x10 = initset(x9)
|
|
x11 = insert(vmirror, x10)
|
|
x12 = insert(hmirror, x11)
|
|
x13 = rapply(x12, x8)
|
|
x14 = ulcorner(x6)
|
|
x15 = lbind(subtract, x14)
|
|
x16 = matcher(first, x7)
|
|
x17 = rbind(sfilter, x16)
|
|
x18 = chain(x15, ulcorner, x17)
|
|
x19 = fork(shift, identity, x18)
|
|
x20 = mapply(x19, x13)
|
|
x21 = paint(I, x20)
|
|
return x21
|
|
|
|
|
|
def verify_50846271(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = interval(TWO, FIVE, ONE)
|
|
x3 = rbind(shift, RIGHT)
|
|
x4 = rbind(shift, LEFT)
|
|
x5 = rbind(shift, UP)
|
|
x6 = rbind(shift, DOWN)
|
|
x7 = lbind(fork, intersection)
|
|
x8 = lbind(x7, identity)
|
|
x9 = lbind(rbind, shift)
|
|
x10 = compose(x8, x9)
|
|
x11 = compose(x10, tojvec)
|
|
x12 = chain(x10, tojvec, invert)
|
|
x13 = compose(x10, toivec)
|
|
x14 = chain(x10, toivec, invert)
|
|
x15 = lbind(compose, initset)
|
|
x16 = lbind(rbind, rapply)
|
|
x17 = lbind(chain, first)
|
|
x18 = lbind(compose, x4)
|
|
x19 = x15(x11)
|
|
x20 = rbind(x17, x19)
|
|
x21 = chain(x18, x20, x16)
|
|
x22 = lbind(compose, x3)
|
|
x23 = x15(x12)
|
|
x24 = rbind(x17, x23)
|
|
x25 = chain(x22, x24, x16)
|
|
x26 = lbind(compose, x5)
|
|
x27 = x15(x13)
|
|
x28 = rbind(x17, x27)
|
|
x29 = chain(x26, x28, x16)
|
|
x30 = lbind(compose, x6)
|
|
x31 = x15(x14)
|
|
x32 = rbind(x17, x31)
|
|
x33 = chain(x30, x32, x16)
|
|
x34 = rbind(ofcolor, x0)
|
|
x35 = compose(x21, x34)
|
|
x36 = compose(x25, x34)
|
|
x37 = compose(x29, x34)
|
|
x38 = compose(x33, x34)
|
|
x39 = lbind(fork, combine)
|
|
x40 = fork(x39, x35, x36)
|
|
x41 = fork(x39, x37, x38)
|
|
x42 = fork(x39, x40, x41)
|
|
x43 = lbind(recolor, x0)
|
|
x44 = rbind(mapply, x2)
|
|
x45 = chain(x43, x44, x42)
|
|
x46 = fork(paint, identity, x45)
|
|
x47 = power(x46, FOUR)
|
|
x48 = x47(I)
|
|
x49 = objects(x48, T, T, T)
|
|
x50 = colorfilter(x49, x0)
|
|
x51 = compose(maximum, shape)
|
|
x52 = apply(x51, x50)
|
|
x53 = maximum(x52)
|
|
x54 = ofcolor(x48, x0)
|
|
x55 = rbind(contained, x54)
|
|
x56 = rbind(add, RIGHT)
|
|
x57 = compose(x55, x56)
|
|
x58 = rbind(add, LEFT)
|
|
x59 = compose(x55, x58)
|
|
x60 = fork(either, x57, x59)
|
|
x61 = rbind(add, DOWN)
|
|
x62 = compose(x55, x61)
|
|
x63 = rbind(add, UP)
|
|
x64 = compose(x55, x63)
|
|
x65 = fork(either, x62, x64)
|
|
x66 = fork(both, x60, x65)
|
|
x67 = matcher(size, x53)
|
|
x68 = fork(either, vline, hline)
|
|
x69 = fork(both, x67, x68)
|
|
x70 = sfilter(x50, x69)
|
|
x71 = apply(center, x70)
|
|
x72 = sfilter(x54, x66)
|
|
x73 = combine(x72, x71)
|
|
x74 = halve(x53)
|
|
x75 = invert(x74)
|
|
x76 = toivec(x75)
|
|
x77 = rbind(add, x76)
|
|
x78 = toivec(x74)
|
|
x79 = rbind(add, x78)
|
|
x80 = fork(connect, x77, x79)
|
|
x81 = invert(x74)
|
|
x82 = tojvec(x81)
|
|
x83 = rbind(add, x82)
|
|
x84 = tojvec(x74)
|
|
x85 = rbind(add, x84)
|
|
x86 = fork(connect, x83, x85)
|
|
x87 = fork(combine, x80, x86)
|
|
x88 = mapply(x87, x73)
|
|
x89 = fill(x48, x0, x88)
|
|
x90 = replace(x89, x0, EIGHT)
|
|
x91 = fill(x90, x0, x1)
|
|
return x91
|
|
|
|
|
|
def verify_508bd3b6(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = palette(I)
|
|
x2 = compose(maximum, shape)
|
|
x3 = lbind(apply, x2)
|
|
x4 = lbind(colorfilter, x0)
|
|
x5 = chain(maximum, x3, x4)
|
|
x6 = matcher(x5, ONE)
|
|
x7 = extract(x1, x6)
|
|
x8 = lbind(ofcolor, I)
|
|
x9 = compose(backdrop, x8)
|
|
x10 = fork(equality, x8, x9)
|
|
x11 = extract(x1, x10)
|
|
x12 = ofcolor(I, x11)
|
|
x13 = ofcolor(I, x7)
|
|
x14 = rbind(manhattan, x12)
|
|
x15 = compose(x14, initset)
|
|
x16 = argmin(x13, x15)
|
|
x17 = ulcorner(x13)
|
|
x18 = contained(x17, x13)
|
|
x19 = shoot(x16, UNITY)
|
|
x20 = shoot(x16, NEG_UNITY)
|
|
x21 = combine(x19, x20)
|
|
x22 = shoot(x16, UP_RIGHT)
|
|
x23 = shoot(x16, DOWN_LEFT)
|
|
x24 = combine(x22, x23)
|
|
x25 = branch(x18, x21, x24)
|
|
x26 = asindices(I)
|
|
x27 = outbox(x12)
|
|
x28 = intersection(x26, x27)
|
|
x29 = intersection(x28, x25)
|
|
x30 = initset(x16)
|
|
x31 = rbind(manhattan, x30)
|
|
x32 = compose(x31, initset)
|
|
x33 = argmin(x29, x32)
|
|
x34 = height(x12)
|
|
x35 = height(I)
|
|
x36 = equality(x34, x35)
|
|
x37 = leftmost(x13)
|
|
x38 = leftmost(x12)
|
|
x39 = greater(x37, x38)
|
|
x40 = uppermost(x13)
|
|
x41 = uppermost(x12)
|
|
x42 = greater(x40, x41)
|
|
x43 = lbind(shoot, x33)
|
|
x44 = branch(x39, UNITY, NEG_UNITY)
|
|
x45 = branch(x39, UP_RIGHT, DOWN_LEFT)
|
|
x46 = branch(x42, UNITY, NEG_UNITY)
|
|
x47 = branch(x42, DOWN_LEFT, UP_RIGHT)
|
|
x48 = branch(x36, x44, x46)
|
|
x49 = branch(x36, x45, x47)
|
|
x50 = x43(x48)
|
|
x51 = x43(x49)
|
|
x52 = combine(x50, x51)
|
|
x53 = difference(x52, x13)
|
|
x54 = fill(I, THREE, x53)
|
|
return x54
|
|
|
|
|
|
def verify_50cb2852(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = compose(backdrop, inbox)
|
|
x2 = mapply(x1, x0)
|
|
x3 = fill(I, EIGHT, x2)
|
|
return x3
|
|
|
|
|
|
def verify_5117e062(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = argmax(x0, numcolors)
|
|
x2 = mostcolor(x1)
|
|
x3 = normalize(x1)
|
|
x4 = mostcolor(I)
|
|
x5 = shape(x1)
|
|
x6 = canvas(x4, x5)
|
|
x7 = fill(x6, x2, x3)
|
|
return x7
|
|
|
|
|
|
def verify_5168d44c(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = valmax(x0, x1)
|
|
x3 = matcher(x1, x2)
|
|
x4 = sfilter(x0, x3)
|
|
x5 = argmax(x4, size)
|
|
x6 = color(x5)
|
|
x7 = remove(x5, x0)
|
|
x8 = objects(I, T, F, F)
|
|
x9 = lbind(colorfilter, x8)
|
|
x10 = chain(size, x9, color)
|
|
x11 = argmin(x7, x10)
|
|
x12 = other(x7, x11)
|
|
x13 = color(x12)
|
|
x14 = colorfilter(x8, x13)
|
|
x15 = apply(leftmost, x14)
|
|
x16 = size(x15)
|
|
x17 = equality(ONE, x16)
|
|
x18 = apply(uppermost, x14)
|
|
x19 = size(x18)
|
|
x20 = equality(ONE, x19)
|
|
x21 = fork(add, first, last)
|
|
x22 = compose(x21, ulcorner)
|
|
x23 = argmin(x14, x22)
|
|
x24 = remove(x23, x14)
|
|
x25 = lbind(manhattan, x23)
|
|
x26 = argmin(x24, x25)
|
|
x27 = lowermost(x26)
|
|
x28 = lowermost(x23)
|
|
x29 = subtract(x27, x28)
|
|
x30 = uppermost(x26)
|
|
x31 = uppermost(x23)
|
|
x32 = subtract(x30, x31)
|
|
x33 = astuple(x29, x32)
|
|
x34 = maximum(x33)
|
|
x35 = branch(x20, ZERO, x34)
|
|
x36 = rightmost(x26)
|
|
x37 = rightmost(x23)
|
|
x38 = subtract(x36, x37)
|
|
x39 = leftmost(x26)
|
|
x40 = leftmost(x23)
|
|
x41 = subtract(x39, x40)
|
|
x42 = astuple(x38, x41)
|
|
x43 = maximum(x42)
|
|
x44 = branch(x17, ZERO, x43)
|
|
x45 = astuple(x35, x44)
|
|
x46 = shift(x11, x45)
|
|
x47 = delta(x46)
|
|
x48 = hmirror(x46)
|
|
x49 = ulcorner(x47)
|
|
x50 = delta(x48)
|
|
x51 = ulcorner(x50)
|
|
x52 = subtract(x49, x51)
|
|
x53 = shift(x48, x52)
|
|
x54 = combine(x46, x53)
|
|
x55 = vmirror(x54)
|
|
x56 = ulcorner(x47)
|
|
x57 = delta(x55)
|
|
x58 = ulcorner(x57)
|
|
x59 = subtract(x56, x58)
|
|
x60 = shift(x55, x59)
|
|
x61 = combine(x60, x54)
|
|
x62 = color(x11)
|
|
x63 = replace(I, x62, x6)
|
|
x64 = paint(x63, x61)
|
|
return x64
|
|
|
|
|
|
def verify_539a4f51(I: Grid) -> Grid:
|
|
x0 = astuple(identity, cmirror)
|
|
x1 = astuple(hmirror, vmirror)
|
|
x2 = combine(x0, x1)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = rbind(objects, F)
|
|
x5 = rbind(x4, F)
|
|
x6 = rbind(x5, T)
|
|
x7 = rbind(argmin, x3)
|
|
x8 = lbind(contained, ORIGIN)
|
|
x9 = chain(x8, toindices, x7)
|
|
x10 = compose(x9, x6)
|
|
x11 = lbind(compose, x10)
|
|
x12 = rbind(rapply, I)
|
|
x13 = compose(initset, x11)
|
|
x14 = chain(first, x12, x13)
|
|
x15 = extract(x2, x14)
|
|
x16 = x15(I)
|
|
x17 = height(I)
|
|
x18 = first(x16)
|
|
x19 = matcher(identity, ZERO)
|
|
x20 = compose(flip, x19)
|
|
x21 = sfilter(x18, x20)
|
|
x22 = size(x21)
|
|
x23 = divide(x17, x22)
|
|
x24 = increment(x23)
|
|
x25 = double(x24)
|
|
x26 = repeat(x21, x25)
|
|
x27 = merge(x26)
|
|
x28 = double(x17)
|
|
x29 = repeat(x27, x28)
|
|
x30 = asobject(x29)
|
|
x31 = chain(increment, last, last)
|
|
x32 = compose(first, last)
|
|
x33 = fork(greater, x31, x32)
|
|
x34 = sfilter(x30, x33)
|
|
x35 = upscale(x16, TWO)
|
|
x36 = dmirror(x34)
|
|
x37 = combine(x34, x36)
|
|
x38 = paint(x35, x37)
|
|
x39 = x15(x38)
|
|
return x39
|
|
|
|
|
|
def verify_53b68214(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = mostcolor(I)
|
|
x3 = width(I)
|
|
x4 = astuple(TEN, x3)
|
|
x5 = canvas(x2, x4)
|
|
x6 = interval(ONE, SIX, ONE)
|
|
x7 = invert(TEN)
|
|
x8 = interval(x7, TEN, ONE)
|
|
x9 = product(x6, x8)
|
|
x10 = remove(ORIGIN, x9)
|
|
x11 = lbind(intersection, x1)
|
|
x12 = lbind(shift, x1)
|
|
x13 = compose(x11, x12)
|
|
x14 = toindices(x1)
|
|
x15 = lbind(intersection, x14)
|
|
x16 = lbind(shift, x14)
|
|
x17 = compose(x15, x16)
|
|
x18 = compose(size, x13)
|
|
x19 = compose(size, x17)
|
|
x20 = fork(equality, x18, x19)
|
|
x21 = chain(positive, size, x13)
|
|
x22 = fork(both, x20, x21)
|
|
x23 = sfilter(x10, x22)
|
|
x24 = compose(size, x13)
|
|
x25 = valmax(x23, x24)
|
|
x26 = compose(size, x13)
|
|
x27 = matcher(x26, x25)
|
|
x28 = sfilter(x23, x27)
|
|
x29 = fork(multiply, first, last)
|
|
x30 = argmax(x28, x29)
|
|
x31 = interval(ZERO, TEN, ONE)
|
|
x32 = lbind(shift, x1)
|
|
x33 = lbind(multiply, x30)
|
|
x34 = compose(x32, x33)
|
|
x35 = mapply(x34, x31)
|
|
x36 = paint(x5, x35)
|
|
return x36
|
|
|
|
|
|
def verify_543a7ed5(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = mapply(outbox, x0)
|
|
x2 = fill(I, THREE, x1)
|
|
x3 = mapply(delta, x0)
|
|
x4 = fill(x2, FOUR, x3)
|
|
return x4
|
|
|
|
|
|
def verify_54d82841(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = mapply(delta, x0)
|
|
x2 = first(x0)
|
|
x3 = toindices(x2)
|
|
x4 = rbind(contained, x3)
|
|
x5 = portrait(x2)
|
|
x6 = apply(first, x1)
|
|
x7 = apply(last, x1)
|
|
x8 = branch(x5, x6, x7)
|
|
x9 = branch(x5, RIGHT, DOWN)
|
|
x10 = delta(x2)
|
|
x11 = center(x10)
|
|
x12 = add(x11, x9)
|
|
x13 = x4(x12)
|
|
x14 = branch(x5, width, height)
|
|
x15 = branch(x5, rbind, lbind)
|
|
x16 = x14(I)
|
|
x17 = decrement(x16)
|
|
x18 = x15(astuple, x17)
|
|
x19 = branch(x5, toivec, tojvec)
|
|
x20 = branch(x13, x19, x18)
|
|
x21 = apply(x20, x8)
|
|
x22 = fill(I, FOUR, x21)
|
|
return x22
|
|
|
|
|
|
def verify_54d9e175(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = leastcolor(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(x2, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = objects(x5, F, F, T)
|
|
x7 = power(increment, FIVE)
|
|
x8 = lbind(remove, FIVE)
|
|
x9 = lbind(remove, ZERO)
|
|
x10 = chain(x8, x9, palette)
|
|
x11 = chain(x7, first, x10)
|
|
x12 = fork(recolor, x11, toindices)
|
|
x13 = mapply(x12, x6)
|
|
x14 = paint(I, x13)
|
|
return x14
|
|
|
|
|
|
def verify_5521c0d9(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = rbind(objects, T)
|
|
x5 = rbind(x4, F)
|
|
x6 = rbind(x5, T)
|
|
x7 = lbind(canvas, x3)
|
|
x8 = compose(x7, shape)
|
|
x9 = fork(hconcat, identity, x8)
|
|
x10 = compose(x6, x9)
|
|
x11 = lbind(apply, uppermost)
|
|
x12 = chain(maximum, x11, x10)
|
|
x13 = matcher(x12, ZERO)
|
|
x14 = astuple(identity, dmirror)
|
|
x15 = astuple(cmirror, hmirror)
|
|
x16 = combine(x14, x15)
|
|
x17 = rbind(rapply, I)
|
|
x18 = chain(first, x17, initset)
|
|
x19 = compose(x13, x18)
|
|
x20 = extract(x16, x19)
|
|
x21 = x20(I)
|
|
x22 = shape(x21)
|
|
x23 = canvas(x3, x22)
|
|
x24 = hconcat(x21, x23)
|
|
x25 = objects(x24, T, F, T)
|
|
x26 = compose(toivec, height)
|
|
x27 = fork(shift, identity, x26)
|
|
x28 = mapply(x27, x25)
|
|
x29 = mostcolor(I)
|
|
x30 = merge(x25)
|
|
x31 = fill(x21, x29, x30)
|
|
x32 = paint(x31, x28)
|
|
x33 = x20(x32)
|
|
return x33
|
|
|
|
|
|
def verify_5582e5ca(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = shape(I)
|
|
x2 = canvas(x0, x1)
|
|
return x2
|
|
|
|
|
|
def verify_5614dbcf(I: Grid) -> Grid:
|
|
x0 = canvas(ZERO, THREE_BY_THREE)
|
|
x1 = asindices(x0)
|
|
x2 = shape(I)
|
|
x3 = divide(x2, THREE)
|
|
x4 = first(x3)
|
|
x5 = last(x3)
|
|
x6 = interval(ZERO, x4, ONE)
|
|
x7 = interval(ZERO, x5, ONE)
|
|
x8 = product(x6, x7)
|
|
x9 = rbind(multiply, THREE)
|
|
x10 = apply(x9, x8)
|
|
x11 = matcher(first, FIVE)
|
|
x12 = compose(flip, x11)
|
|
x13 = rbind(sfilter, x12)
|
|
x14 = rbind(toobject, I)
|
|
x15 = lbind(shift, x1)
|
|
x16 = chain(x13, x14, x15)
|
|
x17 = compose(color, x16)
|
|
x18 = lbind(shift, x1)
|
|
x19 = fork(recolor, x17, x18)
|
|
x20 = mapply(x19, x10)
|
|
x21 = paint(I, x20)
|
|
x22 = downscale(x21, THREE)
|
|
return x22
|
|
|
|
|
|
def verify_56dc2b01(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = hline(x0)
|
|
x2 = branch(x1, dmirror, identity)
|
|
x3 = x2(I)
|
|
x4 = fgpartition(x3)
|
|
x5 = matcher(color, TWO)
|
|
x6 = compose(flip, x5)
|
|
x7 = extract(x4, x6)
|
|
x8 = ofcolor(x3, TWO)
|
|
x9 = leftmost(x8)
|
|
x10 = leftmost(x7)
|
|
x11 = greater(x9, x10)
|
|
x12 = manhattan(x7, x8)
|
|
x13 = decrement(x12)
|
|
x14 = branch(x11, identity, invert)
|
|
x15 = branch(x11, decrement, increment)
|
|
x16 = branch(x11, leftmost, rightmost)
|
|
x17 = x14(x13)
|
|
x18 = tojvec(x17)
|
|
x19 = shift(x7, x18)
|
|
x20 = x16(x19)
|
|
x21 = x15(x20)
|
|
x22 = tojvec(x21)
|
|
x23 = vfrontier(x22)
|
|
x24 = cover(x3, x7)
|
|
x25 = paint(x24, x19)
|
|
x26 = fill(x25, EIGHT, x23)
|
|
x27 = x2(x26)
|
|
return x27
|
|
|
|
|
|
def verify_56ff96f3(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = fork(recolor, color, backdrop)
|
|
x2 = mapply(x1, x0)
|
|
x3 = paint(I, x2)
|
|
return x3
|
|
|
|
|
|
def verify_57aa92db(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = palette(I)
|
|
x2 = lbind(sfilter, x0)
|
|
x3 = rbind(compose, palette)
|
|
x4 = lbind(lbind, contained)
|
|
x5 = chain(x2, x3, x4)
|
|
x6 = compose(size, x5)
|
|
x7 = argmax(x1, x6)
|
|
x8 = rbind(colorcount, x7)
|
|
x9 = apply(x8, x0)
|
|
x10 = minimum(x9)
|
|
x11 = rbind(colorcount, x7)
|
|
x12 = matcher(x11, x10)
|
|
x13 = sfilter(x0, x12)
|
|
x14 = argmax(x13, size)
|
|
x15 = matcher(first, x7)
|
|
x16 = rbind(sfilter, x15)
|
|
x17 = lbind(upscale, x14)
|
|
x18 = chain(x17, width, x16)
|
|
x19 = compose(ulcorner, x16)
|
|
x20 = chain(ulcorner, x16, x18)
|
|
x21 = fork(subtract, x19, x20)
|
|
x22 = fork(shift, x18, x21)
|
|
x23 = rbind(other, x7)
|
|
x24 = compose(x23, palette)
|
|
x25 = compose(x16, x22)
|
|
x26 = fork(difference, x22, x25)
|
|
x27 = fork(recolor, x24, x26)
|
|
x28 = compose(x16, x22)
|
|
x29 = fork(combine, x28, x27)
|
|
x30 = remove(x14, x0)
|
|
x31 = mapply(x29, x30)
|
|
x32 = paint(I, x31)
|
|
return x32
|
|
|
|
|
|
def verify_5ad4f10b(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = palette(I)
|
|
x5 = remove(x3, x4)
|
|
x6 = lbind(chain, size)
|
|
x7 = rbind(x6, dneighbors)
|
|
x8 = lbind(lbind, intersection)
|
|
x9 = lbind(ofcolor, I)
|
|
x10 = chain(x7, x8, x9)
|
|
x11 = rbind(matcher, ZERO)
|
|
x12 = compose(x11, x10)
|
|
x13 = chain(flip, positive, size)
|
|
x14 = lbind(ofcolor, I)
|
|
x15 = fork(sfilter, x14, x12)
|
|
x16 = compose(x13, x15)
|
|
x17 = argmax(x5, x16)
|
|
x18 = other(x5, x17)
|
|
x19 = ofcolor(I, x17)
|
|
x20 = subgrid(x19, I)
|
|
x21 = switch(x20, x17, x18)
|
|
x22 = replace(x21, x17, x3)
|
|
x23 = lbind(downscale, x22)
|
|
x24 = fork(upscale, x23, identity)
|
|
x25 = matcher(x24, x22)
|
|
x26 = shape(x22)
|
|
x27 = maximum(x26)
|
|
x28 = interval(ONE, x27, ONE)
|
|
x29 = sfilter(x28, x25)
|
|
x30 = maximum(x29)
|
|
x31 = downscale(x22, x30)
|
|
return x31
|
|
|
|
|
|
def verify_5bd6f4ac(I: Grid) -> Grid:
|
|
x0 = rot270(I)
|
|
x1 = crop(x0, ORIGIN, THREE_BY_THREE)
|
|
x2 = rot90(x1)
|
|
return x2
|
|
|
|
|
|
def verify_5c0a986e(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = colorfilter(x0, TWO)
|
|
x2 = colorfilter(x0, ONE)
|
|
x3 = lbind(recolor, TWO)
|
|
x4 = rbind(shoot, UNITY)
|
|
x5 = chain(x3, x4, lrcorner)
|
|
x6 = lbind(recolor, ONE)
|
|
x7 = rbind(shoot, NEG_UNITY)
|
|
x8 = chain(x6, x7, ulcorner)
|
|
x9 = mapply(x5, x1)
|
|
x10 = mapply(x8, x2)
|
|
x11 = combine(x9, x10)
|
|
x12 = paint(I, x11)
|
|
return x12
|
|
|
|
|
|
def verify_5c2c9af4(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = height(x1)
|
|
x3 = halve(x2)
|
|
x4 = width(x1)
|
|
x5 = halve(x4)
|
|
x6 = ulcorner(x1)
|
|
x7 = lrcorner(x1)
|
|
x8 = shape(I)
|
|
x9 = maximum(x8)
|
|
x10 = multiply(THREE, TEN)
|
|
x11 = interval(ZERO, x10, ONE)
|
|
x12 = rbind(multiply, x3)
|
|
x13 = apply(x12, x11)
|
|
x14 = rbind(multiply, x5)
|
|
x15 = apply(x14, x11)
|
|
x16 = pair(x13, x15)
|
|
x17 = rbind(add, x6)
|
|
x18 = apply(invert, x16)
|
|
x19 = apply(x17, x18)
|
|
x20 = rbind(add, x7)
|
|
x21 = apply(x20, x16)
|
|
x22 = pair(x19, x21)
|
|
x23 = mapply(box, x22)
|
|
x24 = fill(I, x0, x23)
|
|
return x24
|
|
|
|
|
|
def verify_5daaa586(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = colorfilter(x1, x0)
|
|
x3 = rbind(bordering, I)
|
|
x4 = compose(flip, x3)
|
|
x5 = mfilter(x2, x4)
|
|
x6 = outbox(x5)
|
|
x7 = subgrid(x6, I)
|
|
x8 = trim(x7)
|
|
x9 = palette(x8)
|
|
x10 = matcher(identity, x0)
|
|
x11 = argmin(x9, x10)
|
|
x12 = trim(x7)
|
|
x13 = ofcolor(x12, x11)
|
|
x14 = shift(x13, UNITY)
|
|
x15 = ofcolor(x7, x11)
|
|
x16 = difference(x15, x14)
|
|
x17 = compose(first, first)
|
|
x18 = compose(first, last)
|
|
x19 = fork(equality, x17, x18)
|
|
x20 = compose(last, first)
|
|
x21 = compose(last, last)
|
|
x22 = fork(equality, x20, x21)
|
|
x23 = fork(either, x19, x22)
|
|
x24 = product(x14, x16)
|
|
x25 = sfilter(x24, x23)
|
|
x26 = fork(connect, first, last)
|
|
x27 = mapply(x26, x25)
|
|
x28 = fill(x7, x11, x27)
|
|
return x28
|
|
|
|
|
|
def verify_60b61512(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = mapply(delta, x0)
|
|
x2 = fill(I, SEVEN, x1)
|
|
return x2
|
|
|
|
|
|
def verify_6150a2bd(I: Grid) -> Grid:
|
|
x0 = rot180(I)
|
|
return x0
|
|
|
|
|
|
def verify_623ea044(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = rbind(shoot, UNITY)
|
|
x3 = rbind(shoot, NEG_UNITY)
|
|
x4 = fork(combine, x2, x3)
|
|
x5 = rbind(shoot, UP_RIGHT)
|
|
x6 = rbind(shoot, DOWN_LEFT)
|
|
x7 = fork(combine, x5, x6)
|
|
x8 = fork(combine, x4, x7)
|
|
x9 = mapply(x8, x1)
|
|
x10 = fill(I, x0, x9)
|
|
return x10
|
|
|
|
|
|
def verify_62c24649(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(I, x0)
|
|
x2 = hmirror(x1)
|
|
x3 = vconcat(x1, x2)
|
|
return x3
|
|
|
|
|
|
def verify_63613498(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = mostcolor(I)
|
|
x2 = fork(add, height, width)
|
|
x3 = compose(decrement, x2)
|
|
x4 = fork(equality, x3, size)
|
|
x5 = rbind(bordering, I)
|
|
x6 = fork(both, x4, x5)
|
|
x7 = rbind(toobject, I)
|
|
x8 = chain(numcolors, x7, delta)
|
|
x9 = matcher(x8, TWO)
|
|
x10 = fork(both, x6, x9)
|
|
x11 = sfilter(x0, x10)
|
|
x12 = argmax(x11, size)
|
|
x13 = delta(x12)
|
|
x14 = toobject(x13, I)
|
|
x15 = matcher(first, x1)
|
|
x16 = compose(flip, x15)
|
|
x17 = sfilter(x14, x16)
|
|
x18 = normalize(x17)
|
|
x19 = toindices(x18)
|
|
x20 = compose(toindices, normalize)
|
|
x21 = matcher(x20, x19)
|
|
x22 = remove(x17, x0)
|
|
x23 = argmax(x22, x21)
|
|
x24 = color(x12)
|
|
x25 = fill(I, x24, x23)
|
|
return x25
|
|
|
|
|
|
def verify_6430c8c4(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, tophalf, lefthalf)
|
|
x5 = branch(x3, bottomhalf, righthalf)
|
|
x6 = x4(I)
|
|
x7 = x5(I)
|
|
x8 = shape(x6)
|
|
x9 = palette(x6)
|
|
x10 = palette(x7)
|
|
x11 = intersection(x9, x10)
|
|
x12 = first(x11)
|
|
x13 = ofcolor(x6, x12)
|
|
x14 = ofcolor(x7, x12)
|
|
x15 = intersection(x13, x14)
|
|
x16 = canvas(x12, x8)
|
|
x17 = fill(x16, THREE, x15)
|
|
return x17
|
|
|
|
|
|
def verify_6455b5f5(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = asindices(I)
|
|
x2 = corners(x1)
|
|
x3 = toobject(x2, I)
|
|
x4 = mostcolor(x3)
|
|
x5 = colorfilter(x0, x4)
|
|
x6 = valmax(x5, size)
|
|
x7 = valmin(x5, size)
|
|
x8 = sizefilter(x5, x6)
|
|
x9 = sizefilter(x5, x7)
|
|
x10 = merge(x8)
|
|
x11 = fill(I, ONE, x10)
|
|
x12 = merge(x9)
|
|
x13 = fill(x11, EIGHT, x12)
|
|
return x13
|
|
|
|
|
|
def verify_662c240a(I: Grid) -> Grid:
|
|
x0 = portrait(I)
|
|
x1 = branch(x0, vsplit, hsplit)
|
|
x2 = shape(I)
|
|
x3 = maximum(x2)
|
|
x4 = minimum(x2)
|
|
x5 = divide(x3, x4)
|
|
x6 = x1(I, x5)
|
|
x7 = fork(equality, identity, dmirror)
|
|
x8 = compose(flip, x7)
|
|
x9 = extract(x6, x8)
|
|
return x9
|
|
|
|
|
|
def verify_67385a82(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = palette(I)
|
|
x2 = other(x1, ZERO)
|
|
x3 = colorfilter(x0, x2)
|
|
x4 = sizefilter(x3, ONE)
|
|
x5 = difference(x3, x4)
|
|
x6 = merge(x5)
|
|
x7 = fill(I, EIGHT, x6)
|
|
return x7
|
|
|
|
|
|
def verify_673ef223(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = merge(x0)
|
|
x2 = palette(x1)
|
|
x3 = lbind(colorfilter, x0)
|
|
x4 = compose(size, x3)
|
|
x5 = matcher(x4, TWO)
|
|
x6 = asindices(I)
|
|
x7 = box(x6)
|
|
x8 = rbind(difference, x7)
|
|
x9 = lbind(ofcolor, I)
|
|
x10 = chain(size, x8, x9)
|
|
x11 = matcher(x10, ZERO)
|
|
x12 = rbind(greater, ONE)
|
|
x13 = lbind(apply, size)
|
|
x14 = lbind(colorfilter, x0)
|
|
x15 = compose(x13, x14)
|
|
x16 = chain(x12, minimum, x15)
|
|
x17 = fork(both, x11, x16)
|
|
x18 = fork(both, x5, x17)
|
|
x19 = extract(x2, x18)
|
|
x20 = other(x2, x19)
|
|
x21 = ofcolor(I, x20)
|
|
x22 = colorfilter(x0, x19)
|
|
x23 = rbind(vmatching, x21)
|
|
x24 = rbind(hmatching, x21)
|
|
x25 = fork(either, x23, x24)
|
|
x26 = extract(x22, x25)
|
|
x27 = other(x22, x26)
|
|
x28 = rbind(gravitate, x26)
|
|
x29 = compose(x28, initset)
|
|
x30 = fork(add, identity, x29)
|
|
x31 = fork(connect, identity, x30)
|
|
x32 = mapply(x31, x21)
|
|
x33 = fill(I, x20, x32)
|
|
x34 = fill(x33, FOUR, x21)
|
|
x35 = ofcolor(I, x19)
|
|
x36 = apply(first, x35)
|
|
x37 = size(x36)
|
|
x38 = apply(last, x35)
|
|
x39 = size(x38)
|
|
x40 = greater(x37, x39)
|
|
x41 = compose(toivec, first)
|
|
x42 = compose(tojvec, last)
|
|
x43 = branch(x40, x41, x42)
|
|
x44 = branch(x40, hfrontier, vfrontier)
|
|
x45 = ulcorner(x26)
|
|
x46 = ulcorner(x27)
|
|
x47 = subtract(x46, x45)
|
|
x48 = x43(x47)
|
|
x49 = shift(x21, x48)
|
|
x50 = mapply(x44, x49)
|
|
x51 = fill(x34, x20, x50)
|
|
x52 = fill(x51, x19, x35)
|
|
return x52
|
|
|
|
|
|
def verify_6773b310(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(x2, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = palette(I)
|
|
x7 = remove(x2, x6)
|
|
x8 = lbind(colorcount, I)
|
|
x9 = argmin(x7, x8)
|
|
x10 = other(x7, x9)
|
|
x11 = objects(x5, F, T, T)
|
|
x12 = rbind(colorcount, x9)
|
|
x13 = valmax(x11, x12)
|
|
x14 = rbind(colorcount, x9)
|
|
x15 = matcher(x14, x13)
|
|
x16 = sfilter(x11, x15)
|
|
x17 = apply(ulcorner, x16)
|
|
x18 = first(x11)
|
|
x19 = shape(x18)
|
|
x20 = increment(x19)
|
|
x21 = rbind(divide, x20)
|
|
x22 = apply(x21, x17)
|
|
x23 = sfilter(x0, hline)
|
|
x24 = size(x23)
|
|
x25 = sfilter(x0, vline)
|
|
x26 = size(x25)
|
|
x27 = astuple(x24, x26)
|
|
x28 = increment(x27)
|
|
x29 = canvas(x10, x28)
|
|
x30 = fill(x29, ONE, x22)
|
|
return x30
|
|
|
|
|
|
def verify_67a3c6ac(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
return x0
|
|
|
|
|
|
def verify_67a423a3(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = totuple(x2)
|
|
x4 = first(x3)
|
|
x5 = last(x3)
|
|
x6 = ofcolor(I, x4)
|
|
x7 = backdrop(x6)
|
|
x8 = ofcolor(I, x5)
|
|
x9 = backdrop(x8)
|
|
x10 = intersection(x7, x9)
|
|
x11 = outbox(x10)
|
|
x12 = fill(I, FOUR, x11)
|
|
return x12
|
|
|
|
|
|
def verify_67e8384a(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(I, x0)
|
|
x2 = hmirror(x1)
|
|
x3 = vconcat(x1, x2)
|
|
return x3
|
|
|
|
|
|
def verify_681b3aeb(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = totuple(x0)
|
|
x2 = first(x1)
|
|
x3 = normalize(x2)
|
|
x4 = last(x1)
|
|
x5 = normalize(x4)
|
|
x6 = color(x3)
|
|
x7 = color(x5)
|
|
x8 = toindices(x3)
|
|
x9 = toindices(x5)
|
|
x10 = fork(multiply, height, width)
|
|
x11 = fork(equality, size, x10)
|
|
x12 = lbind(shift, x8)
|
|
x13 = lbind(shift, x9)
|
|
x14 = compose(x12, first)
|
|
x15 = compose(x13, last)
|
|
x16 = fork(intersection, x14, x15)
|
|
x17 = compose(size, x16)
|
|
x18 = compose(x12, first)
|
|
x19 = compose(x13, last)
|
|
x20 = fork(combine, x18, x19)
|
|
x21 = compose(x11, x20)
|
|
x22 = matcher(x17, ZERO)
|
|
x23 = fork(both, x22, x21)
|
|
x24 = valmax(x1, height)
|
|
x25 = valmax(x1, width)
|
|
x26 = interval(ZERO, x24, ONE)
|
|
x27 = interval(ZERO, x25, ONE)
|
|
x28 = product(x26, x27)
|
|
x29 = product(x28, x28)
|
|
x30 = argmax(x29, x23)
|
|
x31 = first(x30)
|
|
x32 = shift(x8, x31)
|
|
x33 = last(x30)
|
|
x34 = shift(x9, x33)
|
|
x35 = combine(x32, x34)
|
|
x36 = shape(x35)
|
|
x37 = canvas(x7, x36)
|
|
x38 = ulcorner(x35)
|
|
x39 = invert(x38)
|
|
x40 = shift(x32, x39)
|
|
x41 = fill(x37, x6, x40)
|
|
return x41
|
|
|
|
|
|
def verify_6855a6e4(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(difference, toindices, box)
|
|
x2 = compose(size, x1)
|
|
x3 = matcher(x2, ZERO)
|
|
x4 = rbind(add, FOUR)
|
|
x5 = chain(x4, double, width)
|
|
x6 = fork(equality, size, x5)
|
|
x7 = chain(x4, double, height)
|
|
x8 = fork(equality, size, x7)
|
|
x9 = fork(either, x6, x8)
|
|
x10 = fork(both, x3, x9)
|
|
x11 = extract(x0, x10)
|
|
x12 = toindices(x11)
|
|
x13 = center(x11)
|
|
x14 = vfrontier(x13)
|
|
x15 = intersection(x12, x14)
|
|
x16 = size(x15)
|
|
x17 = positive(x16)
|
|
x18 = branch(x17, dmirror, identity)
|
|
x19 = x18(I)
|
|
x20 = color(x11)
|
|
x21 = palette(I)
|
|
x22 = remove(x20, x21)
|
|
x23 = lbind(colorcount, I)
|
|
x24 = argmin(x22, x23)
|
|
x25 = other(x22, x24)
|
|
x26 = ofcolor(x19, x24)
|
|
x27 = ofcolor(x19, x20)
|
|
x28 = leftmost(x27)
|
|
x29 = lbind(greater, x28)
|
|
x30 = compose(x29, last)
|
|
x31 = sfilter(x26, x30)
|
|
x32 = difference(x26, x31)
|
|
x33 = vmirror(x31)
|
|
x34 = leftmost(x27)
|
|
x35 = leftmost(x31)
|
|
x36 = subtract(x34, x35)
|
|
x37 = add(TWO, x36)
|
|
x38 = tojvec(x37)
|
|
x39 = shift(x33, x38)
|
|
x40 = vmirror(x32)
|
|
x41 = rightmost(x32)
|
|
x42 = rightmost(x27)
|
|
x43 = subtract(x41, x42)
|
|
x44 = add(TWO, x43)
|
|
x45 = tojvec(x44)
|
|
x46 = invert(x45)
|
|
x47 = shift(x40, x46)
|
|
x48 = fill(x19, x25, x26)
|
|
x49 = combine(x39, x47)
|
|
x50 = fill(x48, x24, x49)
|
|
x51 = x18(x50)
|
|
return x51
|
|
|
|
|
|
def verify_68b16354(I: Grid) -> Grid:
|
|
x0 = hmirror(I)
|
|
return x0
|
|
|
|
|
|
def verify_694f12f3(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = compose(backdrop, inbox)
|
|
x5 = argmin(x3, size)
|
|
x6 = argmax(x3, size)
|
|
x7 = x4(x5)
|
|
x8 = x4(x6)
|
|
x9 = fill(I, ONE, x7)
|
|
x10 = fill(x9, TWO, x8)
|
|
return x10
|
|
|
|
|
|
def verify_6a1e5592(I: Grid) -> Grid:
|
|
x0 = astuple(identity, dmirror)
|
|
x1 = astuple(cmirror, hmirror)
|
|
x2 = combine(x0, x1)
|
|
x3 = fork(vsplit, identity, height)
|
|
x4 = chain(asobject, first, x3)
|
|
x5 = mostcolor(I)
|
|
x6 = lbind(chain, numcolors)
|
|
x7 = lbind(x6, x4)
|
|
x8 = lbind(chain, color)
|
|
x9 = lbind(x8, x4)
|
|
x10 = rbind(rapply, I)
|
|
x11 = compose(initset, x7)
|
|
x12 = chain(first, x10, x11)
|
|
x13 = rbind(rapply, I)
|
|
x14 = compose(initset, x9)
|
|
x15 = chain(first, x13, x14)
|
|
x16 = matcher(x12, ONE)
|
|
x17 = matcher(x15, x5)
|
|
x18 = compose(flip, x17)
|
|
x19 = fork(both, x16, x18)
|
|
x20 = argmax(x2, x19)
|
|
x21 = x20(I)
|
|
x22 = x4(x21)
|
|
x23 = color(x22)
|
|
x24 = palette(x21)
|
|
x25 = remove(x23, x24)
|
|
x26 = other(x25, x5)
|
|
x27 = objects(x21, T, T, T)
|
|
x28 = colorfilter(x27, x26)
|
|
x29 = ofcolor(x21, x23)
|
|
x30 = ofcolor(x21, x5)
|
|
x31 = mapply(neighbors, x30)
|
|
x32 = mapply(neighbors, x31)
|
|
x33 = lowermost(x29)
|
|
x34 = dneighbors(ORIGIN)
|
|
x35 = remove(DOWN, x34)
|
|
x36 = rbind(mapply, x35)
|
|
x37 = lbind(chain, x36)
|
|
x38 = lbind(lbind, add)
|
|
x39 = rbind(x37, x38)
|
|
x40 = lbind(lbind, compose)
|
|
x41 = lbind(lbind, shift)
|
|
x42 = chain(x39, x40, x41)
|
|
x43 = lbind(chain, size)
|
|
x44 = rbind(intersection, x29)
|
|
x45 = lbind(x43, x44)
|
|
x46 = rbind(matcher, ZERO)
|
|
x47 = lbind(lbind, shift)
|
|
x48 = chain(x46, x45, x47)
|
|
x49 = rbind(chain, first)
|
|
x50 = rbind(x49, decrement)
|
|
x51 = lbind(greater, x33)
|
|
x52 = x50(x51)
|
|
x53 = rbind(sfilter, x52)
|
|
x54 = lbind(compose, x53)
|
|
x55 = lbind(chain, size)
|
|
x56 = rbind(difference, x30)
|
|
x57 = lbind(x55, x56)
|
|
x58 = rbind(matcher, ZERO)
|
|
x59 = lbind(lbind, shift)
|
|
x60 = chain(x58, x57, x59)
|
|
x61 = lbind(chain, size)
|
|
x62 = rbind(intersection, x30)
|
|
x63 = lbind(x61, x62)
|
|
x64 = lbind(fork, difference)
|
|
x65 = compose(x54, x42)
|
|
x66 = lbind(lbind, shift)
|
|
x67 = fork(x64, x65, x66)
|
|
x68 = compose(x63, x67)
|
|
x69 = rbind(matcher, ZERO)
|
|
x70 = compose(x69, x68)
|
|
x71 = lbind(fork, both)
|
|
x72 = fork(x71, x70, x60)
|
|
x73 = lbind(fork, both)
|
|
x74 = fork(x73, x48, x72)
|
|
x75 = compose(normalize, toindices)
|
|
x76 = lbind(sfilter, x32)
|
|
x77 = chain(x76, x74, x75)
|
|
x78 = rbind(argmin, first)
|
|
x79 = compose(x78, x77)
|
|
x80 = fork(shift, x75, x79)
|
|
x81 = mapply(x80, x28)
|
|
x82 = merge(x28)
|
|
x83 = cover(x21, x82)
|
|
x84 = fill(x83, ONE, x81)
|
|
x85 = x20(x84)
|
|
return x85
|
|
|
|
|
|
def verify_6aa20dc0(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = mostcolor(I)
|
|
x2 = valmax(x0, numcolors)
|
|
x3 = matcher(numcolors, x2)
|
|
x4 = mfilter(x0, x3)
|
|
x5 = backdrop(x4)
|
|
x6 = toobject(x5, I)
|
|
x7 = matcher(first, x1)
|
|
x8 = compose(flip, x7)
|
|
x9 = sfilter(x6, x8)
|
|
x10 = mostcolor(x9)
|
|
x11 = initset(identity)
|
|
x12 = insert(dmirror, x11)
|
|
x13 = insert(cmirror, x12)
|
|
x14 = insert(hmirror, x13)
|
|
x15 = insert(vmirror, x14)
|
|
x16 = shape(I)
|
|
x17 = add(TWO, x16)
|
|
x18 = canvas(x1, x17)
|
|
x19 = asobject(I)
|
|
x20 = shift(x19, UNITY)
|
|
x21 = paint(x18, x20)
|
|
x22 = interval(ONE, FIVE, ONE)
|
|
x23 = matcher(first, x10)
|
|
x24 = compose(flip, x23)
|
|
x25 = rbind(sfilter, x24)
|
|
x26 = compose(normalize, x25)
|
|
x27 = chain(normalize, toindices, x26)
|
|
x28 = lbind(upscale, x9)
|
|
x29 = compose(initset, last)
|
|
x30 = compose(x28, first)
|
|
x31 = fork(rapply, x29, x30)
|
|
x32 = chain(normalize, first, x31)
|
|
x33 = compose(normalize, x26)
|
|
x34 = lbind(recolor, x1)
|
|
x35 = lbind(mapply, dneighbors)
|
|
x36 = compose(x35, x27)
|
|
x37 = fork(difference, x36, x27)
|
|
x38 = compose(x34, x37)
|
|
x39 = fork(combine, x33, x38)
|
|
x40 = compose(x39, x32)
|
|
x41 = lbind(lbind, shift)
|
|
x42 = chain(ulcorner, x26, x32)
|
|
x43 = fork(shift, x32, x42)
|
|
x44 = compose(x41, x43)
|
|
x45 = lbind(occurrences, x21)
|
|
x46 = compose(x45, x40)
|
|
x47 = fork(mapply, x44, x46)
|
|
x48 = product(x22, x15)
|
|
x49 = mapply(x47, x48)
|
|
x50 = paint(I, x49)
|
|
return x50
|
|
|
|
|
|
def verify_6b9890af(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = fork(equality, toindices, box)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = argmax(x2, x3)
|
|
x5 = fgpartition(I)
|
|
x6 = merge(x5)
|
|
x7 = difference(x6, x4)
|
|
x8 = subgrid(x4, I)
|
|
x9 = subgrid(x7, I)
|
|
x10 = height(x8)
|
|
x11 = subtract(x10, TWO)
|
|
x12 = height(x9)
|
|
x13 = divide(x11, x12)
|
|
x14 = width(x8)
|
|
x15 = subtract(x14, TWO)
|
|
x16 = width(x9)
|
|
x17 = divide(x15, x16)
|
|
x18 = hupscale(x9, x17)
|
|
x19 = vupscale(x18, x13)
|
|
x20 = asobject(x19)
|
|
x21 = shift(x20, UNITY)
|
|
x22 = paint(x8, x21)
|
|
return x22
|
|
|
|
|
|
def verify_6c434453(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = rbind(greater, TWO)
|
|
x2 = chain(x1, minimum, shape)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = fork(equality, toindices, box)
|
|
x5 = sfilter(x3, x4)
|
|
x6 = mostcolor(I)
|
|
x7 = merge(x5)
|
|
x8 = fill(I, x6, x7)
|
|
x9 = compose(hfrontier, center)
|
|
x10 = compose(vfrontier, center)
|
|
x11 = fork(combine, x9, x10)
|
|
x12 = fork(intersection, x11, backdrop)
|
|
x13 = mapply(x12, x5)
|
|
x14 = fill(x8, TWO, x13)
|
|
return x14
|
|
|
|
|
|
def verify_6cdd2623(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = rbind(difference, x1)
|
|
x3 = chain(size, x2, toindices)
|
|
x4 = matcher(x3, ZERO)
|
|
x5 = partition(I)
|
|
x6 = sfilter(x5, x4)
|
|
x7 = argmax(x6, size)
|
|
x8 = color(x7)
|
|
x9 = toindices(x7)
|
|
x10 = fork(either, hline, vline)
|
|
x11 = prapply(connect, x9, x9)
|
|
x12 = compose(flip, x4)
|
|
x13 = fork(both, x12, x10)
|
|
x14 = mfilter(x11, x13)
|
|
x15 = mostcolor(I)
|
|
x16 = shape(I)
|
|
x17 = canvas(x15, x16)
|
|
x18 = fill(x17, x8, x14)
|
|
return x18
|
|
|
|
|
|
def verify_6cf79266(I: Grid) -> Grid:
|
|
x0 = canvas(ZERO, THREE_BY_THREE)
|
|
x1 = asobject(x0)
|
|
x2 = occurrences(I, x1)
|
|
x3 = lbind(shift, x1)
|
|
x4 = mapply(x3, x2)
|
|
x5 = fill(I, ONE, x4)
|
|
return x5
|
|
|
|
|
|
def verify_6d0160f0(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = mostcolor(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(NEG_ONE, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = fill(x5, NEG_ONE, x1)
|
|
x7 = objects(x6, F, F, T)
|
|
x8 = lbind(contained, FOUR)
|
|
x9 = compose(x8, palette)
|
|
x10 = extract(x7, x9)
|
|
x11 = lbind(sfilter, x7)
|
|
x12 = compose(size, x11)
|
|
x13 = rbind(compose, palette)
|
|
x14 = lbind(lbind, contained)
|
|
x15 = chain(x12, x13, x14)
|
|
x16 = merge(x7)
|
|
x17 = palette(I)
|
|
x18 = remove(x2, x17)
|
|
x19 = valmax(x18, x15)
|
|
x20 = matcher(x15, x19)
|
|
x21 = sfilter(x18, x20)
|
|
x22 = lbind(colorcount, x16)
|
|
x23 = argmax(x21, x22)
|
|
x24 = shape(I)
|
|
x25 = canvas(x23, x24)
|
|
x26 = paint(x25, x1)
|
|
x27 = normalize(x10)
|
|
x28 = matcher(first, x2)
|
|
x29 = compose(flip, x28)
|
|
x30 = sfilter(x27, x29)
|
|
x31 = shape(x27)
|
|
x32 = increment(x31)
|
|
x33 = matcher(first, FOUR)
|
|
x34 = sfilter(x27, x33)
|
|
x35 = center(x34)
|
|
x36 = multiply(x32, x35)
|
|
x37 = shift(x30, x36)
|
|
x38 = paint(x26, x37)
|
|
return x38
|
|
|
|
|
|
def verify_6d0aefbc(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(I, x0)
|
|
return x1
|
|
|
|
|
|
def verify_6d58a25d(I: Grid) -> Grid:
|
|
x0 = astuple(ONE, THREE)
|
|
x1 = astuple(TWO, FOUR)
|
|
x2 = initset(x1)
|
|
x3 = insert(TWO_BY_TWO, x2)
|
|
x4 = insert(x0, x3)
|
|
x5 = tojvec(THREE)
|
|
x6 = toivec(THREE)
|
|
x7 = connect(x5, x6)
|
|
x8 = astuple(THREE, SIX)
|
|
x9 = connect(x5, x8)
|
|
x10 = combine(x7, x9)
|
|
x11 = combine(x4, x10)
|
|
x12 = lbind(contained, x11)
|
|
x13 = compose(normalize, toindices)
|
|
x14 = lbind(apply, x13)
|
|
x15 = chain(x12, x14, partition)
|
|
x16 = astuple(identity, identity)
|
|
x17 = astuple(rot90, rot270)
|
|
x18 = astuple(x16, x17)
|
|
x19 = astuple(rot180, rot180)
|
|
x20 = astuple(rot270, rot90)
|
|
x21 = astuple(x19, x20)
|
|
x22 = combine(x18, x21)
|
|
x23 = rbind(rapply, I)
|
|
x24 = compose(initset, first)
|
|
x25 = chain(first, x23, x24)
|
|
x26 = compose(x15, x25)
|
|
x27 = extract(x22, x26)
|
|
x28 = first(x27)
|
|
x29 = last(x27)
|
|
x30 = x28(I)
|
|
x31 = palette(I)
|
|
x32 = lbind(ofcolor, x30)
|
|
x33 = compose(normalize, x32)
|
|
x34 = matcher(x33, x11)
|
|
x35 = extract(x31, x34)
|
|
x36 = remove(x35, x31)
|
|
x37 = lbind(colorcount, x30)
|
|
x38 = argmin(x36, x37)
|
|
x39 = ofcolor(x30, x38)
|
|
x40 = ofcolor(x30, x35)
|
|
x41 = compose(positive, size)
|
|
x42 = rbind(intersection, x40)
|
|
x43 = rbind(shoot, UP)
|
|
x44 = chain(x41, x42, x43)
|
|
x45 = sfilter(x39, x44)
|
|
x46 = height(x30)
|
|
x47 = rbind(valmax, first)
|
|
x48 = lbind(sfilter, x40)
|
|
x49 = lbind(matcher, last)
|
|
x50 = chain(x48, x49, last)
|
|
x51 = chain(increment, x47, x50)
|
|
x52 = fork(astuple, x51, last)
|
|
x53 = decrement(x46)
|
|
x54 = lbind(astuple, x53)
|
|
x55 = compose(x54, last)
|
|
x56 = fork(connect, x52, x55)
|
|
x57 = mapply(x56, x45)
|
|
x58 = fill(x30, x38, x57)
|
|
x59 = x29(x58)
|
|
return x59
|
|
|
|
|
|
def verify_6d75e8bb(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = argmin(x0, size)
|
|
x2 = delta(x1)
|
|
x3 = fill(I, TWO, x2)
|
|
return x3
|
|
|
|
|
|
def verify_6e02f1e3(I: Grid) -> Grid:
|
|
x0 = numcolors(I)
|
|
x1 = equality(x0, THREE)
|
|
x2 = height(I)
|
|
x3 = decrement(x2)
|
|
x4 = toivec(x3)
|
|
x5 = branch(x1, x4, ORIGIN)
|
|
x6 = equality(x0, TWO)
|
|
x7 = shape(I)
|
|
x8 = decrement(x7)
|
|
x9 = width(I)
|
|
x10 = decrement(x9)
|
|
x11 = tojvec(x10)
|
|
x12 = branch(x6, x8, x11)
|
|
x13 = shape(I)
|
|
x14 = canvas(ZERO, x13)
|
|
x15 = connect(x5, x12)
|
|
x16 = fill(x14, FIVE, x15)
|
|
return x16
|
|
|
|
|
|
def verify_6e19193c(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = rbind(shoot, UNITY)
|
|
x2 = rbind(add, UNITY)
|
|
x3 = chain(x1, x2, lrcorner)
|
|
x4 = fork(recolor, color, x3)
|
|
x5 = rbind(shoot, UP_RIGHT)
|
|
x6 = rbind(add, UP_RIGHT)
|
|
x7 = chain(x5, x6, urcorner)
|
|
x8 = fork(recolor, color, x7)
|
|
x9 = rbind(shoot, NEG_UNITY)
|
|
x10 = rbind(add, NEG_UNITY)
|
|
x11 = chain(x9, x10, ulcorner)
|
|
x12 = fork(recolor, color, x11)
|
|
x13 = rbind(shoot, DOWN_LEFT)
|
|
x14 = rbind(add, DOWN_LEFT)
|
|
x15 = chain(x13, x14, llcorner)
|
|
x16 = fork(recolor, color, x15)
|
|
x17 = fork(remove, lrcorner, toindices)
|
|
x18 = fork(equality, toindices, x17)
|
|
x19 = sfilter(x0, x18)
|
|
x20 = fork(remove, urcorner, toindices)
|
|
x21 = fork(equality, toindices, x20)
|
|
x22 = sfilter(x0, x21)
|
|
x23 = fork(remove, ulcorner, toindices)
|
|
x24 = fork(equality, toindices, x23)
|
|
x25 = sfilter(x0, x24)
|
|
x26 = fork(remove, llcorner, toindices)
|
|
x27 = fork(equality, toindices, x26)
|
|
x28 = sfilter(x0, x27)
|
|
x29 = mapply(x4, x19)
|
|
x30 = mapply(x8, x22)
|
|
x31 = combine(x29, x30)
|
|
x32 = mapply(x12, x25)
|
|
x33 = mapply(x16, x28)
|
|
x34 = combine(x32, x33)
|
|
x35 = combine(x31, x34)
|
|
x36 = paint(I, x35)
|
|
return x36
|
|
|
|
|
|
def verify_6e82a1ae(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = matcher(size, TWO)
|
|
x2 = mfilter(x0, x1)
|
|
x3 = matcher(size, THREE)
|
|
x4 = mfilter(x0, x3)
|
|
x5 = matcher(size, FOUR)
|
|
x6 = mfilter(x0, x5)
|
|
x7 = fill(I, THREE, x2)
|
|
x8 = fill(x7, TWO, x4)
|
|
x9 = fill(x8, ONE, x6)
|
|
return x9
|
|
|
|
|
|
def verify_6ecd11f4(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = argmax(x0, numcolors)
|
|
x2 = argmin(x0, numcolors)
|
|
x3 = mostcolor(I)
|
|
x4 = shape(x2)
|
|
x5 = canvas(x3, x4)
|
|
x6 = normalize(x2)
|
|
x7 = paint(x5, x6)
|
|
x8 = height(x1)
|
|
x9 = width(x1)
|
|
x10 = height(x2)
|
|
x11 = width(x2)
|
|
x12 = normalize(x1)
|
|
x13 = divide(x10, x8)
|
|
x14 = divide(x11, x9)
|
|
x15 = width(x7)
|
|
x16 = interval(ZERO, x15, ONE)
|
|
x17 = height(x7)
|
|
x18 = interval(ZERO, x17, ONE)
|
|
x19 = rbind(multiply, x14)
|
|
x20 = rbind(divide, x14)
|
|
x21 = compose(x19, x20)
|
|
x22 = fork(equality, identity, x21)
|
|
x23 = rbind(multiply, x13)
|
|
x24 = rbind(divide, x13)
|
|
x25 = compose(x23, x24)
|
|
x26 = fork(equality, identity, x25)
|
|
x27 = lbind(apply, last)
|
|
x28 = compose(x22, first)
|
|
x29 = rbind(sfilter, x28)
|
|
x30 = lbind(pair, x16)
|
|
x31 = chain(x27, x29, x30)
|
|
x32 = compose(x31, last)
|
|
x33 = pair(x18, x7)
|
|
x34 = compose(x26, first)
|
|
x35 = sfilter(x33, x34)
|
|
x36 = apply(x32, x35)
|
|
x37 = color(x2)
|
|
x38 = ofcolor(x36, x37)
|
|
x39 = rbind(contained, x38)
|
|
x40 = compose(x39, last)
|
|
x41 = sfilter(x12, x40)
|
|
x42 = paint(x36, x41)
|
|
return x42
|
|
|
|
|
|
def verify_6f8cd79b(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = fill(I, EIGHT, x1)
|
|
return x2
|
|
|
|
|
|
def verify_6fa7a44f(I: Grid) -> Grid:
|
|
x0 = hmirror(I)
|
|
x1 = vconcat(I, x0)
|
|
return x1
|
|
|
|
|
|
def verify_72322fa7(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = matcher(numcolors, TWO)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = apply(normalize, x2)
|
|
x4 = chain(first, totuple, palette)
|
|
x5 = chain(last, totuple, palette)
|
|
x6 = lbind(matcher, first)
|
|
x7 = compose(x6, x4)
|
|
x8 = lbind(matcher, first)
|
|
x9 = compose(x8, x5)
|
|
x10 = fork(sfilter, identity, x7)
|
|
x11 = fork(sfilter, identity, x9)
|
|
x12 = lbind(occurrences, I)
|
|
x13 = chain(invert, ulcorner, x10)
|
|
x14 = chain(invert, ulcorner, x11)
|
|
x15 = lbind(lbind, shift)
|
|
x16 = fork(shift, identity, x13)
|
|
x17 = fork(shift, identity, x14)
|
|
x18 = compose(x15, x16)
|
|
x19 = compose(x12, x10)
|
|
x20 = fork(mapply, x18, x19)
|
|
x21 = compose(x15, x17)
|
|
x22 = compose(x12, x11)
|
|
x23 = fork(mapply, x21, x22)
|
|
x24 = fork(combine, x20, x23)
|
|
x25 = mapply(x24, x3)
|
|
x26 = paint(I, x25)
|
|
return x26
|
|
|
|
|
|
def verify_72ca375d(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = fork(equality, identity, vmirror)
|
|
x2 = extract(x0, x1)
|
|
x3 = subgrid(x2, I)
|
|
return x3
|
|
|
|
|
|
def verify_73251a56(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = asindices(I)
|
|
x2 = urcorner(x1)
|
|
x3 = index(I, ORIGIN)
|
|
x4 = shoot(ORIGIN, UNITY)
|
|
x5 = recolor(x3, x4)
|
|
x6 = index(I, x2)
|
|
x7 = shoot(x2, DOWN_LEFT)
|
|
x8 = recolor(x6, x7)
|
|
x9 = astuple(dmirror, x5)
|
|
x10 = astuple(cmirror, x8)
|
|
x11 = initset(x10)
|
|
x12 = insert(x9, x11)
|
|
x13 = product(x0, x12)
|
|
x14 = asobject(I)
|
|
x15 = lbind(sfilter, x14)
|
|
x16 = lbind(compose, flip)
|
|
x17 = lbind(matcher, first)
|
|
x18 = chain(x15, x16, x17)
|
|
x19 = lbind(paint, I)
|
|
x20 = compose(last, last)
|
|
x21 = compose(first, last)
|
|
x22 = lbind(fork, equality)
|
|
x23 = rbind(x22, identity)
|
|
x24 = compose(x18, first)
|
|
x25 = compose(x23, x21)
|
|
x26 = compose(initset, x21)
|
|
x27 = fork(rapply, x26, x24)
|
|
x28 = compose(first, x27)
|
|
x29 = compose(x19, x28)
|
|
x30 = fork(paint, x29, x20)
|
|
x31 = compose(initset, x25)
|
|
x32 = fork(rapply, x31, x30)
|
|
x33 = compose(first, x32)
|
|
x34 = sfilter(x13, x33)
|
|
x35 = lbind(colorcount, I)
|
|
x36 = compose(x35, first)
|
|
x37 = argmin(x34, x36)
|
|
x38 = first(x37)
|
|
x39 = last(x37)
|
|
x40 = first(x39)
|
|
x41 = last(x37)
|
|
x42 = last(x41)
|
|
x43 = x18(x38)
|
|
x44 = x40(x43)
|
|
x45 = paint(I, x44)
|
|
x46 = paint(x45, x42)
|
|
x47 = ofcolor(x46, x38)
|
|
x48 = mapply(dneighbors, x47)
|
|
x49 = difference(x48, x47)
|
|
x50 = toobject(x49, x46)
|
|
x51 = size(x50)
|
|
x52 = positive(x51)
|
|
x53 = rbind(astuple, x38)
|
|
x54 = compose(last, x53)
|
|
x55 = branch(x52, mostcolor, x54)
|
|
x56 = x55(x50)
|
|
x57 = replace(x46, x38, x56)
|
|
return x57
|
|
|
|
|
|
def verify_7447852a(I: Grid) -> Grid:
|
|
x0 = index(I, ORIGIN)
|
|
x1 = shape(I)
|
|
x2 = canvas(x0, x1)
|
|
x3 = hconcat(I, x2)
|
|
x4 = objects(x3, F, F, T)
|
|
x5 = compose(last, centerofmass)
|
|
x6 = order(x4, x5)
|
|
x7 = size(x6)
|
|
x8 = interval(ZERO, x7, ONE)
|
|
x9 = pair(x6, x8)
|
|
x10 = rbind(multiply, THREE)
|
|
x11 = rbind(divide, THREE)
|
|
x12 = chain(x10, x11, last)
|
|
x13 = fork(equality, last, x12)
|
|
x14 = sfilter(x9, x13)
|
|
x15 = mapply(first, x14)
|
|
x16 = fill(I, FOUR, x15)
|
|
return x16
|
|
|
|
|
|
def verify_7468f01a(I: Grid) -> Grid:
|
|
x0 = compress(I)
|
|
x1 = vmirror(x0)
|
|
return x1
|
|
|
|
|
|
def verify_746b3537(I: Grid) -> Grid:
|
|
x0 = first(I)
|
|
x1 = dedupe(x0)
|
|
x2 = size(x1)
|
|
x3 = equality(ONE, x2)
|
|
x4 = branch(x3, dmirror, identity)
|
|
x5 = x4(I)
|
|
x6 = objects(x5, T, F, F)
|
|
x7 = order(x6, leftmost)
|
|
x8 = apply(color, x7)
|
|
x9 = repeat(x8, ONE)
|
|
x10 = x4(x9)
|
|
return x10
|
|
|
|
|
|
def verify_74dd1130(I: Grid) -> Grid:
|
|
x0 = dmirror(I)
|
|
return x0
|
|
|
|
|
|
def verify_75b8110e(I: Grid) -> Grid:
|
|
x0 = tophalf(I)
|
|
x1 = lefthalf(x0)
|
|
x2 = tophalf(I)
|
|
x3 = righthalf(x2)
|
|
x4 = bottomhalf(I)
|
|
x5 = righthalf(x4)
|
|
x6 = bottomhalf(I)
|
|
x7 = lefthalf(x6)
|
|
x8 = palette(x1)
|
|
x9 = palette(x3)
|
|
x10 = intersection(x8, x9)
|
|
x11 = palette(x5)
|
|
x12 = palette(x7)
|
|
x13 = intersection(x11, x12)
|
|
x14 = intersection(x10, x13)
|
|
x15 = first(x14)
|
|
x16 = shape(x1)
|
|
x17 = canvas(x15, x16)
|
|
x18 = matcher(first, x15)
|
|
x19 = compose(flip, x18)
|
|
x20 = rbind(sfilter, x19)
|
|
x21 = compose(x20, asobject)
|
|
x22 = x21(x1)
|
|
x23 = x21(x5)
|
|
x24 = x21(x7)
|
|
x25 = x21(x3)
|
|
x26 = paint(x17, x22)
|
|
x27 = paint(x26, x23)
|
|
x28 = paint(x27, x24)
|
|
x29 = paint(x28, x25)
|
|
return x29
|
|
|
|
|
|
def verify_760b3cac(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = matcher(shape, THREE_BY_THREE)
|
|
x2 = matcher(size, FIVE)
|
|
x3 = fork(intersection, toindices, box)
|
|
x4 = compose(size, x3)
|
|
x5 = matcher(x4, FOUR)
|
|
x6 = fork(intersection, toindices, corners)
|
|
x7 = compose(size, x6)
|
|
x8 = matcher(x7, ONE)
|
|
x9 = fork(both, x1, x2)
|
|
x10 = fork(both, x5, x8)
|
|
x11 = fork(both, x9, x10)
|
|
x12 = extract(x0, x11)
|
|
x13 = toindices(x12)
|
|
x14 = lowermost(x12)
|
|
x15 = matcher(first, x14)
|
|
x16 = uppermost(x12)
|
|
x17 = matcher(first, x16)
|
|
x18 = rightmost(x12)
|
|
x19 = matcher(last, x18)
|
|
x20 = leftmost(x12)
|
|
x21 = matcher(last, x20)
|
|
x22 = sfilter(x13, x15)
|
|
x23 = size(x22)
|
|
x24 = equality(x23, TWO)
|
|
x25 = sfilter(x13, x17)
|
|
x26 = size(x25)
|
|
x27 = equality(x26, TWO)
|
|
x28 = sfilter(x13, x19)
|
|
x29 = size(x28)
|
|
x30 = equality(x29, TWO)
|
|
x31 = sfilter(x13, x21)
|
|
x32 = size(x31)
|
|
x33 = equality(x32, TWO)
|
|
x34 = either(x24, x27)
|
|
x35 = branch(x34, hmirror, vmirror)
|
|
x36 = multiply(x24, DOWN)
|
|
x37 = multiply(x27, UP)
|
|
x38 = add(x36, x37)
|
|
x39 = multiply(x30, RIGHT)
|
|
x40 = multiply(x33, LEFT)
|
|
x41 = add(x39, x40)
|
|
x42 = add(x38, x41)
|
|
x43 = other(x0, x12)
|
|
x44 = x35(x43)
|
|
x45 = shape(x43)
|
|
x46 = multiply(x45, x42)
|
|
x47 = shift(x44, x46)
|
|
x48 = paint(I, x47)
|
|
return x48
|
|
|
|
|
|
def verify_776ffc46(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = fork(equality, toindices, box)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = argmax(x2, x3)
|
|
x5 = mostcolor(I)
|
|
x6 = inbox(x4)
|
|
x7 = backdrop(x6)
|
|
x8 = toobject(x7, I)
|
|
x9 = matcher(first, x5)
|
|
x10 = compose(flip, x9)
|
|
x11 = sfilter(x8, x10)
|
|
x12 = normalize(x11)
|
|
x13 = color(x12)
|
|
x14 = toindices(x12)
|
|
x15 = compose(toindices, normalize)
|
|
x16 = matcher(x15, x14)
|
|
x17 = mfilter(x0, x16)
|
|
x18 = fill(I, x13, x17)
|
|
return x18
|
|
|
|
|
|
def verify_77fdfe62(I: Grid) -> Grid:
|
|
x0 = trim(I)
|
|
x1 = trim(x0)
|
|
x2 = tophalf(x1)
|
|
x3 = lefthalf(x2)
|
|
x4 = tophalf(x1)
|
|
x5 = righthalf(x4)
|
|
x6 = bottomhalf(x1)
|
|
x7 = lefthalf(x6)
|
|
x8 = bottomhalf(x1)
|
|
x9 = righthalf(x8)
|
|
x10 = index(I, ORIGIN)
|
|
x11 = width(I)
|
|
x12 = decrement(x11)
|
|
x13 = tojvec(x12)
|
|
x14 = index(I, x13)
|
|
x15 = height(I)
|
|
x16 = decrement(x15)
|
|
x17 = toivec(x16)
|
|
x18 = index(I, x17)
|
|
x19 = shape(I)
|
|
x20 = decrement(x19)
|
|
x21 = index(I, x20)
|
|
x22 = compress(I)
|
|
x23 = asindices(x22)
|
|
x24 = box(x23)
|
|
x25 = corners(x23)
|
|
x26 = difference(x24, x25)
|
|
x27 = toobject(x26, x22)
|
|
x28 = color(x27)
|
|
x29 = palette(x1)
|
|
x30 = other(x29, x28)
|
|
x31 = replace(x3, x30, x10)
|
|
x32 = replace(x5, x30, x14)
|
|
x33 = replace(x7, x30, x18)
|
|
x34 = replace(x9, x30, x21)
|
|
x35 = hconcat(x31, x32)
|
|
x36 = hconcat(x33, x34)
|
|
x37 = vconcat(x35, x36)
|
|
return x37
|
|
|
|
|
|
def verify_780d0b14(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = merge(x0)
|
|
x4 = fill(I, NEG_ONE, x3)
|
|
x5 = shape(I)
|
|
x6 = canvas(NEG_ONE, x5)
|
|
x7 = hconcat(x4, x6)
|
|
x8 = objects(x7, F, F, T)
|
|
x9 = rbind(other, x2)
|
|
x10 = compose(x9, palette)
|
|
x11 = fork(astuple, x10, ulcorner)
|
|
x12 = apply(x11, x8)
|
|
x13 = merge(x8)
|
|
x14 = fill(I, x2, x13)
|
|
x15 = paint(x14, x12)
|
|
x16 = compress(x15)
|
|
return x16
|
|
|
|
|
|
def verify_7837ac64(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = argmax(x2, x3)
|
|
x5 = color(x4)
|
|
x6 = palette(I)
|
|
x7 = remove(x5, x6)
|
|
x8 = lbind(colorcount, I)
|
|
x9 = argmax(x7, x8)
|
|
x10 = remove(x9, x7)
|
|
x11 = lbind(ofcolor, I)
|
|
x12 = mapply(x11, x10)
|
|
x13 = subgrid(x12, I)
|
|
x14 = objects(x13, T, F, F)
|
|
x15 = colorfilter(x14, x5)
|
|
x16 = initset(x9)
|
|
x17 = insert(x5, x16)
|
|
x18 = lbind(intersection, x17)
|
|
x19 = chain(positive, size, x18)
|
|
x20 = chain(positive, decrement, size)
|
|
x21 = fork(either, x19, x20)
|
|
x22 = rbind(toobject, x13)
|
|
x23 = compose(corners, outbox)
|
|
x24 = chain(palette, x22, x23)
|
|
x25 = rbind(branch, x5)
|
|
x26 = chain(flip, x21, x24)
|
|
x27 = compose(first, x24)
|
|
x28 = fork(x25, x26, x27)
|
|
x29 = apply(uppermost, x15)
|
|
x30 = order(x29, identity)
|
|
x31 = lbind(apply, x28)
|
|
x32 = rbind(order, leftmost)
|
|
x33 = lbind(sfilter, x15)
|
|
x34 = lbind(matcher, uppermost)
|
|
x35 = compose(x33, x34)
|
|
x36 = chain(x31, x32, x35)
|
|
x37 = apply(x36, x30)
|
|
return x37
|
|
|
|
|
|
def verify_794b24be(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = remove(ONE, x0)
|
|
x2 = lbind(colorcount, I)
|
|
x3 = argmax(x1, x2)
|
|
x4 = canvas(x3, THREE_BY_THREE)
|
|
x5 = colorcount(I, ONE)
|
|
x6 = decrement(x5)
|
|
x7 = tojvec(x6)
|
|
x8 = connect(ORIGIN, x7)
|
|
x9 = fill(x4, TWO, x8)
|
|
x10 = initset(UNITY)
|
|
x11 = equality(x5, FOUR)
|
|
x12 = branch(x11, x10, x8)
|
|
x13 = fill(x9, TWO, x12)
|
|
return x13
|
|
|
|
|
|
def verify_7b6016b9(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = asindices(I)
|
|
x2 = box(x1)
|
|
x3 = toobject(x2, I)
|
|
x4 = mostcolor(x3)
|
|
x5 = colorfilter(x0, x4)
|
|
x6 = rbind(bordering, I)
|
|
x7 = compose(flip, x6)
|
|
x8 = mfilter(x5, x7)
|
|
x9 = fill(I, TWO, x8)
|
|
x10 = replace(x9, x4, THREE)
|
|
return x10
|
|
|
|
|
|
def verify_7b7f7511(I: Grid) -> Grid:
|
|
x0 = lefthalf(I)
|
|
x1 = righthalf(I)
|
|
x2 = equality(x0, x1)
|
|
x3 = branch(x2, lefthalf, tophalf)
|
|
x4 = x3(I)
|
|
return x4
|
|
|
|
|
|
def verify_7c008303(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(x2, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = objects(x5, F, F, T)
|
|
x7 = argmin(x6, size)
|
|
x8 = argmax(x6, size)
|
|
x9 = remove(x8, x6)
|
|
x10 = remove(x7, x9)
|
|
x11 = merge(x10)
|
|
x12 = color(x11)
|
|
x13 = subgrid(x8, I)
|
|
x14 = subgrid(x7, I)
|
|
x15 = width(x8)
|
|
x16 = halve(x15)
|
|
x17 = hupscale(x14, x16)
|
|
x18 = height(x8)
|
|
x19 = halve(x18)
|
|
x20 = vupscale(x17, x19)
|
|
x21 = asobject(x20)
|
|
x22 = asindices(x13)
|
|
x23 = ofcolor(x13, x12)
|
|
x24 = difference(x22, x23)
|
|
x25 = rbind(contained, x24)
|
|
x26 = compose(x25, last)
|
|
x27 = sfilter(x21, x26)
|
|
x28 = paint(x13, x27)
|
|
return x28
|
|
|
|
|
|
def verify_7ddcd7ec(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = argmax(x0, size)
|
|
x2 = remove(x1, x0)
|
|
x3 = lbind(position, x1)
|
|
x4 = fork(shoot, center, x3)
|
|
x5 = fork(recolor, color, x4)
|
|
x6 = mapply(x5, x2)
|
|
x7 = paint(I, x6)
|
|
return x7
|
|
|
|
|
|
def verify_7df24a62(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = compose(maximum, shape)
|
|
x2 = argmin(x0, x1)
|
|
x3 = color(x2)
|
|
x4 = palette(I)
|
|
x5 = remove(x3, x4)
|
|
x6 = lbind(colorcount, I)
|
|
x7 = argmin(x5, x6)
|
|
x8 = mostcolor(I)
|
|
x9 = shape(I)
|
|
x10 = increment(x9)
|
|
x11 = increment(x10)
|
|
x12 = canvas(x8, x11)
|
|
x13 = asobject(I)
|
|
x14 = shift(x13, UNITY)
|
|
x15 = paint(x12, x14)
|
|
x16 = repeat(identity, ONE)
|
|
x17 = astuple(cmirror, dmirror)
|
|
x18 = astuple(hmirror, vmirror)
|
|
x19 = combine(x17, x18)
|
|
x20 = combine(x16, x19)
|
|
x21 = fork(compose, first, last)
|
|
x22 = product(x20, x20)
|
|
x23 = apply(x21, x22)
|
|
x24 = ofcolor(x15, x3)
|
|
x25 = backdrop(x24)
|
|
x26 = toobject(x25, x15)
|
|
x27 = matcher(first, x7)
|
|
x28 = rbind(sfilter, x27)
|
|
x29 = matcher(first, x3)
|
|
x30 = rbind(sfilter, x29)
|
|
x31 = lbind(recolor, x8)
|
|
x32 = compose(x31, x30)
|
|
x33 = fork(combine, x28, x32)
|
|
x34 = lbind(lbind, shift)
|
|
x35 = lbind(occurrences, x15)
|
|
x36 = compose(x35, x33)
|
|
x37 = fork(mapply, x34, x36)
|
|
x38 = lbind(chain, x37)
|
|
x39 = lbind(x38, normalize)
|
|
x40 = rbind(rapply, x26)
|
|
x41 = initset(x39)
|
|
x42 = lbind(rapply, x41)
|
|
x43 = chain(first, x40, x42)
|
|
x44 = mapply(x43, x23)
|
|
x45 = paint(x15, x44)
|
|
x46 = trim(x45)
|
|
return x46
|
|
|
|
|
|
def verify_7e0986d6(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, F, T)
|
|
x2 = lbind(greater, THREE)
|
|
x3 = compose(x2, size)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = mapply(toindices, x4)
|
|
x6 = fill(I, x0, x5)
|
|
x7 = objects(x6, T, F, T)
|
|
x8 = fork(recolor, color, backdrop)
|
|
x9 = mapply(x8, x7)
|
|
x10 = paint(x6, x9)
|
|
return x10
|
|
|
|
|
|
def verify_7f4411dc(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = mostcommon(x2)
|
|
x4 = canvas(x3, TWO_BY_TWO)
|
|
x5 = asobject(x4)
|
|
x6 = palette(I)
|
|
x7 = matcher(identity, x3)
|
|
x8 = argmin(x6, x7)
|
|
x9 = shape(I)
|
|
x10 = canvas(x8, x9)
|
|
x11 = lbind(shift, x5)
|
|
x12 = occurrences(I, x5)
|
|
x13 = mapply(x11, x12)
|
|
x14 = paint(x10, x13)
|
|
return x14
|
|
|
|
|
|
def verify_7fe24cdd(I: Grid) -> Grid:
|
|
x0 = rot90(I)
|
|
x1 = rot180(I)
|
|
x2 = rot270(I)
|
|
x3 = hconcat(I, x0)
|
|
x4 = hconcat(x2, x1)
|
|
x5 = vconcat(x3, x4)
|
|
return x5
|
|
|
|
|
|
def verify_80af3007(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmin(x0, x1)
|
|
x3 = color(x2)
|
|
x4 = palette(I)
|
|
x5 = other(x4, x3)
|
|
x6 = subgrid(x2, I)
|
|
x7 = fork(multiply, identity, identity)
|
|
x8 = width(x6)
|
|
x9 = matcher(x7, x8)
|
|
x10 = fork(multiply, identity, identity)
|
|
x11 = height(x6)
|
|
x12 = matcher(x10, x11)
|
|
x13 = width(x6)
|
|
x14 = interval(ONE, x13, ONE)
|
|
x15 = extract(x14, x9)
|
|
x16 = height(x6)
|
|
x17 = interval(ONE, x16, ONE)
|
|
x18 = extract(x17, x12)
|
|
x19 = width(x6)
|
|
x20 = interval(ZERO, x19, ONE)
|
|
x21 = height(x6)
|
|
x22 = interval(ZERO, x21, ONE)
|
|
x23 = rbind(multiply, x15)
|
|
x24 = rbind(divide, x15)
|
|
x25 = compose(x23, x24)
|
|
x26 = fork(equality, identity, x25)
|
|
x27 = compose(x26, last)
|
|
x28 = rbind(multiply, x18)
|
|
x29 = rbind(divide, x18)
|
|
x30 = compose(x28, x29)
|
|
x31 = fork(equality, identity, x30)
|
|
x32 = compose(x31, last)
|
|
x33 = lbind(apply, first)
|
|
x34 = rbind(sfilter, x27)
|
|
x35 = rbind(pair, x20)
|
|
x36 = chain(x33, x34, x35)
|
|
x37 = pair(x6, x22)
|
|
x38 = sfilter(x37, x32)
|
|
x39 = apply(first, x38)
|
|
x40 = apply(x36, x39)
|
|
x41 = shape(x40)
|
|
x42 = multiply(x41, x41)
|
|
x43 = canvas(x5, x42)
|
|
x44 = ofcolor(x40, x3)
|
|
x45 = rbind(multiply, x41)
|
|
x46 = apply(x45, x44)
|
|
x47 = lbind(shift, x44)
|
|
x48 = mapply(x47, x46)
|
|
x49 = fill(x43, x3, x48)
|
|
return x49
|
|
|
|
|
|
def verify_810b9b61(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = rbind(greater, TWO)
|
|
x2 = chain(x1, minimum, shape)
|
|
x3 = fork(equality, toindices, box)
|
|
x4 = fork(both, x2, x3)
|
|
x5 = mfilter(x0, x4)
|
|
x6 = fill(I, THREE, x5)
|
|
return x6
|
|
|
|
|
|
def verify_82819916(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, identity, dmirror)
|
|
x5 = x4(I)
|
|
x6 = frontiers(I)
|
|
x7 = merge(x6)
|
|
x8 = mostcolor(x7)
|
|
x9 = matcher(identity, x8)
|
|
x10 = rbind(sfilter, x9)
|
|
x11 = compose(size, x10)
|
|
x12 = argmin(x5, x11)
|
|
x13 = repeat(x12, ONE)
|
|
x14 = asobject(x13)
|
|
x15 = palette(x14)
|
|
x16 = totuple(x15)
|
|
x17 = first(x16)
|
|
x18 = last(x16)
|
|
x19 = fgpartition(x5)
|
|
x20 = merge(x19)
|
|
x21 = toindices(x20)
|
|
x22 = apply(first, x21)
|
|
x23 = lbind(sfilter, x20)
|
|
x24 = compose(first, last)
|
|
x25 = lbind(matcher, x24)
|
|
x26 = compose(x23, x25)
|
|
x27 = apply(x26, x22)
|
|
x28 = lbind(shift, x14)
|
|
x29 = chain(x28, toivec, uppermost)
|
|
x30 = matcher(first, x17)
|
|
x31 = rbind(sfilter, x30)
|
|
x32 = rbind(compose, last)
|
|
x33 = lbind(rbind, contained)
|
|
x34 = chain(toindices, x31, x29)
|
|
x35 = chain(x32, x33, x34)
|
|
x36 = fork(sfilter, identity, x35)
|
|
x37 = compose(color, x36)
|
|
x38 = compose(x31, x29)
|
|
x39 = fork(recolor, x37, x38)
|
|
x40 = fork(other, palette, x37)
|
|
x41 = compose(x31, x29)
|
|
x42 = fork(difference, x29, x41)
|
|
x43 = fork(recolor, x40, x42)
|
|
x44 = fork(combine, x39, x43)
|
|
x45 = mapply(x44, x27)
|
|
x46 = paint(x5, x45)
|
|
x47 = x4(x46)
|
|
return x47
|
|
|
|
|
|
def verify_83302e8f(I: Grid) -> Grid:
|
|
x0 = index(I, ORIGIN)
|
|
x1 = objects(I, T, F, F)
|
|
x2 = fork(multiply, height, width)
|
|
x3 = fork(equality, size, x2)
|
|
x4 = chain(positive, decrement, size)
|
|
x5 = colorfilter(x1, x0)
|
|
x6 = fork(both, x3, x4)
|
|
x7 = sfilter(x5, x6)
|
|
x8 = merge(x7)
|
|
x9 = ofcolor(I, x0)
|
|
x10 = fill(I, FOUR, x9)
|
|
x11 = fill(x10, THREE, x8)
|
|
return x11
|
|
|
|
|
|
def verify_834ec97d(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = argmin(x0, size)
|
|
x2 = cover(I, x1)
|
|
x3 = shift(x1, DOWN)
|
|
x4 = paint(x2, x3)
|
|
x5 = leftmost(x1)
|
|
x6 = width(I)
|
|
x7 = interval(x5, x6, TWO)
|
|
x8 = leftmost(x1)
|
|
x9 = interval(x8, NEG_ONE, NEG_TWO)
|
|
x10 = combine(x7, x9)
|
|
x11 = rbind(shoot, UP)
|
|
x12 = uppermost(x1)
|
|
x13 = lbind(astuple, x12)
|
|
x14 = apply(x13, x10)
|
|
x15 = mapply(x11, x14)
|
|
x16 = fill(x4, FOUR, x15)
|
|
return x16
|
|
|
|
|
|
def verify_8403a5d5(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = argmin(x0, size)
|
|
x2 = color(x1)
|
|
x3 = leftmost(x1)
|
|
x4 = width(I)
|
|
x5 = interval(x3, x4, TWO)
|
|
x6 = apply(tojvec, x5)
|
|
x7 = mapply(vfrontier, x6)
|
|
x8 = fill(I, x2, x7)
|
|
x9 = increment(x3)
|
|
x10 = width(I)
|
|
x11 = interval(x9, x10, FOUR)
|
|
x12 = add(x3, THREE)
|
|
x13 = width(I)
|
|
x14 = interval(x12, x13, FOUR)
|
|
x15 = apply(tojvec, x11)
|
|
x16 = height(I)
|
|
x17 = decrement(x16)
|
|
x18 = lbind(astuple, x17)
|
|
x19 = apply(x18, x14)
|
|
x20 = combine(x15, x19)
|
|
x21 = fill(x8, FIVE, x20)
|
|
return x21
|
|
|
|
|
|
def verify_846bdb03(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(equality, corners, toindices)
|
|
x2 = extract(x0, x1)
|
|
x3 = subgrid(x2, I)
|
|
x4 = backdrop(x2)
|
|
x5 = cover(I, x4)
|
|
x6 = frontiers(x3)
|
|
x7 = sfilter(x6, hline)
|
|
x8 = size(x7)
|
|
x9 = positive(x8)
|
|
x10 = branch(x9, dmirror, identity)
|
|
x11 = x10(x3)
|
|
x12 = x10(x5)
|
|
x13 = fgpartition(x12)
|
|
x14 = merge(x13)
|
|
x15 = normalize(x14)
|
|
x16 = mostcolor(x12)
|
|
x17 = color(x2)
|
|
x18 = palette(x11)
|
|
x19 = remove(x17, x18)
|
|
x20 = remove(x16, x19)
|
|
x21 = first(x20)
|
|
x22 = last(x20)
|
|
x23 = ofcolor(x11, x22)
|
|
x24 = leftmost(x23)
|
|
x25 = ofcolor(x11, x21)
|
|
x26 = leftmost(x25)
|
|
x27 = greater(x24, x26)
|
|
x28 = ofcolor(x12, x22)
|
|
x29 = leftmost(x28)
|
|
x30 = ofcolor(x12, x21)
|
|
x31 = leftmost(x30)
|
|
x32 = greater(x29, x31)
|
|
x33 = equality(x27, x32)
|
|
x34 = branch(x33, identity, vmirror)
|
|
x35 = x34(x15)
|
|
x36 = shift(x35, UNITY)
|
|
x37 = paint(x11, x36)
|
|
x38 = x10(x37)
|
|
return x38
|
|
|
|
|
|
def verify_855e0971(I: Grid) -> Grid:
|
|
x0 = lbind(greater, THREE)
|
|
x1 = chain(x0, size, dedupe)
|
|
x2 = apply(x1, I)
|
|
x3 = contained(F, x2)
|
|
x4 = flip(x3)
|
|
x5 = branch(x4, identity, dmirror)
|
|
x6 = x5(I)
|
|
x7 = rbind(toobject, I)
|
|
x8 = chain(palette, x7, neighbors)
|
|
x9 = lbind(chain, flip)
|
|
x10 = rbind(x9, x8)
|
|
x11 = lbind(lbind, contained)
|
|
x12 = compose(x10, x11)
|
|
x13 = lbind(ofcolor, I)
|
|
x14 = fork(sfilter, x13, x12)
|
|
x15 = compose(size, x14)
|
|
x16 = palette(I)
|
|
x17 = argmax(x16, x15)
|
|
x18 = objects(x6, T, T, F)
|
|
x19 = colorfilter(x18, x17)
|
|
x20 = difference(x18, x19)
|
|
x21 = rbind(subgrid, x6)
|
|
x22 = order(x20, uppermost)
|
|
x23 = apply(x21, x22)
|
|
x24 = lbind(recolor, x17)
|
|
x25 = lbind(mapply, vfrontier)
|
|
x26 = rbind(ofcolor, x17)
|
|
x27 = chain(x24, x25, x26)
|
|
x28 = fork(paint, identity, x27)
|
|
x29 = mapply(x28, x23)
|
|
x30 = x5(x29)
|
|
return x30
|
|
|
|
|
|
def verify_85c4e7cd(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = shape(I)
|
|
x3 = minimum(x2)
|
|
x4 = halve(x3)
|
|
x5 = interval(ONE, x4, ONE)
|
|
x6 = lbind(power, inbox)
|
|
x7 = rbind(rapply, x1)
|
|
x8 = compose(initset, x6)
|
|
x9 = chain(first, x7, x8)
|
|
x10 = apply(x9, x5)
|
|
x11 = repeat(x1, ONE)
|
|
x12 = combine(x11, x10)
|
|
x13 = rbind(toobject, I)
|
|
x14 = compose(color, x13)
|
|
x15 = apply(x14, x12)
|
|
x16 = interval(ZERO, x4, ONE)
|
|
x17 = pair(x16, x15)
|
|
x18 = compose(invert, first)
|
|
x19 = order(x17, x18)
|
|
x20 = apply(last, x19)
|
|
x21 = mpapply(recolor, x20, x12)
|
|
x22 = paint(I, x21)
|
|
return x22
|
|
|
|
|
|
def verify_868de0fa(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = sfilter(x0, square)
|
|
x2 = compose(even, height)
|
|
x3 = sfilter(x1, x2)
|
|
x4 = difference(x1, x3)
|
|
x5 = merge(x3)
|
|
x6 = merge(x4)
|
|
x7 = fill(I, TWO, x5)
|
|
x8 = fill(x7, SEVEN, x6)
|
|
return x8
|
|
|
|
|
|
def verify_8731374e(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = argmax(x0, size)
|
|
x2 = color(x1)
|
|
x3 = subgrid(x1, I)
|
|
x4 = lbind(insert, DOWN)
|
|
x5 = compose(lrcorner, asindices)
|
|
x6 = chain(x4, initset, x5)
|
|
x7 = fork(subgrid, x6, identity)
|
|
x8 = matcher(identity, x2)
|
|
x9 = rbind(subtract, TWO)
|
|
x10 = rbind(sfilter, x8)
|
|
x11 = compose(x9, width)
|
|
x12 = chain(size, x10, first)
|
|
x13 = fork(greater, x11, x12)
|
|
x14 = rbind(branch, identity)
|
|
x15 = rbind(x14, x7)
|
|
x16 = chain(initset, x15, x13)
|
|
x17 = fork(rapply, x16, identity)
|
|
x18 = compose(first, x17)
|
|
x19 = compose(x18, rot90)
|
|
x20 = double(EIGHT)
|
|
x21 = double(x20)
|
|
x22 = power(x19, x21)
|
|
x23 = x22(x3)
|
|
x24 = leastcolor(x23)
|
|
x25 = ofcolor(x23, x24)
|
|
x26 = fork(combine, vfrontier, hfrontier)
|
|
x27 = mapply(x26, x25)
|
|
x28 = fill(x23, x24, x27)
|
|
return x28
|
|
|
|
|
|
def verify_88a10436(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = argmax(x0, size)
|
|
x2 = normalize(x1)
|
|
x3 = shape(x1)
|
|
x4 = halve(x3)
|
|
x5 = invert(x4)
|
|
x6 = shift(x2, x5)
|
|
x7 = sizefilter(x0, ONE)
|
|
x8 = apply(center, x7)
|
|
x9 = lbind(shift, x6)
|
|
x10 = mapply(x9, x8)
|
|
x11 = paint(I, x10)
|
|
return x11
|
|
|
|
|
|
def verify_88a62173(I: Grid) -> Grid:
|
|
x0 = lefthalf(I)
|
|
x1 = righthalf(I)
|
|
x2 = tophalf(x0)
|
|
x3 = tophalf(x1)
|
|
x4 = bottomhalf(x0)
|
|
x5 = bottomhalf(x1)
|
|
x6 = astuple(x2, x3)
|
|
x7 = astuple(x4, x5)
|
|
x8 = combine(x6, x7)
|
|
x9 = leastcommon(x8)
|
|
return x9
|
|
|
|
|
|
def verify_890034e9(I: Grid) -> Grid:
|
|
x0 = rbind(greater, TWO)
|
|
x1 = chain(x0, minimum, shape)
|
|
x2 = objects(I, T, F, F)
|
|
x3 = sfilter(x2, x1)
|
|
x4 = fork(equality, toindices, box)
|
|
x5 = sfilter(x3, x4)
|
|
x6 = totuple(x5)
|
|
x7 = apply(color, x6)
|
|
x8 = leastcommon(x7)
|
|
x9 = ofcolor(I, x8)
|
|
x10 = inbox(x9)
|
|
x11 = recolor(ZERO, x10)
|
|
x12 = occurrences(I, x11)
|
|
x13 = normalize(x9)
|
|
x14 = shift(x13, NEG_UNITY)
|
|
x15 = lbind(shift, x14)
|
|
x16 = mapply(x15, x12)
|
|
x17 = fill(I, x8, x16)
|
|
return x17
|
|
|
|
|
|
def verify_8a004b2b(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(equality, toindices, corners)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = argmax(x2, size)
|
|
x4 = fgpartition(I)
|
|
x5 = merge(x4)
|
|
x6 = backdrop(x3)
|
|
x7 = toobject(x6, I)
|
|
x8 = difference(x5, x7)
|
|
x9 = mostcolor(I)
|
|
x10 = inbox(x3)
|
|
x11 = backdrop(x10)
|
|
x12 = toobject(x11, I)
|
|
x13 = matcher(first, x9)
|
|
x14 = compose(flip, x13)
|
|
x15 = sfilter(x12, x14)
|
|
x16 = subgrid(x8, I)
|
|
x17 = palette(x15)
|
|
x18 = order(x17, identity)
|
|
x19 = lbind(colorcount, x15)
|
|
x20 = apply(x19, x18)
|
|
x21 = lbind(colorcount, x8)
|
|
x22 = apply(x21, x18)
|
|
x23 = pair(x20, x22)
|
|
x24 = fork(divide, first, last)
|
|
x25 = apply(x24, x23)
|
|
x26 = mostcommon(x25)
|
|
x27 = lbind(colorcount, x15)
|
|
x28 = lbind(colorcount, x8)
|
|
x29 = fork(divide, x27, x28)
|
|
x30 = matcher(x29, x26)
|
|
x31 = palette(x8)
|
|
x32 = sfilter(x31, x30)
|
|
x33 = rbind(contained, x32)
|
|
x34 = compose(x33, first)
|
|
x35 = sfilter(x15, x34)
|
|
x36 = sfilter(x8, x34)
|
|
x37 = height(x35)
|
|
x38 = height(x36)
|
|
x39 = divide(x37, x38)
|
|
x40 = width(x35)
|
|
x41 = width(x36)
|
|
x42 = divide(x40, x41)
|
|
x43 = vupscale(x16, x39)
|
|
x44 = hupscale(x43, x42)
|
|
x45 = asobject(x44)
|
|
x46 = matcher(first, x9)
|
|
x47 = compose(flip, x46)
|
|
x48 = sfilter(x45, x47)
|
|
x49 = ulcorner(x15)
|
|
x50 = sfilter(x48, x34)
|
|
x51 = ulcorner(x50)
|
|
x52 = subtract(x49, x51)
|
|
x53 = shift(x48, x52)
|
|
x54 = paint(I, x53)
|
|
x55 = subgrid(x3, x54)
|
|
return x55
|
|
|
|
|
|
def verify_8be77c9e(I: Grid) -> Grid:
|
|
x0 = hmirror(I)
|
|
x1 = vconcat(I, x0)
|
|
return x1
|
|
|
|
|
|
def verify_8d5021e8(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(x0, I)
|
|
x2 = hmirror(x1)
|
|
x3 = vconcat(x1, x2)
|
|
x4 = vconcat(x3, x1)
|
|
x5 = hmirror(x4)
|
|
return x5
|
|
|
|
|
|
def verify_8d510a79(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = leastcommon(x2)
|
|
x4 = frontiers(I)
|
|
x5 = colorfilter(x4, x3)
|
|
x6 = size(x5)
|
|
x7 = positive(x6)
|
|
x8 = branch(x7, dmirror, identity)
|
|
x9 = ofcolor(I, x3)
|
|
x10 = ofcolor(I, TWO)
|
|
x11 = ofcolor(I, ONE)
|
|
x12 = rbind(gravitate, x9)
|
|
x13 = compose(x12, initset)
|
|
x14 = fork(add, identity, x13)
|
|
x15 = fork(connect, identity, x14)
|
|
x16 = shape(I)
|
|
x17 = maximum(x16)
|
|
x18 = lbind(multiply, x17)
|
|
x19 = lbind(gravitate, x9)
|
|
x20 = chain(x18, sign, x19)
|
|
x21 = compose(x20, initset)
|
|
x22 = fork(add, identity, x21)
|
|
x23 = fork(connect, identity, x22)
|
|
x24 = mapply(x15, x10)
|
|
x25 = mapply(x23, x11)
|
|
x26 = fill(I, TWO, x24)
|
|
x27 = fill(x26, ONE, x25)
|
|
return x27
|
|
|
|
|
|
def verify_8e1813be(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = matcher(height, ONE)
|
|
x2 = matcher(width, ONE)
|
|
x3 = fork(either, x1, x2)
|
|
x4 = sfilter(x0, x3)
|
|
x5 = matcher(height, ONE)
|
|
x6 = sfilter(x4, x5)
|
|
x7 = size(x6)
|
|
x8 = matcher(width, ONE)
|
|
x9 = sfilter(x4, x8)
|
|
x10 = size(x9)
|
|
x11 = greater(x7, x10)
|
|
x12 = branch(x11, dmirror, identity)
|
|
x13 = branch(x11, uppermost, leftmost)
|
|
x14 = order(x4, x13)
|
|
x15 = apply(color, x14)
|
|
x16 = size(x4)
|
|
x17 = repeat(x15, x16)
|
|
x18 = x12(x17)
|
|
return x18
|
|
|
|
|
|
def verify_8e5a5113(I: Grid) -> Grid:
|
|
x0 = portrait(I)
|
|
x1 = branch(x0, identity, rot90)
|
|
x2 = branch(x0, identity, rot270)
|
|
x3 = x1(I)
|
|
x4 = width(x3)
|
|
x5 = toivec(x4)
|
|
x6 = index(x3, x5)
|
|
x7 = shape(x3)
|
|
x8 = canvas(x6, x7)
|
|
x9 = hconcat(x3, x8)
|
|
x10 = objects(x9, F, T, T)
|
|
x11 = argmax(x10, numcolors)
|
|
x12 = subgrid(x11, x3)
|
|
x13 = interval(ONE, FOUR, ONE)
|
|
x14 = lbind(power, rot90)
|
|
x15 = lbind(power, rot270)
|
|
x16 = rbind(rapply, x12)
|
|
x17 = compose(initset, x14)
|
|
x18 = chain(first, x16, x17)
|
|
x19 = rbind(rapply, x12)
|
|
x20 = compose(initset, x15)
|
|
x21 = chain(first, x19, x20)
|
|
x22 = compose(asobject, x18)
|
|
x23 = uppermost(x11)
|
|
x24 = lbind(add, x23)
|
|
x25 = height(x11)
|
|
x26 = increment(x25)
|
|
x27 = lbind(multiply, x26)
|
|
x28 = chain(toivec, x24, x27)
|
|
x29 = fork(shift, x22, x28)
|
|
x30 = compose(asobject, x21)
|
|
x31 = uppermost(x11)
|
|
x32 = lbind(subtract, x31)
|
|
x33 = height(x11)
|
|
x34 = increment(x33)
|
|
x35 = lbind(multiply, x34)
|
|
x36 = chain(toivec, x32, x35)
|
|
x37 = fork(shift, x30, x36)
|
|
x38 = fork(combine, x29, x37)
|
|
x39 = mapply(x38, x13)
|
|
x40 = paint(x3, x39)
|
|
x41 = x2(x40)
|
|
return x41
|
|
|
|
|
|
def verify_8eb1be9a(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = height(x1)
|
|
x3 = height(I)
|
|
x4 = interval(ZERO, x3, x2)
|
|
x5 = lbind(shift, x1)
|
|
x6 = compose(x5, toivec)
|
|
x7 = compose(x6, invert)
|
|
x8 = fork(combine, x6, x7)
|
|
x9 = mapply(x8, x4)
|
|
x10 = paint(I, x9)
|
|
return x10
|
|
|
|
|
|
def verify_8efcae92(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = remove(x2, x0)
|
|
x4 = lbind(chain, positive)
|
|
x5 = lbind(x4, size)
|
|
x6 = rbind(compose, backdrop)
|
|
x7 = lbind(lbind, intersection)
|
|
x8 = chain(x5, x6, x7)
|
|
x9 = chain(x8, backdrop, outbox)
|
|
x10 = lbind(sfilter, x3)
|
|
x11 = compose(x10, x9)
|
|
x12 = chain(positive, size, x11)
|
|
x13 = sfilter(x3, x12)
|
|
x14 = compose(merge, x11)
|
|
x15 = apply(x14, x13)
|
|
x16 = rbind(subgrid, I)
|
|
x17 = apply(x16, x15)
|
|
x18 = merge(x15)
|
|
x19 = palette(x18)
|
|
x20 = lbind(colorcount, x18)
|
|
x21 = argmin(x19, x20)
|
|
x22 = rbind(colorcount, x21)
|
|
x23 = argmax(x17, x22)
|
|
return x23
|
|
|
|
|
|
def verify_8f2ea7aa(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = normalize(x1)
|
|
x3 = mostcolor(I)
|
|
x4 = shape(x2)
|
|
x5 = multiply(x4, x4)
|
|
x6 = canvas(x3, x5)
|
|
x7 = shape(x2)
|
|
x8 = rbind(multiply, x7)
|
|
x9 = toindices(x2)
|
|
x10 = apply(x8, x9)
|
|
x11 = lbind(shift, x2)
|
|
x12 = mapply(x11, x10)
|
|
x13 = paint(x6, x12)
|
|
return x13
|
|
|
|
|
|
def verify_90c28cc7(I: Grid) -> Grid:
|
|
x0 = matcher(identity, ZERO)
|
|
x1 = compose(flip, x0)
|
|
x2 = rbind(sfilter, x1)
|
|
x3 = chain(positive, size, x2)
|
|
x4 = rbind(sfilter, x3)
|
|
x5 = compose(dmirror, x4)
|
|
x6 = power(x5, FOUR)
|
|
x7 = x6(I)
|
|
x8 = dedupe(x7)
|
|
x9 = dmirror(x8)
|
|
x10 = dedupe(x9)
|
|
x11 = dmirror(x10)
|
|
return x11
|
|
|
|
|
|
def verify_90f3ed37(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = apply(first, x1)
|
|
x3 = asindices(I)
|
|
x4 = apply(first, x3)
|
|
x5 = difference(x4, x2)
|
|
x6 = ofcolor(I, x0)
|
|
x7 = rbind(interval, ONE)
|
|
x8 = lbind(rbind, contained)
|
|
x9 = lbind(sfilter, x5)
|
|
x10 = rbind(matcher, ZERO)
|
|
x11 = chain(size, x9, x8)
|
|
x12 = lbind(sfilter, x6)
|
|
x13 = lbind(compose, x11)
|
|
x14 = chain(x12, x10, x13)
|
|
x15 = lbind(fork, x7)
|
|
x16 = compose(increment, minimum)
|
|
x17 = lbind(lbind, astuple)
|
|
x18 = lbind(chain, x16)
|
|
x19 = rbind(x18, first)
|
|
x20 = chain(x19, x17, first)
|
|
x21 = lbind(chain, maximum)
|
|
x22 = rbind(x21, first)
|
|
x23 = chain(x22, x17, first)
|
|
x24 = fork(x15, x20, x23)
|
|
x25 = compose(x14, x24)
|
|
x26 = apply(toivec, x2)
|
|
x27 = apply(x25, x26)
|
|
x28 = argmax(x27, width)
|
|
x29 = remove(x28, x27)
|
|
x30 = ulcorner(x28)
|
|
x31 = invert(x30)
|
|
x32 = shift(x28, x31)
|
|
x33 = asindices(I)
|
|
x34 = center(x33)
|
|
x35 = invert(x34)
|
|
x36 = shift(x33, x35)
|
|
x37 = width(I)
|
|
x38 = double(x37)
|
|
x39 = tojvec(x38)
|
|
x40 = rbind(apply, x36)
|
|
x41 = lbind(rbind, add)
|
|
x42 = chain(x40, x41, center)
|
|
x43 = compose(positive, size)
|
|
x44 = lbind(compose, size)
|
|
x45 = lbind(shift, x32)
|
|
x46 = rbind(compose, x45)
|
|
x47 = lbind(rbind, intersection)
|
|
x48 = compose(x46, x47)
|
|
x49 = lbind(compose, x43)
|
|
x50 = compose(x49, x48)
|
|
x51 = fork(sfilter, x42, x50)
|
|
x52 = compose(x44, x48)
|
|
x53 = fork(valmax, x51, x52)
|
|
x54 = compose(x44, x48)
|
|
x55 = fork(matcher, x54, x53)
|
|
x56 = fork(sfilter, x51, x55)
|
|
x57 = lbind(shift, x32)
|
|
x58 = lbind(insert, x39)
|
|
x59 = lbind(rbind, greater)
|
|
x60 = compose(x59, rightmost)
|
|
x61 = compose(leftmost, x58)
|
|
x62 = rbind(compose, x57)
|
|
x63 = lbind(rbind, difference)
|
|
x64 = compose(x62, x63)
|
|
x65 = lbind(compose, x61)
|
|
x66 = compose(x65, x64)
|
|
x67 = fork(compose, x60, x66)
|
|
x68 = fork(argmax, x56, x67)
|
|
x69 = lbind(shift, x32)
|
|
x70 = compose(x69, x68)
|
|
x71 = fork(difference, x70, identity)
|
|
x72 = mapply(x71, x29)
|
|
x73 = fill(I, ONE, x72)
|
|
return x73
|
|
|
|
|
|
def verify_913fb3ed(I: Grid) -> Grid:
|
|
x0 = lbind(ofcolor, I)
|
|
x1 = lbind(mapply, neighbors)
|
|
x2 = chain(x1, x0, last)
|
|
x3 = fork(recolor, first, x2)
|
|
x4 = astuple(SIX, THREE)
|
|
x5 = astuple(FOUR, EIGHT)
|
|
x6 = astuple(ONE, TWO)
|
|
x7 = initset(x4)
|
|
x8 = insert(x5, x7)
|
|
x9 = insert(x6, x8)
|
|
x10 = mapply(x3, x9)
|
|
x11 = paint(I, x10)
|
|
return x11
|
|
|
|
|
|
def verify_91413438(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = other(x0, ZERO)
|
|
x2 = colorcount(I, x1)
|
|
x3 = colorcount(I, ZERO)
|
|
x4 = dmirror(I)
|
|
x5 = repeat(x4, x2)
|
|
x6 = dmirror(I)
|
|
x7 = shape(x6)
|
|
x8 = canvas(ZERO, x7)
|
|
x9 = multiply(x3, x3)
|
|
x10 = subtract(x9, x2)
|
|
x11 = repeat(x8, x10)
|
|
x12 = combine(x5, x11)
|
|
x13 = merge(x12)
|
|
x14 = dmirror(x13)
|
|
x15 = hsplit(x14, x3)
|
|
x16 = merge(x15)
|
|
return x16
|
|
|
|
|
|
def verify_91714a58(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = asindices(I)
|
|
x2 = objects(I, T, F, T)
|
|
x3 = argmax(x2, size)
|
|
x4 = mostcolor(x3)
|
|
x5 = mostcolor(I)
|
|
x6 = canvas(x5, x0)
|
|
x7 = paint(x6, x3)
|
|
x8 = mostcolor(I)
|
|
x9 = color(x3)
|
|
x10 = astuple(x8, ORIGIN)
|
|
x11 = astuple(x9, RIGHT)
|
|
x12 = astuple(x8, ZERO_BY_TWO)
|
|
x13 = initset(x12)
|
|
x14 = insert(x11, x13)
|
|
x15 = insert(x10, x14)
|
|
x16 = dmirror(x15)
|
|
x17 = toindices(x15)
|
|
x18 = lbind(shift, x17)
|
|
x19 = occurrences(x7, x15)
|
|
x20 = mapply(x18, x19)
|
|
x21 = toindices(x16)
|
|
x22 = lbind(shift, x21)
|
|
x23 = occurrences(x7, x16)
|
|
x24 = mapply(x22, x23)
|
|
x25 = combine(x20, x24)
|
|
x26 = fill(x7, x8, x25)
|
|
return x26
|
|
|
|
|
|
def verify_9172f3a0(I: Grid) -> Grid:
|
|
x0 = upscale(I, THREE)
|
|
return x0
|
|
|
|
|
|
def verify_928ad970(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = leastcolor(I)
|
|
x3 = palette(I)
|
|
x4 = remove(x2, x3)
|
|
x5 = mostcolor(I)
|
|
x6 = other(x4, x5)
|
|
x7 = inbox(x1)
|
|
x8 = fill(I, x6, x7)
|
|
return x8
|
|
|
|
|
|
def verify_93b581b8(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = apply(toindices, x0)
|
|
x2 = lbind(index, I)
|
|
x3 = compose(x2, lrcorner)
|
|
x4 = astuple(NEG_TWO, NEG_TWO)
|
|
x5 = rbind(shift, x4)
|
|
x6 = fork(recolor, x3, x5)
|
|
x7 = compose(x2, ulcorner)
|
|
x8 = rbind(shift, TWO_BY_TWO)
|
|
x9 = fork(recolor, x7, x8)
|
|
x10 = compose(x2, llcorner)
|
|
x11 = astuple(NEG_TWO, TWO)
|
|
x12 = rbind(shift, x11)
|
|
x13 = fork(recolor, x10, x12)
|
|
x14 = compose(x2, urcorner)
|
|
x15 = astuple(TWO, NEG_TWO)
|
|
x16 = rbind(shift, x15)
|
|
x17 = fork(recolor, x14, x16)
|
|
x18 = fork(combine, x6, x9)
|
|
x19 = fork(combine, x13, x17)
|
|
x20 = fork(combine, x18, x19)
|
|
x21 = mapply(x20, x1)
|
|
x22 = paint(I, x21)
|
|
return x22
|
|
|
|
|
|
def verify_941d9a10(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = corners(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = objects(I, T, T, F)
|
|
x5 = colorfilter(x4, x3)
|
|
x6 = fork(add, leftmost, uppermost)
|
|
x7 = argmin(x5, x6)
|
|
x8 = argmax(x5, x6)
|
|
x9 = lbind(sfilter, x5)
|
|
x10 = rbind(compose, leftmost)
|
|
x11 = chain(size, x9, x10)
|
|
x12 = lbind(sfilter, x5)
|
|
x13 = rbind(compose, uppermost)
|
|
x14 = chain(size, x12, x13)
|
|
x15 = lbind(lbind, greater)
|
|
x16 = chain(x11, x15, leftmost)
|
|
x17 = lbind(rbind, greater)
|
|
x18 = chain(x11, x17, leftmost)
|
|
x19 = lbind(lbind, greater)
|
|
x20 = chain(x14, x19, uppermost)
|
|
x21 = lbind(rbind, greater)
|
|
x22 = chain(x14, x21, uppermost)
|
|
x23 = fork(equality, x16, x18)
|
|
x24 = fork(equality, x20, x22)
|
|
x25 = fork(both, x23, x24)
|
|
x26 = extract(x5, x25)
|
|
x27 = fill(I, ONE, x7)
|
|
x28 = fill(x27, THREE, x8)
|
|
x29 = fill(x28, TWO, x26)
|
|
return x29
|
|
|
|
|
|
def verify_94f9d214(I: Grid) -> Grid:
|
|
x0 = astuple(vsplit, hsplit)
|
|
x1 = rbind(rbind, TWO)
|
|
x2 = rbind(rapply, I)
|
|
x3 = initset(x1)
|
|
x4 = lbind(rapply, x3)
|
|
x5 = chain(first, x2, x4)
|
|
x6 = lbind(apply, numcolors)
|
|
x7 = compose(x6, x5)
|
|
x8 = matcher(x7, TWO_BY_TWO)
|
|
x9 = extract(x0, x8)
|
|
x10 = x9(I, TWO)
|
|
x11 = first(x10)
|
|
x12 = last(x10)
|
|
x13 = palette(x11)
|
|
x14 = palette(x12)
|
|
x15 = intersection(x13, x14)
|
|
x16 = first(x15)
|
|
x17 = shape(x11)
|
|
x18 = canvas(x16, x17)
|
|
x19 = ofcolor(x11, x16)
|
|
x20 = ofcolor(x12, x16)
|
|
x21 = intersection(x19, x20)
|
|
x22 = fill(x18, TWO, x21)
|
|
return x22
|
|
|
|
|
|
def verify_952a094c(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = inbox(x1)
|
|
x3 = cover(I, x2)
|
|
x4 = ulcorner(x2)
|
|
x5 = index(I, x4)
|
|
x6 = lrcorner(x1)
|
|
x7 = add(UNITY, x6)
|
|
x8 = initset(x7)
|
|
x9 = fill(x3, x5, x8)
|
|
x10 = lrcorner(x2)
|
|
x11 = index(I, x10)
|
|
x12 = ulcorner(x1)
|
|
x13 = add(NEG_UNITY, x12)
|
|
x14 = initset(x13)
|
|
x15 = fill(x9, x11, x14)
|
|
x16 = urcorner(x2)
|
|
x17 = index(I, x16)
|
|
x18 = llcorner(x1)
|
|
x19 = add(DOWN_LEFT, x18)
|
|
x20 = initset(x19)
|
|
x21 = fill(x15, x17, x20)
|
|
x22 = llcorner(x2)
|
|
x23 = index(I, x22)
|
|
x24 = urcorner(x1)
|
|
x25 = add(UP_RIGHT, x24)
|
|
x26 = initset(x25)
|
|
x27 = fill(x21, x23, x26)
|
|
return x27
|
|
|
|
|
|
def verify_9565186b(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = partition(I)
|
|
x2 = argmax(x1, size)
|
|
x3 = canvas(FIVE, x0)
|
|
x4 = paint(x3, x2)
|
|
return x4
|
|
|
|
|
|
def verify_95990924(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = apply(ulcorner, x0)
|
|
x2 = apply(urcorner, x0)
|
|
x3 = apply(llcorner, x0)
|
|
x4 = apply(lrcorner, x0)
|
|
x5 = shift(x1, NEG_UNITY)
|
|
x6 = shift(x2, UP_RIGHT)
|
|
x7 = shift(x3, DOWN_LEFT)
|
|
x8 = shift(x4, UNITY)
|
|
x9 = fill(I, ONE, x5)
|
|
x10 = fill(x9, TWO, x6)
|
|
x11 = fill(x10, THREE, x7)
|
|
x12 = fill(x11, FOUR, x8)
|
|
return x12
|
|
|
|
|
|
def verify_963e52fc(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = asobject(I)
|
|
x2 = hperiod(x1)
|
|
x3 = height(x1)
|
|
x4 = astuple(x3, x2)
|
|
x5 = ulcorner(x1)
|
|
x6 = crop(I, x5, x4)
|
|
x7 = rot90(x6)
|
|
x8 = double(x0)
|
|
x9 = divide(x8, x2)
|
|
x10 = increment(x9)
|
|
x11 = repeat(x7, x10)
|
|
x12 = merge(x11)
|
|
x13 = rot270(x12)
|
|
x14 = astuple(x3, x8)
|
|
x15 = crop(x13, ORIGIN, x14)
|
|
return x15
|
|
|
|
|
|
def verify_97999447(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = asobject(I)
|
|
x2 = matcher(first, x0)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = apply(initset, x4)
|
|
x6 = apply(toindices, x5)
|
|
x7 = rbind(shoot, RIGHT)
|
|
x8 = compose(x7, center)
|
|
x9 = fork(recolor, color, x8)
|
|
x10 = mapply(x9, x5)
|
|
x11 = paint(I, x10)
|
|
x12 = width(I)
|
|
x13 = interval(ZERO, x12, ONE)
|
|
x14 = apply(double, x13)
|
|
x15 = apply(increment, x14)
|
|
x16 = apply(tojvec, x15)
|
|
x17 = prapply(shift, x6, x16)
|
|
x18 = merge(x17)
|
|
x19 = fill(x11, FIVE, x18)
|
|
return x19
|
|
|
|
|
|
def verify_97a05b5b(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = matcher(numcolors, TWO)
|
|
x4 = fork(both, x2, x3)
|
|
x5 = sfilter(x0, x4)
|
|
x6 = difference(x0, x5)
|
|
x7 = merge(x6)
|
|
x8 = color(x7)
|
|
x9 = mostcolor(I)
|
|
x10 = subgrid(x7, I)
|
|
x11 = astuple(hmirror, vmirror)
|
|
x12 = astuple(cmirror, dmirror)
|
|
x13 = combine(x11, x12)
|
|
x14 = astuple(identity, rot180)
|
|
x15 = astuple(rot90, rot270)
|
|
x16 = combine(x14, x15)
|
|
x17 = combine(x16, x13)
|
|
x18 = lbind(canvas, NEG_ONE)
|
|
x19 = compose(x18, shape)
|
|
x20 = fork(paint, x19, normalize)
|
|
x21 = rbind(other, x8)
|
|
x22 = compose(x21, palette)
|
|
x23 = lbind(occurrences, x10)
|
|
x24 = chain(positive, size, x23)
|
|
x25 = compose(x24, asobject)
|
|
x26 = rbind(replace, x8)
|
|
x27 = rbind(replace, x9)
|
|
x28 = rbind(x27, x8)
|
|
x29 = compose(x28, x20)
|
|
x30 = fork(x26, x29, x22)
|
|
x31 = rbind(chain, initset)
|
|
x32 = compose(x25, first)
|
|
x33 = lbind(x31, x32)
|
|
x34 = lbind(rbind, rapply)
|
|
x35 = chain(x33, x34, x30)
|
|
x36 = lbind(occurrences, x10)
|
|
x37 = chain(first, x36, asobject)
|
|
x38 = lbind(argmax, x17)
|
|
x39 = compose(x38, x35)
|
|
x40 = compose(initset, x39)
|
|
x41 = fork(rapply, x40, x20)
|
|
x42 = compose(first, x41)
|
|
x43 = compose(initset, x39)
|
|
x44 = fork(rapply, x43, x30)
|
|
x45 = compose(first, x44)
|
|
x46 = compose(asobject, x42)
|
|
x47 = compose(x37, x45)
|
|
x48 = fork(shift, x46, x47)
|
|
x49 = mapply(x48, x5)
|
|
x50 = paint(x10, x49)
|
|
return x50
|
|
|
|
|
|
def verify_98cf29f8(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = shape(I)
|
|
x5 = add(TWO, x4)
|
|
x6 = canvas(x3, x5)
|
|
x7 = asobject(I)
|
|
x8 = shift(x7, UNITY)
|
|
x9 = paint(x6, x8)
|
|
x10 = palette(x9)
|
|
x11 = remove(x3, x10)
|
|
x12 = lbind(ofcolor, x9)
|
|
x13 = fork(recolor, identity, x12)
|
|
x14 = apply(x13, x11)
|
|
x15 = fork(equality, toindices, backdrop)
|
|
x16 = extract(x14, x15)
|
|
x17 = other(x14, x16)
|
|
x18 = color(x17)
|
|
x19 = astuple(x18, RIGHT)
|
|
x20 = initset(ZERO_BY_TWO)
|
|
x21 = insert(ORIGIN, x20)
|
|
x22 = recolor(x3, x21)
|
|
x23 = insert(x19, x22)
|
|
x24 = dmirror(x23)
|
|
x25 = lbind(shift, x23)
|
|
x26 = occurrences(x9, x23)
|
|
x27 = mapply(x25, x26)
|
|
x28 = lbind(shift, x24)
|
|
x29 = occurrences(x9, x24)
|
|
x30 = mapply(x28, x29)
|
|
x31 = combine(x27, x30)
|
|
x32 = fill(x9, x3, x31)
|
|
x33 = ofcolor(x32, x18)
|
|
x34 = gravitate(x33, x16)
|
|
x35 = replace(x9, x18, x3)
|
|
x36 = shift(x33, x34)
|
|
x37 = fill(x35, x18, x36)
|
|
x38 = trim(x37)
|
|
return x38
|
|
|
|
|
|
def verify_995c5fa3(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = increment(x0)
|
|
x2 = divide(x1, FIVE)
|
|
x3 = astuple(FOUR, FOUR)
|
|
x4 = canvas(NEG_ONE, x3)
|
|
x5 = asindices(x4)
|
|
x6 = rbind(toobject, I)
|
|
x7 = lbind(shift, x5)
|
|
x8 = compose(x6, x7)
|
|
x9 = multiply(x2, FIVE)
|
|
x10 = interval(ZERO, x9, FIVE)
|
|
x11 = apply(tojvec, x10)
|
|
x12 = apply(x8, x11)
|
|
x13 = matcher(numcolors, ONE)
|
|
x14 = fork(equality, identity, hmirror)
|
|
x15 = compose(flip, x14)
|
|
x16 = lbind(index, I)
|
|
x17 = compose(x16, ulcorner)
|
|
x18 = lbind(add, DOWN)
|
|
x19 = chain(x16, x18, ulcorner)
|
|
x20 = fork(equality, x17, x19)
|
|
x21 = compose(flip, x20)
|
|
x22 = fork(either, x13, x15)
|
|
x23 = fork(either, x22, x21)
|
|
x24 = compose(flip, x23)
|
|
x25 = lbind(multiply, TWO)
|
|
x26 = compose(x25, x13)
|
|
x27 = lbind(multiply, FOUR)
|
|
x28 = compose(x27, x15)
|
|
x29 = fork(add, x26, x28)
|
|
x30 = lbind(multiply, THREE)
|
|
x31 = compose(x30, x21)
|
|
x32 = lbind(multiply, EIGHT)
|
|
x33 = compose(x32, x24)
|
|
x34 = fork(add, x31, x33)
|
|
x35 = fork(add, x29, x34)
|
|
x36 = apply(x35, x12)
|
|
x37 = rbind(repeat, x2)
|
|
x38 = apply(x37, x36)
|
|
return x38
|
|
|
|
|
|
def verify_99b1bc43(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, vline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, hsplit, vsplit)
|
|
x5 = x4(I, TWO)
|
|
x6 = first(x5)
|
|
x7 = last(x5)
|
|
x8 = palette(x6)
|
|
x9 = palette(x7)
|
|
x10 = intersection(x8, x9)
|
|
x11 = first(x10)
|
|
x12 = shape(x6)
|
|
x13 = canvas(x11, x12)
|
|
x14 = ofcolor(x6, x11)
|
|
x15 = ofcolor(x7, x11)
|
|
x16 = combine(x14, x15)
|
|
x17 = intersection(x14, x15)
|
|
x18 = difference(x16, x17)
|
|
x19 = fill(x13, THREE, x18)
|
|
return x19
|
|
|
|
|
|
def verify_99fa7670(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = objects(I, T, F, T)
|
|
x2 = rbind(shoot, RIGHT)
|
|
x3 = compose(x2, center)
|
|
x4 = fork(recolor, color, x3)
|
|
x5 = mapply(x4, x1)
|
|
x6 = paint(I, x5)
|
|
x7 = add(x0, DOWN_LEFT)
|
|
x8 = initset(x7)
|
|
x9 = mostcolor(I)
|
|
x10 = recolor(x9, x8)
|
|
x11 = objects(x6, T, F, T)
|
|
x12 = insert(x10, x11)
|
|
x13 = order(x12, uppermost)
|
|
x14 = first(x13)
|
|
x15 = remove(x10, x13)
|
|
x16 = remove(x14, x13)
|
|
x17 = compose(lrcorner, first)
|
|
x18 = compose(lrcorner, last)
|
|
x19 = fork(connect, x17, x18)
|
|
x20 = compose(color, first)
|
|
x21 = fork(recolor, x20, x19)
|
|
x22 = pair(x15, x16)
|
|
x23 = mapply(x21, x22)
|
|
x24 = underpaint(x6, x23)
|
|
return x24
|
|
|
|
|
|
def verify_9aec4887(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = mostcolor(I)
|
|
x5 = colorfilter(x3, x4)
|
|
x6 = argmax(x5, size)
|
|
x7 = outbox(x6)
|
|
x8 = backdrop(x7)
|
|
x9 = subgrid(x8, I)
|
|
x10 = cover(I, x8)
|
|
x11 = fgpartition(x10)
|
|
x12 = merge(x11)
|
|
x13 = normalize(x12)
|
|
x14 = shift(x13, UNITY)
|
|
x15 = paint(x9, x14)
|
|
x16 = toindices(x14)
|
|
x17 = fgpartition(x9)
|
|
x18 = rbind(remove, x17)
|
|
x19 = lbind(lbind, manhattan)
|
|
x20 = compose(x19, initset)
|
|
x21 = lbind(fork, greater)
|
|
x22 = lbind(sfilter, x16)
|
|
x23 = rbind(compose, x20)
|
|
x24 = lbind(lbind, valmin)
|
|
x25 = chain(x23, x24, x18)
|
|
x26 = rbind(compose, initset)
|
|
x27 = lbind(rbind, manhattan)
|
|
x28 = compose(x26, x27)
|
|
x29 = fork(x21, x25, x28)
|
|
x30 = compose(x22, x29)
|
|
x31 = fork(recolor, color, x30)
|
|
x32 = mapply(x31, x17)
|
|
x33 = paint(x15, x32)
|
|
return x33
|
|
|
|
|
|
def verify_9af7a82c(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = order(x0, size)
|
|
x2 = valmax(x0, size)
|
|
x3 = rbind(astuple, ONE)
|
|
x4 = lbind(subtract, x2)
|
|
x5 = compose(x3, size)
|
|
x6 = chain(x3, x4, size)
|
|
x7 = fork(canvas, color, x5)
|
|
x8 = lbind(canvas, ZERO)
|
|
x9 = compose(x8, x6)
|
|
x10 = fork(vconcat, x7, x9)
|
|
x11 = compose(cmirror, x10)
|
|
x12 = apply(x11, x1)
|
|
x13 = merge(x12)
|
|
x14 = cmirror(x13)
|
|
return x14
|
|
|
|
|
|
def verify_9d9215db(I: Grid) -> Grid:
|
|
x0 = hmirror(I)
|
|
x1 = fgpartition(x0)
|
|
x2 = merge(x1)
|
|
x3 = vmirror(I)
|
|
x4 = fgpartition(x3)
|
|
x5 = merge(x4)
|
|
x6 = hmirror(I)
|
|
x7 = vmirror(x6)
|
|
x8 = fgpartition(x7)
|
|
x9 = merge(x8)
|
|
x10 = mostcolor(I)
|
|
x11 = combine(x2, x5)
|
|
x12 = combine(x11, x9)
|
|
x13 = paint(I, x12)
|
|
x14 = compose(increment, first)
|
|
x15 = fork(greater, last, x14)
|
|
x16 = tojvec(NEG_TWO)
|
|
x17 = rbind(shift, x16)
|
|
x18 = compose(x17, vmirror)
|
|
x19 = rbind(sfilter, x15)
|
|
x20 = compose(x19, asindices)
|
|
x21 = compose(x18, x20)
|
|
x22 = fork(intersection, x20, x21)
|
|
x23 = rbind(shoot, RIGHT)
|
|
x24 = compose(x23, last)
|
|
x25 = matcher(first, x10)
|
|
x26 = compose(flip, x25)
|
|
x27 = rbind(sfilter, x26)
|
|
x28 = compose(double, halve)
|
|
x29 = fork(equality, x28, identity)
|
|
x30 = chain(flip, x29, last)
|
|
x31 = lbind(fork, both)
|
|
x32 = rbind(x31, x30)
|
|
x33 = lbind(fork, recolor)
|
|
x34 = lbind(x33, first)
|
|
x35 = rbind(compose, x24)
|
|
x36 = lbind(rbind, contained)
|
|
x37 = lbind(rbind, sfilter)
|
|
x38 = chain(x34, x35, x37)
|
|
x39 = chain(x38, x32, x36)
|
|
x40 = fork(toobject, x22, identity)
|
|
x41 = compose(x27, x40)
|
|
x42 = compose(x39, x22)
|
|
x43 = fork(mapply, x42, x41)
|
|
x44 = fork(paint, identity, x43)
|
|
x45 = compose(rot90, x44)
|
|
x46 = power(x45, FOUR)
|
|
x47 = x46(x13)
|
|
return x47
|
|
|
|
|
|
def verify_9dfd6313(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = decrement(x0)
|
|
x2 = connect(ORIGIN, x1)
|
|
x3 = height(I)
|
|
x4 = decrement(x3)
|
|
x5 = toivec(x4)
|
|
x6 = width(I)
|
|
x7 = decrement(x6)
|
|
x8 = tojvec(x7)
|
|
x9 = connect(x5, x8)
|
|
x10 = height(I)
|
|
x11 = halve(x10)
|
|
x12 = toivec(x11)
|
|
x13 = width(I)
|
|
x14 = decrement(x13)
|
|
x15 = astuple(x11, x14)
|
|
x16 = connect(x12, x15)
|
|
x17 = width(I)
|
|
x18 = halve(x17)
|
|
x19 = tojvec(x18)
|
|
x20 = height(I)
|
|
x21 = decrement(x20)
|
|
x22 = astuple(x21, x18)
|
|
x23 = connect(x19, x22)
|
|
x24 = astuple(x2, dmirror)
|
|
x25 = astuple(x9, cmirror)
|
|
x26 = astuple(x24, x25)
|
|
x27 = astuple(x23, vmirror)
|
|
x28 = astuple(x16, hmirror)
|
|
x29 = astuple(x27, x28)
|
|
x30 = combine(x26, x29)
|
|
x31 = lbind(colorcount, I)
|
|
x32 = rbind(toobject, I)
|
|
x33 = compose(x32, first)
|
|
x34 = chain(x31, color, x33)
|
|
x35 = compose(size, first)
|
|
x36 = fork(equality, x34, x35)
|
|
x37 = rbind(toobject, I)
|
|
x38 = chain(numcolors, x37, first)
|
|
x39 = matcher(x38, ONE)
|
|
x40 = fork(both, x39, x36)
|
|
x41 = extract(x30, x40)
|
|
x42 = last(x41)
|
|
x43 = x42(I)
|
|
return x43
|
|
|
|
|
|
def verify_9ecd008a(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, ZERO)
|
|
x1 = rbind(colorcount, ZERO)
|
|
x2 = lbind(toobject, x0)
|
|
x3 = compose(x1, x2)
|
|
x4 = vmirror(I)
|
|
x5 = hmirror(I)
|
|
x6 = astuple(x4, x5)
|
|
x7 = argmin(x6, x3)
|
|
x8 = subgrid(x0, x7)
|
|
return x8
|
|
|
|
|
|
def verify_9edfc990(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = colorfilter(x0, ZERO)
|
|
x2 = ofcolor(I, ONE)
|
|
x3 = rbind(adjacent, x2)
|
|
x4 = mfilter(x1, x3)
|
|
x5 = recolor(ONE, x4)
|
|
x6 = paint(I, x5)
|
|
return x6
|
|
|
|
|
|
def verify_9f236235(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(x2, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = objects(x5, T, F, T)
|
|
x7 = apply(uppermost, x6)
|
|
x8 = order(x7, identity)
|
|
x9 = lbind(sfilter, x6)
|
|
x10 = lbind(matcher, uppermost)
|
|
x11 = compose(x9, x10)
|
|
x12 = lbind(apply, color)
|
|
x13 = rbind(order, leftmost)
|
|
x14 = chain(x12, x13, x11)
|
|
x15 = apply(x14, x8)
|
|
x16 = vmirror(x15)
|
|
return x16
|
|
|
|
|
|
def verify_a1570a43(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = fork(equality, toindices, corners)
|
|
x3 = fork(multiply, height, width)
|
|
x4 = sfilter(x0, x2)
|
|
x5 = argmax(x4, x3)
|
|
x6 = difference(x1, x5)
|
|
x7 = mostcolor(I)
|
|
x8 = fill(I, x7, x6)
|
|
x9 = normalize(x6)
|
|
x10 = ulcorner(x5)
|
|
x11 = increment(x10)
|
|
x12 = shift(x9, x11)
|
|
x13 = paint(x8, x12)
|
|
return x13
|
|
|
|
|
|
def verify_a2fd1cf0(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = ofcolor(I, THREE)
|
|
x2 = uppermost(x0)
|
|
x3 = leftmost(x0)
|
|
x4 = uppermost(x1)
|
|
x5 = leftmost(x1)
|
|
x6 = astuple(x2, x4)
|
|
x7 = minimum(x6)
|
|
x8 = maximum(x6)
|
|
x9 = astuple(x7, x5)
|
|
x10 = astuple(x8, x5)
|
|
x11 = connect(x9, x10)
|
|
x12 = astuple(x3, x5)
|
|
x13 = minimum(x12)
|
|
x14 = maximum(x12)
|
|
x15 = astuple(x2, x13)
|
|
x16 = astuple(x2, x14)
|
|
x17 = connect(x15, x16)
|
|
x18 = combine(x11, x17)
|
|
x19 = underfill(I, EIGHT, x18)
|
|
return x19
|
|
|
|
|
|
def verify_a3325580(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = valmax(x0, size)
|
|
x2 = sizefilter(x0, x1)
|
|
x3 = order(x2, leftmost)
|
|
x4 = apply(color, x3)
|
|
x5 = astuple(ONE, x1)
|
|
x6 = rbind(canvas, x5)
|
|
x7 = apply(x6, x4)
|
|
x8 = merge(x7)
|
|
x9 = dmirror(x8)
|
|
return x9
|
|
|
|
|
|
def verify_a3df8b1e(I: Grid) -> Grid:
|
|
x0 = portrait(I)
|
|
x1 = branch(x0, identity, dmirror)
|
|
x2 = x1(I)
|
|
x3 = asindices(x2)
|
|
x4 = shoot(ORIGIN, UNITY)
|
|
x5 = intersection(x4, x3)
|
|
x6 = lrcorner(x5)
|
|
x7 = shoot(x6, DOWN_LEFT)
|
|
x8 = intersection(x7, x3)
|
|
x9 = combine(x5, x8)
|
|
x10 = llcorner(x9)
|
|
x11 = remove(x10, x9)
|
|
x12 = lbind(shift, x11)
|
|
x13 = height(x11)
|
|
x14 = lbind(multiply, x13)
|
|
x15 = chain(x12, toivec, x14)
|
|
x16 = height(x2)
|
|
x17 = height(x11)
|
|
x18 = divide(x16, x17)
|
|
x19 = increment(x18)
|
|
x20 = interval(ZERO, x19, ONE)
|
|
x21 = mapply(x15, x20)
|
|
x22 = rbind(contained, x21)
|
|
x23 = sfilter(x3, x22)
|
|
x24 = asindices(I)
|
|
x25 = corners(x24)
|
|
x26 = difference(x24, x25)
|
|
x27 = toobject(x26, I)
|
|
x28 = mostcolor(x27)
|
|
x29 = palette(I)
|
|
x30 = other(x29, x28)
|
|
x31 = ulcorner(x3)
|
|
x32 = index(x2, x31)
|
|
x33 = equality(x32, x30)
|
|
x34 = urcorner(x3)
|
|
x35 = index(x2, x34)
|
|
x36 = equality(x35, x30)
|
|
x37 = llcorner(x3)
|
|
x38 = index(x2, x37)
|
|
x39 = equality(x38, x30)
|
|
x40 = lrcorner(x3)
|
|
x41 = index(x2, x40)
|
|
x42 = equality(x41, x30)
|
|
x43 = astuple(x33, x36)
|
|
x44 = astuple(x39, x42)
|
|
x45 = combine(x43, x44)
|
|
x46 = vmirror(x23)
|
|
x47 = astuple(x23, x46)
|
|
x48 = hmirror(x23)
|
|
x49 = hmirror(x46)
|
|
x50 = astuple(x48, x49)
|
|
x51 = combine(x47, x50)
|
|
x52 = pair(x45, x51)
|
|
x53 = sfilter(x52, first)
|
|
x54 = mapply(last, x53)
|
|
x55 = fill(x2, x30, x54)
|
|
x56 = x1(x55)
|
|
return x56
|
|
|
|
|
|
def verify_a416b8f3(I: Grid) -> Grid:
|
|
x0 = hconcat(I, I)
|
|
return x0
|
|
|
|
|
|
def verify_a48eeaf7(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = sfilter(x0, x1)
|
|
x3 = argmax(x2, size)
|
|
x4 = other(x0, x3)
|
|
x5 = color(x4)
|
|
x6 = toindices(x4)
|
|
x7 = outbox(x3)
|
|
x8 = lbind(argmin, x7)
|
|
x9 = lbind(lbind, manhattan)
|
|
x10 = rbind(compose, initset)
|
|
x11 = chain(x8, x10, x9)
|
|
x12 = compose(x11, initset)
|
|
x13 = apply(x12, x6)
|
|
x14 = cover(I, x4)
|
|
x15 = fill(x14, x5, x13)
|
|
return x15
|
|
|
|
|
|
def verify_a5313dff(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = rbind(bordering, I)
|
|
x2 = compose(flip, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = totuple(x3)
|
|
x5 = apply(color, x4)
|
|
x6 = mostcommon(x5)
|
|
x7 = mostcolor(I)
|
|
x8 = colorfilter(x0, x7)
|
|
x9 = rbind(bordering, I)
|
|
x10 = compose(flip, x9)
|
|
x11 = mfilter(x8, x10)
|
|
x12 = fill(I, ONE, x11)
|
|
return x12
|
|
|
|
|
|
def verify_a5f85a15(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = compose(increment, double)
|
|
x3 = shoot(ORIGIN, UNITY)
|
|
x4 = apply(x2, x3)
|
|
x5 = order(x4, identity)
|
|
x6 = lbind(contained, ZERO)
|
|
x7 = sfilter(x1, x6)
|
|
x8 = lbind(shift, x5)
|
|
x9 = mapply(x8, x7)
|
|
x10 = fill(I, FOUR, x9)
|
|
return x10
|
|
|
|
|
|
def verify_a61ba2ce(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = fork(contained, lrcorner, toindices)
|
|
x2 = compose(flip, x1)
|
|
x3 = extract(x0, x2)
|
|
x4 = fork(contained, llcorner, toindices)
|
|
x5 = compose(flip, x4)
|
|
x6 = extract(x0, x5)
|
|
x7 = fork(contained, urcorner, toindices)
|
|
x8 = compose(flip, x7)
|
|
x9 = extract(x0, x8)
|
|
x10 = fork(contained, ulcorner, toindices)
|
|
x11 = compose(flip, x10)
|
|
x12 = extract(x0, x11)
|
|
x13 = height(x3)
|
|
x14 = height(x9)
|
|
x15 = add(x13, x14)
|
|
x16 = width(x3)
|
|
x17 = width(x6)
|
|
x18 = add(x16, x17)
|
|
x19 = astuple(x15, x18)
|
|
x20 = mostcolor(I)
|
|
x21 = canvas(x20, x19)
|
|
x22 = normalize(x3)
|
|
x23 = paint(x21, x22)
|
|
x24 = normalize(x6)
|
|
x25 = width(x6)
|
|
x26 = subtract(x18, x25)
|
|
x27 = tojvec(x26)
|
|
x28 = shift(x24, x27)
|
|
x29 = paint(x23, x28)
|
|
x30 = normalize(x9)
|
|
x31 = height(x9)
|
|
x32 = subtract(x15, x31)
|
|
x33 = toivec(x32)
|
|
x34 = shift(x30, x33)
|
|
x35 = paint(x29, x34)
|
|
x36 = normalize(x12)
|
|
x37 = shape(x12)
|
|
x38 = subtract(x19, x37)
|
|
x39 = shift(x36, x38)
|
|
x40 = paint(x35, x39)
|
|
return x40
|
|
|
|
|
|
def verify_a61f2674(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = argmax(x0, size)
|
|
x2 = argmin(x0, size)
|
|
x3 = merge(x0)
|
|
x4 = cover(I, x3)
|
|
x5 = fill(x4, ONE, x1)
|
|
x6 = fill(x5, TWO, x2)
|
|
return x6
|
|
|
|
|
|
def verify_a64e4611(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = shape(I)
|
|
x2 = add(TWO, x1)
|
|
x3 = canvas(x0, x2)
|
|
x4 = asobject(I)
|
|
x5 = shift(x4, UNITY)
|
|
x6 = paint(x3, x5)
|
|
x7 = double(SIX)
|
|
x8 = astuple(ONE, x7)
|
|
x9 = connect(UNITY, x8)
|
|
x10 = outbox(x9)
|
|
x11 = backdrop(x10)
|
|
x12 = recolor(x0, x11)
|
|
x13 = recolor(THREE, x9)
|
|
x14 = lbind(shift, x13)
|
|
x15 = lbind(mapply, x14)
|
|
x16 = rbind(occurrences, x12)
|
|
x17 = compose(x15, x16)
|
|
x18 = fork(paint, identity, x17)
|
|
x19 = x18(x6)
|
|
x20 = ofcolor(x19, THREE)
|
|
x21 = dmirror(x6)
|
|
x22 = x18(x21)
|
|
x23 = dmirror(x22)
|
|
x24 = ofcolor(x23, THREE)
|
|
x25 = combine(x20, x24)
|
|
x26 = fill(x6, THREE, x25)
|
|
x27 = astuple(TWO, ONE)
|
|
x28 = dneighbors(UNITY)
|
|
x29 = remove(x27, x28)
|
|
x30 = recolor(x0, x29)
|
|
x31 = initset(UNITY)
|
|
x32 = recolor(THREE, x31)
|
|
x33 = combine(x30, x32)
|
|
x34 = recolor(x0, x33)
|
|
x35 = astuple(ONE, THREE)
|
|
x36 = initset(x35)
|
|
x37 = insert(ZERO_BY_TWO, x36)
|
|
x38 = insert(RIGHT, x37)
|
|
x39 = insert(DOWN, x38)
|
|
x40 = recolor(x0, x39)
|
|
x41 = astuple(ONE, TWO)
|
|
x42 = initset(x41)
|
|
x43 = insert(UNITY, x42)
|
|
x44 = recolor(THREE, x43)
|
|
x45 = combine(x40, x44)
|
|
x46 = recolor(x0, x45)
|
|
x47 = lbind(shift, x34)
|
|
x48 = lbind(mapply, x47)
|
|
x49 = rbind(occurrences, x33)
|
|
x50 = compose(x48, x49)
|
|
x51 = fork(paint, identity, x50)
|
|
x52 = lbind(shift, x46)
|
|
x53 = lbind(mapply, x52)
|
|
x54 = rbind(occurrences, x45)
|
|
x55 = compose(x53, x54)
|
|
x56 = fork(paint, identity, x55)
|
|
x57 = compose(x51, x56)
|
|
x58 = compose(rot90, x57)
|
|
x59 = power(x58, FOUR)
|
|
x60 = power(x59, TWO)
|
|
x61 = asindices(x26)
|
|
x62 = box(x61)
|
|
x63 = fill(x26, THREE, x62)
|
|
x64 = x60(x63)
|
|
x65 = trim(x64)
|
|
return x65
|
|
|
|
|
|
def verify_a65b410d(I: Grid) -> Grid:
|
|
x0 = astuple(identity, rot90)
|
|
x1 = astuple(rot180, rot270)
|
|
x2 = combine(x0, x1)
|
|
x3 = astuple(identity, rot270)
|
|
x4 = astuple(rot180, rot90)
|
|
x5 = combine(x3, x4)
|
|
x6 = pair(x2, x5)
|
|
x7 = leastcolor(I)
|
|
x8 = rbind(ofcolor, x7)
|
|
x9 = rbind(rapply, I)
|
|
x10 = chain(first, x9, initset)
|
|
x11 = chain(hline, x8, x10)
|
|
x12 = rbind(ofcolor, x7)
|
|
x13 = rbind(rapply, I)
|
|
x14 = chain(first, x13, initset)
|
|
x15 = chain(leftmost, x12, x14)
|
|
x16 = matcher(x15, ZERO)
|
|
x17 = fork(both, x11, x16)
|
|
x18 = compose(x17, first)
|
|
x19 = extract(x6, x18)
|
|
x20 = first(x19)
|
|
x21 = last(x19)
|
|
x22 = x20(I)
|
|
x23 = ofcolor(x22, x7)
|
|
x24 = argmax(x23, last)
|
|
x25 = add(x24, UP_RIGHT)
|
|
x26 = shoot(x25, UP_RIGHT)
|
|
x27 = add(x24, DOWN_LEFT)
|
|
x28 = shoot(x27, DOWN_LEFT)
|
|
x29 = rbind(shoot, LEFT)
|
|
x30 = mapply(x29, x26)
|
|
x31 = rbind(shoot, LEFT)
|
|
x32 = mapply(x31, x28)
|
|
x33 = width(x22)
|
|
x34 = invert(x33)
|
|
x35 = tojvec(x34)
|
|
x36 = shift(x30, x35)
|
|
x37 = combine(x30, x36)
|
|
x38 = fill(x22, THREE, x37)
|
|
x39 = shift(x32, x35)
|
|
x40 = combine(x32, x39)
|
|
x41 = fill(x38, ONE, x40)
|
|
x42 = x21(x41)
|
|
return x42
|
|
|
|
|
|
def verify_a68b268e(I: Grid) -> Grid:
|
|
x0 = tophalf(I)
|
|
x1 = lefthalf(x0)
|
|
x2 = tophalf(I)
|
|
x3 = righthalf(x2)
|
|
x4 = bottomhalf(I)
|
|
x5 = lefthalf(x4)
|
|
x6 = bottomhalf(I)
|
|
x7 = righthalf(x6)
|
|
x8 = palette(x1)
|
|
x9 = palette(x3)
|
|
x10 = intersection(x8, x9)
|
|
x11 = palette(x5)
|
|
x12 = palette(x7)
|
|
x13 = intersection(x11, x12)
|
|
x14 = intersection(x10, x13)
|
|
x15 = first(x14)
|
|
x16 = shape(I)
|
|
x17 = halve(x16)
|
|
x18 = canvas(x15, x17)
|
|
x19 = matcher(first, x15)
|
|
x20 = compose(flip, x19)
|
|
x21 = rbind(sfilter, x20)
|
|
x22 = compose(x21, asobject)
|
|
x23 = x22(x1)
|
|
x24 = x22(x3)
|
|
x25 = x22(x5)
|
|
x26 = x22(x7)
|
|
x27 = paint(x18, x26)
|
|
x28 = paint(x27, x25)
|
|
x29 = paint(x28, x24)
|
|
x30 = paint(x29, x23)
|
|
return x30
|
|
|
|
|
|
def verify_a699fb00(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = height(I)
|
|
x2 = vsplit(I, x1)
|
|
x3 = lbind(recolor, TWO)
|
|
x4 = rbind(ofcolor, x0)
|
|
x5 = chain(x3, delta, x4)
|
|
x6 = fork(paint, identity, x5)
|
|
x7 = apply(x6, x2)
|
|
x8 = merge(x7)
|
|
return x8
|
|
|
|
|
|
def verify_a740d043(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = subgrid(x1, I)
|
|
x3 = mostcolor(I)
|
|
x4 = replace(x2, x3, ZERO)
|
|
return x4
|
|
|
|
|
|
def verify_a78176bb(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = objects(I, T, T, F)
|
|
x2 = fork(connect, ulcorner, lrcorner)
|
|
x3 = fork(equality, toindices, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = size(x4)
|
|
x6 = positive(x5)
|
|
x7 = branch(x6, identity, hmirror)
|
|
x8 = x7(I)
|
|
x9 = objects(x8, T, F, T)
|
|
x10 = compose(flip, x3)
|
|
x11 = sfilter(x9, x10)
|
|
x12 = rbind(shoot, UNITY)
|
|
x13 = rbind(shoot, NEG_UNITY)
|
|
x14 = fork(combine, x12, x13)
|
|
x15 = rbind(branch, llcorner)
|
|
x16 = rbind(x15, urcorner)
|
|
x17 = rbind(branch, DOWN_LEFT)
|
|
x18 = rbind(x17, UP_RIGHT)
|
|
x19 = rbind(branch, RIGHT)
|
|
x20 = rbind(x19, DOWN)
|
|
x21 = fork(contained, urcorner, toindices)
|
|
x22 = lbind(index, x8)
|
|
x23 = compose(x20, x21)
|
|
x24 = fork(add, ulcorner, x23)
|
|
x25 = compose(x22, x24)
|
|
x26 = chain(initset, x16, x21)
|
|
x27 = fork(rapply, x26, identity)
|
|
x28 = compose(first, x27)
|
|
x29 = compose(x18, x21)
|
|
x30 = fork(add, x28, x29)
|
|
x31 = compose(x14, x30)
|
|
x32 = fork(recolor, x25, x31)
|
|
x33 = mapply(x32, x11)
|
|
x34 = merge(x11)
|
|
x35 = cover(x8, x34)
|
|
x36 = paint(x35, x33)
|
|
x37 = x7(x36)
|
|
return x37
|
|
|
|
|
|
def verify_a79310a0(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = mostcolor(I)
|
|
x3 = fill(I, x2, x1)
|
|
x4 = shift(x1, DOWN)
|
|
x5 = fill(x3, TWO, x4)
|
|
return x5
|
|
|
|
|
|
def verify_a85d4709(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = height(I)
|
|
x2 = vsplit(I, x1)
|
|
x3 = rbind(ofcolor, x0)
|
|
x4 = compose(leftmost, x3)
|
|
x5 = width(I)
|
|
x6 = divide(x5, THREE)
|
|
x7 = multiply(x6, TWO)
|
|
x8 = lbind(greater, x6)
|
|
x9 = compose(x8, x4)
|
|
x10 = lbind(greater, x7)
|
|
x11 = compose(x10, x4)
|
|
x12 = compose(flip, x9)
|
|
x13 = fork(both, x11, x12)
|
|
x14 = fork(either, x9, x13)
|
|
x15 = compose(flip, x14)
|
|
x16 = rbind(multiply, TWO)
|
|
x17 = compose(x16, x9)
|
|
x18 = rbind(multiply, FOUR)
|
|
x19 = compose(x18, x13)
|
|
x20 = rbind(multiply, THREE)
|
|
x21 = compose(x20, x15)
|
|
x22 = fork(add, x17, x19)
|
|
x23 = fork(add, x22, x21)
|
|
x24 = width(I)
|
|
x25 = rbind(repeat, x24)
|
|
x26 = compose(x25, x23)
|
|
x27 = apply(x26, x2)
|
|
return x27
|
|
|
|
|
|
def verify_a87f7484(I: Grid) -> Grid:
|
|
x0 = height(I)
|
|
x1 = halve(x0)
|
|
x2 = increment(x1)
|
|
x3 = interval(THREE, x2, ONE)
|
|
x4 = width(I)
|
|
x5 = halve(x4)
|
|
x6 = increment(x5)
|
|
x7 = interval(THREE, x6, ONE)
|
|
x8 = palette(I)
|
|
x9 = lbind(apply, toindices)
|
|
x10 = compose(x9, partition)
|
|
x11 = rbind(compose, palette)
|
|
x12 = lbind(lbind, contained)
|
|
x13 = compose(x11, x12)
|
|
x14 = lbind(chain, size)
|
|
x15 = rbind(x14, x13)
|
|
x16 = lbind(lbind, sfilter)
|
|
x17 = compose(x15, x16)
|
|
x18 = compose(positive, size)
|
|
x19 = lbind(sfilter, x8)
|
|
x20 = fork(matcher, x17, size)
|
|
x21 = chain(x18, x19, x20)
|
|
x22 = lbind(apply, shape)
|
|
x23 = chain(size, dedupe, x22)
|
|
x24 = matcher(x23, ONE)
|
|
x25 = lbind(apply, x10)
|
|
x26 = chain(size, dedupe, x25)
|
|
x27 = matcher(x26, TWO)
|
|
x28 = compose(size, dedupe)
|
|
x29 = fork(equality, size, x28)
|
|
x30 = fork(add, x21, x24)
|
|
x31 = fork(add, x27, x29)
|
|
x32 = fork(add, x30, x31)
|
|
x33 = multiply(TEN, TEN)
|
|
x34 = lbind(multiply, x33)
|
|
x35 = compose(x34, x32)
|
|
x36 = fork(add, x35, size)
|
|
x37 = lbind(vsplit, I)
|
|
x38 = apply(x37, x3)
|
|
x39 = lbind(hsplit, I)
|
|
x40 = apply(x39, x7)
|
|
x41 = combine(x38, x40)
|
|
x42 = argmax(x41, x36)
|
|
x43 = apply(x10, x42)
|
|
x44 = mostcommon(x43)
|
|
x45 = matcher(x10, x44)
|
|
x46 = argmin(x42, x45)
|
|
return x46
|
|
|
|
|
|
def verify_a8c38be5(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = mostcolor(I)
|
|
x2 = palette(I)
|
|
x3 = remove(x1, x2)
|
|
x4 = lbind(colorcount, I)
|
|
x5 = argmax(x3, x4)
|
|
x6 = astuple(x1, x5)
|
|
x7 = rbind(contained, x6)
|
|
x8 = chain(flip, x7, color)
|
|
x9 = sfilter(x0, x8)
|
|
x10 = fork(connect, ulcorner, urcorner)
|
|
x11 = fork(connect, ulcorner, llcorner)
|
|
x12 = fork(combine, x10, x11)
|
|
x13 = fork(equality, toindices, x12)
|
|
x14 = fork(connect, urcorner, ulcorner)
|
|
x15 = fork(connect, urcorner, lrcorner)
|
|
x16 = fork(combine, x14, x15)
|
|
x17 = fork(equality, toindices, x16)
|
|
x18 = fork(connect, llcorner, ulcorner)
|
|
x19 = fork(connect, llcorner, lrcorner)
|
|
x20 = fork(combine, x18, x19)
|
|
x21 = fork(equality, toindices, x20)
|
|
x22 = fork(connect, lrcorner, llcorner)
|
|
x23 = fork(connect, lrcorner, urcorner)
|
|
x24 = fork(combine, x22, x23)
|
|
x25 = fork(equality, toindices, x24)
|
|
x26 = fork(contained, lrcorner, toindices)
|
|
x27 = compose(flip, x26)
|
|
x28 = fork(contained, llcorner, toindices)
|
|
x29 = compose(flip, x28)
|
|
x30 = fork(contained, urcorner, toindices)
|
|
x31 = compose(flip, x30)
|
|
x32 = fork(contained, ulcorner, toindices)
|
|
x33 = compose(flip, x32)
|
|
x34 = fork(both, x27, x29)
|
|
x35 = fork(both, x31, x33)
|
|
x36 = fork(both, x31, x27)
|
|
x37 = fork(both, x33, x29)
|
|
x38 = lbind(matcher, first)
|
|
x39 = compose(x38, lowermost)
|
|
x40 = fork(sfilter, toindices, x39)
|
|
x41 = compose(size, x40)
|
|
x42 = matcher(x41, ONE)
|
|
x43 = lbind(matcher, first)
|
|
x44 = compose(x43, uppermost)
|
|
x45 = fork(sfilter, toindices, x44)
|
|
x46 = compose(size, x45)
|
|
x47 = matcher(x46, ONE)
|
|
x48 = lbind(matcher, last)
|
|
x49 = compose(x48, rightmost)
|
|
x50 = fork(sfilter, toindices, x49)
|
|
x51 = compose(size, x50)
|
|
x52 = matcher(x51, ONE)
|
|
x53 = lbind(matcher, last)
|
|
x54 = compose(x53, leftmost)
|
|
x55 = fork(sfilter, toindices, x54)
|
|
x56 = compose(size, x55)
|
|
x57 = matcher(x56, ONE)
|
|
x58 = fork(both, x34, x42)
|
|
x59 = fork(both, x35, x47)
|
|
x60 = fork(both, x36, x52)
|
|
x61 = fork(both, x37, x57)
|
|
x62 = fork(connect, ulcorner, urcorner)
|
|
x63 = fork(difference, x62, toindices)
|
|
x64 = compose(size, x63)
|
|
x65 = matcher(x64, ZERO)
|
|
x66 = fork(connect, llcorner, lrcorner)
|
|
x67 = fork(difference, x66, toindices)
|
|
x68 = compose(size, x67)
|
|
x69 = matcher(x68, ZERO)
|
|
x70 = fork(connect, ulcorner, llcorner)
|
|
x71 = fork(difference, x70, toindices)
|
|
x72 = compose(size, x71)
|
|
x73 = matcher(x72, ZERO)
|
|
x74 = fork(connect, urcorner, lrcorner)
|
|
x75 = fork(difference, x74, toindices)
|
|
x76 = compose(size, x75)
|
|
x77 = matcher(x76, ZERO)
|
|
x78 = fork(both, x65, x58)
|
|
x79 = fork(both, x69, x59)
|
|
x80 = fork(both, x73, x60)
|
|
x81 = fork(both, x77, x61)
|
|
x82 = argmax(x9, x13)
|
|
x83 = argmax(x9, x17)
|
|
x84 = argmax(x9, x21)
|
|
x85 = argmax(x9, x25)
|
|
x86 = argmax(x9, x78)
|
|
x87 = argmax(x9, x79)
|
|
x88 = argmax(x9, x80)
|
|
x89 = argmax(x9, x81)
|
|
x90 = height(x82)
|
|
x91 = height(x84)
|
|
x92 = add(x90, x91)
|
|
x93 = height(x88)
|
|
x94 = add(x93, TWO)
|
|
x95 = add(x92, x94)
|
|
x96 = width(x82)
|
|
x97 = width(x83)
|
|
x98 = add(x96, x97)
|
|
x99 = width(x86)
|
|
x100 = add(x99, TWO)
|
|
x101 = add(x98, x100)
|
|
x102 = ulcorner(x82)
|
|
x103 = increment(x102)
|
|
x104 = index(I, x103)
|
|
x105 = astuple(x95, x101)
|
|
x106 = canvas(x104, x105)
|
|
x107 = normalize(x82)
|
|
x108 = paint(x106, x107)
|
|
x109 = normalize(x83)
|
|
x110 = width(x83)
|
|
x111 = subtract(x101, x110)
|
|
x112 = tojvec(x111)
|
|
x113 = shift(x109, x112)
|
|
x114 = paint(x108, x113)
|
|
x115 = normalize(x84)
|
|
x116 = height(x84)
|
|
x117 = subtract(x95, x116)
|
|
x118 = toivec(x117)
|
|
x119 = shift(x115, x118)
|
|
x120 = paint(x114, x119)
|
|
x121 = normalize(x85)
|
|
x122 = height(x85)
|
|
x123 = subtract(x95, x122)
|
|
x124 = width(x85)
|
|
x125 = subtract(x101, x124)
|
|
x126 = astuple(x123, x125)
|
|
x127 = shift(x121, x126)
|
|
x128 = paint(x120, x127)
|
|
x129 = normalize(x88)
|
|
x130 = height(x82)
|
|
x131 = increment(x130)
|
|
x132 = toivec(x131)
|
|
x133 = shift(x129, x132)
|
|
x134 = paint(x128, x133)
|
|
x135 = normalize(x86)
|
|
x136 = width(x82)
|
|
x137 = increment(x136)
|
|
x138 = tojvec(x137)
|
|
x139 = shift(x135, x138)
|
|
x140 = paint(x134, x139)
|
|
x141 = normalize(x89)
|
|
x142 = height(x83)
|
|
x143 = increment(x142)
|
|
x144 = width(x89)
|
|
x145 = subtract(x101, x144)
|
|
x146 = astuple(x143, x145)
|
|
x147 = shift(x141, x146)
|
|
x148 = paint(x140, x147)
|
|
x149 = normalize(x87)
|
|
x150 = height(x87)
|
|
x151 = subtract(x95, x150)
|
|
x152 = width(x84)
|
|
x153 = increment(x152)
|
|
x154 = astuple(x151, x153)
|
|
x155 = shift(x149, x154)
|
|
x156 = paint(x148, x155)
|
|
return x156
|
|
|
|
|
|
def verify_a8d7556c(I: Grid) -> Grid:
|
|
x0 = initset(ORIGIN)
|
|
x1 = recolor(ZERO, x0)
|
|
x2 = upscale(x1, TWO)
|
|
x3 = occurrences(I, x2)
|
|
x4 = lbind(shift, x2)
|
|
x5 = mapply(x4, x3)
|
|
x6 = fill(I, TWO, x5)
|
|
return x6
|
|
|
|
|
|
def verify_a9f96cdd(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = shift(x1, NEG_UNITY)
|
|
x3 = recolor(THREE, x2)
|
|
x4 = shift(x1, UNITY)
|
|
x5 = recolor(SEVEN, x4)
|
|
x6 = shift(x1, DOWN_LEFT)
|
|
x7 = recolor(EIGHT, x6)
|
|
x8 = shift(x1, UP_RIGHT)
|
|
x9 = recolor(SIX, x8)
|
|
x10 = mostcolor(I)
|
|
x11 = fill(I, x10, x1)
|
|
x12 = combine(x3, x5)
|
|
x13 = combine(x7, x9)
|
|
x14 = combine(x12, x13)
|
|
x15 = paint(x11, x14)
|
|
return x15
|
|
|
|
|
|
def verify_aabf363d(I: Grid) -> Grid:
|
|
x0 = fork(multiply, height, width)
|
|
x1 = lbind(ofcolor, I)
|
|
x2 = palette(I)
|
|
x3 = compose(x0, x1)
|
|
x4 = argmax(x2, x3)
|
|
x5 = leastcolor(I)
|
|
x6 = palette(I)
|
|
x7 = remove(x4, x6)
|
|
x8 = other(x7, x5)
|
|
x9 = replace(I, x5, x4)
|
|
x10 = replace(x9, x8, x5)
|
|
return x10
|
|
|
|
|
|
def verify_aba27056(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = delta(x1)
|
|
x3 = fill(I, FOUR, x2)
|
|
x4 = delta(x1)
|
|
x5 = box(x1)
|
|
x6 = intersection(x4, x5)
|
|
x7 = uppermost(x6)
|
|
x8 = uppermost(x1)
|
|
x9 = equality(x7, x8)
|
|
x10 = leftmost(x6)
|
|
x11 = leftmost(x1)
|
|
x12 = equality(x10, x11)
|
|
x13 = lowermost(x6)
|
|
x14 = lowermost(x1)
|
|
x15 = equality(x13, x14)
|
|
x16 = rightmost(x6)
|
|
x17 = rightmost(x1)
|
|
x18 = equality(x16, x17)
|
|
x19 = urcorner(x6)
|
|
x20 = ulcorner(x6)
|
|
x21 = llcorner(x6)
|
|
x22 = lrcorner(x6)
|
|
x23 = branch(x15, x21, x22)
|
|
x24 = branch(x12, x20, x23)
|
|
x25 = branch(x9, x19, x24)
|
|
x26 = branch(x15, x22, x19)
|
|
x27 = branch(x12, x21, x26)
|
|
x28 = branch(x9, x20, x27)
|
|
x29 = branch(x15, DOWN_LEFT, UNITY)
|
|
x30 = branch(x12, NEG_UNITY, x29)
|
|
x31 = branch(x9, UP_RIGHT, x30)
|
|
x32 = branch(x15, UNITY, UP_RIGHT)
|
|
x33 = branch(x12, DOWN_LEFT, x32)
|
|
x34 = branch(x9, NEG_UNITY, x33)
|
|
x35 = branch(x15, DOWN, RIGHT)
|
|
x36 = branch(x12, LEFT, x35)
|
|
x37 = branch(x9, UP, x36)
|
|
x38 = shoot(x25, x31)
|
|
x39 = shoot(x28, x34)
|
|
x40 = combine(x38, x39)
|
|
x41 = rbind(shoot, x37)
|
|
x42 = mapply(x41, x6)
|
|
x43 = combine(x42, x40)
|
|
x44 = fill(x3, FOUR, x43)
|
|
return x44
|
|
|
|
|
|
def verify_ac0a08a4(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = colorcount(I, x0)
|
|
x2 = height(I)
|
|
x3 = width(I)
|
|
x4 = multiply(x2, x3)
|
|
x5 = subtract(x4, x1)
|
|
x6 = upscale(I, x5)
|
|
return x6
|
|
|
|
|
|
def verify_ae3edfdc(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, ONE)
|
|
x1 = center(x0)
|
|
x2 = ofcolor(I, TWO)
|
|
x3 = center(x2)
|
|
x4 = ofcolor(I, THREE)
|
|
x5 = ofcolor(I, SEVEN)
|
|
x6 = lbind(add, x1)
|
|
x7 = initset(x1)
|
|
x8 = rbind(position, x7)
|
|
x9 = compose(invert, x8)
|
|
x10 = chain(x6, x9, initset)
|
|
x11 = lbind(add, x3)
|
|
x12 = initset(x3)
|
|
x13 = rbind(position, x12)
|
|
x14 = compose(invert, x13)
|
|
x15 = chain(x11, x14, initset)
|
|
x16 = apply(x10, x5)
|
|
x17 = apply(x15, x4)
|
|
x18 = combine(x4, x5)
|
|
x19 = cover(I, x18)
|
|
x20 = fill(x19, SEVEN, x16)
|
|
x21 = fill(x20, THREE, x17)
|
|
return x21
|
|
|
|
|
|
def verify_ae4f1146(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = objects(I, F, F, T)
|
|
x5 = rbind(colorcount, ONE)
|
|
x6 = argmax(x4, x5)
|
|
x7 = subgrid(x6, I)
|
|
return x7
|
|
|
|
|
|
def verify_aedd82e4(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = canvas(ZERO, x0)
|
|
x2 = hconcat(I, x1)
|
|
x3 = objects(x2, F, F, T)
|
|
x4 = matcher(color, ZERO)
|
|
x5 = compose(flip, x4)
|
|
x6 = sfilter(x3, x5)
|
|
x7 = sizefilter(x6, ONE)
|
|
x8 = merge(x7)
|
|
x9 = fill(I, ONE, x8)
|
|
return x9
|
|
|
|
|
|
def verify_af902bf9(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = interval(THREE, SEVEN, ONE)
|
|
x4 = product(x3, x3)
|
|
x5 = fork(multiply, first, last)
|
|
x6 = order(x4, x5)
|
|
x7 = lbind(canvas, NEG_ONE)
|
|
x8 = chain(x7, first, first)
|
|
x9 = chain(corners, asindices, x8)
|
|
x10 = lbind(recolor, x0)
|
|
x11 = compose(asindices, x8)
|
|
x12 = fork(difference, x11, x9)
|
|
x13 = lbind(recolor, TWO)
|
|
x14 = compose(inbox, x9)
|
|
x15 = chain(x13, backdrop, x14)
|
|
x16 = compose(x10, x12)
|
|
x17 = lbind(lbind, combine)
|
|
x18 = compose(x17, x16)
|
|
x19 = lbind(rbind, recolor)
|
|
x20 = compose(x19, x9)
|
|
x21 = fork(compose, x18, x20)
|
|
x22 = lbind(lbind, mapply)
|
|
x23 = lbind(lbind, shift)
|
|
x24 = chain(x22, x23, x15)
|
|
x25 = lbind(lbind, occurrences)
|
|
x26 = compose(x25, last)
|
|
x27 = fork(compose, x26, x21)
|
|
x28 = fork(compose, x24, x27)
|
|
x29 = rbind(mapply, x2)
|
|
x30 = compose(x29, x28)
|
|
x31 = fork(paint, last, x30)
|
|
x32 = compose(first, first)
|
|
x33 = fork(remove, x32, first)
|
|
x34 = fork(astuple, x33, x31)
|
|
x35 = size(x6)
|
|
x36 = power(x34, x35)
|
|
x37 = astuple(x6, I)
|
|
x38 = x36(x37)
|
|
x39 = last(x38)
|
|
return x39
|
|
|
|
|
|
def verify_b0c4d837(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = remove(x2, x0)
|
|
x4 = argmin(x3, x1)
|
|
x5 = argmax(x3, x1)
|
|
x6 = ulcorner(x5)
|
|
x7 = llcorner(x5)
|
|
x8 = connect(x6, x7)
|
|
x9 = urcorner(x5)
|
|
x10 = lrcorner(x5)
|
|
x11 = connect(x9, x10)
|
|
x12 = combine(x8, x11)
|
|
x13 = toindices(x5)
|
|
x14 = difference(x12, x13)
|
|
x15 = size(x14)
|
|
x16 = equality(x15, ZERO)
|
|
x17 = branch(x16, height, width)
|
|
x18 = x17(x5)
|
|
x19 = x17(x4)
|
|
x20 = subtract(x18, x19)
|
|
x21 = decrement(x20)
|
|
x22 = color(x4)
|
|
x23 = color(x2)
|
|
x24 = repeat(x22, x21)
|
|
x25 = subtract(NINE, x21)
|
|
x26 = repeat(x23, x25)
|
|
x27 = combine(x24, x26)
|
|
x28 = repeat(x27, ONE)
|
|
x29 = hsplit(x28, THREE)
|
|
x30 = interval(ZERO, THREE, ONE)
|
|
x31 = pair(x30, x29)
|
|
x32 = matcher(first, ZERO)
|
|
x33 = extract(x31, x32)
|
|
x34 = last(x33)
|
|
x35 = matcher(first, ONE)
|
|
x36 = extract(x31, x35)
|
|
x37 = last(x36)
|
|
x38 = matcher(first, TWO)
|
|
x39 = extract(x31, x38)
|
|
x40 = last(x39)
|
|
x41 = vmirror(x37)
|
|
x42 = vconcat(x34, x41)
|
|
x43 = vconcat(x42, x40)
|
|
return x43
|
|
|
|
|
|
def verify_b190f7f5(I: Grid) -> Grid:
|
|
x0 = lbind(contained, TWO)
|
|
x1 = lbind(apply, numcolors)
|
|
x2 = compose(x0, x1)
|
|
x3 = lbind(apply, shape)
|
|
x4 = chain(size, dedupe, x3)
|
|
x5 = matcher(x4, ONE)
|
|
x6 = compose(palette, first)
|
|
x7 = compose(palette, last)
|
|
x8 = fork(intersection, x6, x7)
|
|
x9 = compose(size, x8)
|
|
x10 = matcher(x9, ONE)
|
|
x11 = lbind(contained, ONE)
|
|
x12 = compose(minimum, shape)
|
|
x13 = lbind(apply, x12)
|
|
x14 = chain(flip, x11, x13)
|
|
x15 = fork(add, x2, x5)
|
|
x16 = fork(add, x10, x14)
|
|
x17 = fork(add, x15, x16)
|
|
x18 = vsplit(I, TWO)
|
|
x19 = hsplit(I, TWO)
|
|
x20 = astuple(x18, x19)
|
|
x21 = argmax(x20, x17)
|
|
x22 = argmin(x21, numcolors)
|
|
x23 = argmax(x21, numcolors)
|
|
x24 = palette(x22)
|
|
x25 = palette(x23)
|
|
x26 = intersection(x24, x25)
|
|
x27 = first(x26)
|
|
x28 = asindices(x22)
|
|
x29 = ofcolor(x22, x27)
|
|
x30 = difference(x28, x29)
|
|
x31 = asobject(x23)
|
|
x32 = matcher(first, x27)
|
|
x33 = sfilter(x31, x32)
|
|
x34 = difference(x31, x33)
|
|
x35 = shape(x22)
|
|
x36 = multiply(x35, x35)
|
|
x37 = canvas(x27, x36)
|
|
x38 = lbind(shift, x30)
|
|
x39 = lbind(multiply, x35)
|
|
x40 = chain(x38, x39, last)
|
|
x41 = fork(recolor, first, x40)
|
|
x42 = mapply(x41, x34)
|
|
x43 = paint(x37, x42)
|
|
return x43
|
|
|
|
|
|
def verify_b1948b0a(I: Grid) -> Grid:
|
|
x0 = replace(I, SIX, TWO)
|
|
return x0
|
|
|
|
|
|
def verify_b230c067(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = lbind(sfilter, x0)
|
|
x2 = lbind(matcher, normalize)
|
|
x3 = compose(x2, normalize)
|
|
x4 = chain(size, x1, x3)
|
|
x5 = argmin(x0, x4)
|
|
x6 = remove(x5, x0)
|
|
x7 = merge(x6)
|
|
x8 = fill(I, TWO, x5)
|
|
x9 = fill(x8, ONE, x7)
|
|
return x9
|
|
|
|
|
|
def verify_b27ca6d3(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = sizefilter(x0, TWO)
|
|
x2 = mapply(outbox, x1)
|
|
x3 = fill(I, THREE, x2)
|
|
return x3
|
|
|
|
|
|
def verify_b2862040(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = mostcolor(I)
|
|
x2 = colorfilter(x0, x1)
|
|
x3 = rbind(bordering, I)
|
|
x4 = compose(flip, x3)
|
|
x5 = mfilter(x2, x4)
|
|
x6 = difference(x0, x2)
|
|
x7 = apply(toindices, x6)
|
|
x8 = rbind(adjacent, x5)
|
|
x9 = mfilter(x7, x8)
|
|
x10 = fill(I, EIGHT, x9)
|
|
return x10
|
|
|
|
|
|
def verify_b527c5c6(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = lbind(matcher, first)
|
|
x2 = compose(x1, leastcolor)
|
|
x3 = fork(sfilter, identity, x2)
|
|
x4 = compose(center, x3)
|
|
x5 = compose(dneighbors, x4)
|
|
x6 = fork(difference, x5, toindices)
|
|
x7 = compose(first, x6)
|
|
x8 = fork(subtract, x7, x4)
|
|
x9 = compose(invert, x8)
|
|
x10 = fork(shoot, x4, x9)
|
|
x11 = fork(intersection, toindices, x10)
|
|
x12 = chain(decrement, size, x11)
|
|
x13 = fork(shoot, x4, x8)
|
|
x14 = lbind(power, outbox)
|
|
x15 = compose(x14, x12)
|
|
x16 = compose(initset, x15)
|
|
x17 = fork(rapply, x16, x13)
|
|
x18 = chain(backdrop, first, x17)
|
|
x19 = fork(recolor, leastcolor, x13)
|
|
x20 = fork(difference, x18, x13)
|
|
x21 = fork(recolor, mostcolor, x20)
|
|
x22 = fork(combine, x19, x21)
|
|
x23 = mapply(x22, x0)
|
|
x24 = paint(I, x23)
|
|
return x24
|
|
|
|
|
|
def verify_b548a754(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(equality, toindices, box)
|
|
x2 = fork(multiply, height, width)
|
|
x3 = fork(equality, size, x2)
|
|
x4 = compose(flip, x3)
|
|
x5 = fork(both, x1, x4)
|
|
x6 = extract(x0, x5)
|
|
x7 = inbox(x6)
|
|
x8 = backdrop(x7)
|
|
x9 = toobject(x8, I)
|
|
x10 = remove(x9, x0)
|
|
x11 = remove(x6, x10)
|
|
x12 = argmin(x11, size)
|
|
x13 = combine(x12, x6)
|
|
x14 = backdrop(x13)
|
|
x15 = color(x9)
|
|
x16 = fill(I, x15, x14)
|
|
x17 = color(x6)
|
|
x18 = box(x14)
|
|
x19 = fill(x16, x17, x18)
|
|
return x19
|
|
|
|
|
|
def verify_b60334d2(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = mostcolor(I)
|
|
x2 = ofcolor(I, x0)
|
|
x3 = replace(I, x0, x1)
|
|
x4 = mapply(dneighbors, x2)
|
|
x5 = mapply(ineighbors, x2)
|
|
x6 = fill(x3, ONE, x4)
|
|
x7 = fill(x6, x0, x5)
|
|
return x7
|
|
|
|
|
|
def verify_b6afb2da(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = compose(flip, x1)
|
|
x3 = extract(x0, x2)
|
|
x4 = color(x3)
|
|
x5 = matcher(color, x4)
|
|
x6 = compose(flip, x5)
|
|
x7 = sfilter(x0, x6)
|
|
x8 = merge(x7)
|
|
x9 = fill(I, TWO, x8)
|
|
x10 = mapply(box, x7)
|
|
x11 = fill(x9, FOUR, x10)
|
|
x12 = mapply(corners, x7)
|
|
x13 = fill(x11, ONE, x12)
|
|
return x13
|
|
|
|
|
|
def verify_b7249182(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = merge(x0)
|
|
x2 = portrait(x1)
|
|
x3 = branch(x2, identity, dmirror)
|
|
x4 = x3(I)
|
|
x5 = objects(x4, T, F, T)
|
|
x6 = order(x5, uppermost)
|
|
x7 = first(x6)
|
|
x8 = last(x6)
|
|
x9 = color(x7)
|
|
x10 = color(x8)
|
|
x11 = compose(first, toindices)
|
|
x12 = x11(x7)
|
|
x13 = x11(x8)
|
|
x14 = connect(x12, x13)
|
|
x15 = centerofmass(x14)
|
|
x16 = connect(x12, x15)
|
|
x17 = fill(x4, x10, x14)
|
|
x18 = fill(x17, x9, x16)
|
|
x19 = add(x15, DOWN)
|
|
x20 = initset(x15)
|
|
x21 = insert(x19, x20)
|
|
x22 = toobject(x21, x18)
|
|
x23 = astuple(ZERO, NEG_TWO)
|
|
x24 = shift(x22, ZERO_BY_TWO)
|
|
x25 = shift(x22, x23)
|
|
x26 = combine(x24, x25)
|
|
x27 = ulcorner(x26)
|
|
x28 = urcorner(x26)
|
|
x29 = connect(x27, x28)
|
|
x30 = shift(x29, UP)
|
|
x31 = llcorner(x26)
|
|
x32 = lrcorner(x26)
|
|
x33 = connect(x31, x32)
|
|
x34 = shift(x33, DOWN)
|
|
x35 = paint(x18, x26)
|
|
x36 = fill(x35, x9, x30)
|
|
x37 = fill(x36, x10, x34)
|
|
x38 = cover(x37, x21)
|
|
x39 = x3(x38)
|
|
return x39
|
|
|
|
|
|
def verify_b775ac94(I: Grid) -> Grid:
|
|
x0 = objects(I, F, T, T)
|
|
x1 = neighbors(ORIGIN)
|
|
x2 = lbind(extract, x1)
|
|
x3 = matcher(first, ZERO)
|
|
x4 = matcher(last, ZERO)
|
|
x5 = rbind(branch, hmirror)
|
|
x6 = rbind(x5, identity)
|
|
x7 = rbind(branch, vmirror)
|
|
x8 = rbind(x7, identity)
|
|
x9 = compose(x6, x3)
|
|
x10 = compose(x8, x4)
|
|
x11 = fork(compose, x9, x10)
|
|
x12 = lbind(matcher, first)
|
|
x13 = compose(x12, mostcolor)
|
|
x14 = fork(sfilter, identity, x13)
|
|
x15 = fork(difference, identity, x14)
|
|
x16 = lbind(rbind, multiply)
|
|
x17 = chain(x16, shape, x14)
|
|
x18 = lbind(lbind, shift)
|
|
x19 = chain(x18, backdrop, x14)
|
|
x20 = fork(compose, x19, x17)
|
|
x21 = lbind(lbind, contained)
|
|
x22 = compose(x21, last)
|
|
x23 = rbind(compose, x22)
|
|
x24 = lbind(rbind, compose)
|
|
x25 = chain(x23, x24, x20)
|
|
x26 = lbind(fork, recolor)
|
|
x27 = lbind(x26, first)
|
|
x28 = lbind(fork, shift)
|
|
x29 = lbind(chain, x11)
|
|
x30 = lbind(x29, x2)
|
|
x31 = rbind(compose, x2)
|
|
x32 = compose(x31, x17)
|
|
x33 = fork(compose, x32, x25)
|
|
x34 = compose(x30, x25)
|
|
x35 = lbind(chain, first)
|
|
x36 = lbind(rbind, rapply)
|
|
x37 = compose(x36, x14)
|
|
x38 = lbind(compose, initset)
|
|
x39 = compose(x38, x34)
|
|
x40 = fork(x35, x37, x39)
|
|
x41 = compose(x27, x40)
|
|
x42 = fork(x28, x41, x33)
|
|
x43 = fork(mapply, x42, x15)
|
|
x44 = mapply(x43, x0)
|
|
x45 = paint(I, x44)
|
|
return x45
|
|
|
|
|
|
def verify_b782dc8a(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = lbind(colorcount, I)
|
|
x4 = argmin(x2, x3)
|
|
x5 = ofcolor(I, x0)
|
|
x6 = ofcolor(I, x4)
|
|
x7 = combine(x5, x6)
|
|
x8 = mapply(neighbors, x7)
|
|
x9 = difference(x8, x7)
|
|
x10 = toobject(x9, I)
|
|
x11 = leastcolor(x10)
|
|
x12 = ofcolor(I, x0)
|
|
x13 = first(x12)
|
|
x14 = initset(x13)
|
|
x15 = objects(I, T, F, F)
|
|
x16 = colorfilter(x15, x11)
|
|
x17 = lbind(adjacent, x7)
|
|
x18 = mfilter(x16, x17)
|
|
x19 = toindices(x18)
|
|
x20 = rbind(manhattan, x14)
|
|
x21 = chain(even, x20, initset)
|
|
x22 = sfilter(x19, x21)
|
|
x23 = fill(I, x4, x19)
|
|
x24 = fill(x23, x0, x22)
|
|
return x24
|
|
|
|
|
|
def verify_b8825c91(I: Grid) -> Grid:
|
|
x0 = replace(I, FOUR, NEG_ONE)
|
|
x1 = dmirror(x0)
|
|
x2 = papply(pair, x0, x1)
|
|
x3 = lbind(apply, maximum)
|
|
x4 = apply(x3, x2)
|
|
x5 = cmirror(x4)
|
|
x6 = papply(pair, x4, x5)
|
|
x7 = apply(x3, x6)
|
|
x8 = hmirror(x7)
|
|
x9 = papply(pair, x7, x8)
|
|
x10 = apply(x3, x9)
|
|
x11 = vmirror(x10)
|
|
x12 = papply(pair, x11, x10)
|
|
x13 = apply(x3, x12)
|
|
return x13
|
|
|
|
|
|
def verify_b8cdaf2b(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = astuple(dmirror, cmirror)
|
|
x2 = astuple(hmirror, identity)
|
|
x3 = combine(x1, x2)
|
|
x4 = rbind(rapply, I)
|
|
x5 = chain(first, x4, initset)
|
|
x6 = rbind(ofcolor, x0)
|
|
x7 = chain(lowermost, x6, x5)
|
|
x8 = chain(decrement, height, x5)
|
|
x9 = fork(equality, x7, x8)
|
|
x10 = extract(x3, x9)
|
|
x11 = x10(I)
|
|
x12 = ofcolor(x11, x0)
|
|
x13 = shift(x12, UP)
|
|
x14 = ulcorner(x13)
|
|
x15 = urcorner(x13)
|
|
x16 = shoot(x14, NEG_UNITY)
|
|
x17 = shoot(x15, UP_RIGHT)
|
|
x18 = combine(x16, x17)
|
|
x19 = underfill(x11, x0, x18)
|
|
x20 = x10(x19)
|
|
return x20
|
|
|
|
|
|
def verify_b91ae062(I: Grid) -> Grid:
|
|
x0 = numcolors(I)
|
|
x1 = decrement(x0)
|
|
x2 = upscale(I, x1)
|
|
return x2
|
|
|
|
|
|
def verify_b94a9452(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = remove(x2, x0)
|
|
x4 = merge(x3)
|
|
x5 = subgrid(x4, I)
|
|
x6 = mostcolor(x5)
|
|
x7 = leastcolor(x5)
|
|
x8 = switch(x5, x6, x7)
|
|
return x8
|
|
|
|
|
|
def verify_b9b7f026(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = compose(flip, x1)
|
|
x3 = extract(x0, x2)
|
|
x4 = color(x3)
|
|
x5 = canvas(x4, UNITY)
|
|
return x5
|
|
|
|
|
|
def verify_ba26e723(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = matcher(first, ZERO)
|
|
x2 = compose(flip, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = rbind(multiply, THREE)
|
|
x5 = rbind(divide, THREE)
|
|
x6 = compose(x4, x5)
|
|
x7 = fork(equality, identity, x6)
|
|
x8 = toindices(x3)
|
|
x9 = compose(x7, last)
|
|
x10 = sfilter(x8, x9)
|
|
x11 = fill(I, SIX, x10)
|
|
return x11
|
|
|
|
|
|
def verify_ba97ae07(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = mostcommon(x2)
|
|
x4 = ofcolor(I, x3)
|
|
x5 = backdrop(x4)
|
|
x6 = fill(I, x3, x5)
|
|
return x6
|
|
|
|
|
|
def verify_bb43febb(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(equality, toindices, backdrop)
|
|
x2 = rbind(greater, ONE)
|
|
x3 = chain(x2, minimum, shape)
|
|
x4 = fork(both, x1, x3)
|
|
x5 = sfilter(x0, x4)
|
|
x6 = compose(backdrop, inbox)
|
|
x7 = mapply(x6, x5)
|
|
x8 = fill(I, TWO, x7)
|
|
return x8
|
|
|
|
|
|
def verify_bbc9ae5d(I: Grid) -> Grid:
|
|
x0 = index(I, ORIGIN)
|
|
x1 = width(I)
|
|
x2 = halve(x1)
|
|
x3 = astuple(x2, x1)
|
|
x4 = canvas(x0, x3)
|
|
x5 = rbind(shoot, UNITY)
|
|
x6 = compose(x5, last)
|
|
x7 = fork(recolor, first, x6)
|
|
x8 = asobject(I)
|
|
x9 = mapply(x7, x8)
|
|
x10 = paint(x4, x9)
|
|
return x10
|
|
|
|
|
|
def verify_bc1d5164(I: Grid) -> Grid:
|
|
x0 = height(I)
|
|
x1 = halve(x0)
|
|
x2 = increment(x1)
|
|
x3 = width(I)
|
|
x4 = halve(x3)
|
|
x5 = frontiers(I)
|
|
x6 = merge(x5)
|
|
x7 = mostcolor(x6)
|
|
x8 = astuple(x2, x4)
|
|
x9 = canvas(x7, x8)
|
|
x10 = asindices(x9)
|
|
x11 = toobject(x10, I)
|
|
x12 = increment(x4)
|
|
x13 = tojvec(x12)
|
|
x14 = shift(x10, x13)
|
|
x15 = toobject(x14, I)
|
|
x16 = decrement(x2)
|
|
x17 = toivec(x16)
|
|
x18 = shift(x10, x17)
|
|
x19 = toobject(x18, I)
|
|
x20 = decrement(x2)
|
|
x21 = increment(x4)
|
|
x22 = astuple(x20, x21)
|
|
x23 = shift(x10, x22)
|
|
x24 = toobject(x23, I)
|
|
x25 = palette(I)
|
|
x26 = other(x25, x7)
|
|
x27 = matcher(first, x26)
|
|
x28 = rbind(sfilter, x27)
|
|
x29 = chain(toindices, x28, normalize)
|
|
x30 = x29(x11)
|
|
x31 = x29(x15)
|
|
x32 = x29(x19)
|
|
x33 = x29(x24)
|
|
x34 = combine(x30, x31)
|
|
x35 = combine(x32, x33)
|
|
x36 = combine(x34, x35)
|
|
x37 = fill(x9, x26, x36)
|
|
return x37
|
|
|
|
|
|
def verify_bd4472b8(I: Grid) -> Grid:
|
|
x0 = compose(positive, size)
|
|
x1 = rbind(sfilter, hline)
|
|
x2 = chain(x0, x1, frontiers)
|
|
x3 = chain(size, dedupe, first)
|
|
x4 = chain(size, dedupe, last)
|
|
x5 = fork(greater, x3, x4)
|
|
x6 = fork(both, x2, x5)
|
|
x7 = astuple(identity, rot90)
|
|
x8 = astuple(rot180, rot270)
|
|
x9 = combine(x7, x8)
|
|
x10 = astuple(identity, rot270)
|
|
x11 = astuple(rot180, rot90)
|
|
x12 = combine(x10, x11)
|
|
x13 = pair(x9, x12)
|
|
x14 = rbind(rapply, I)
|
|
x15 = compose(initset, first)
|
|
x16 = chain(first, x14, x15)
|
|
x17 = compose(x6, x16)
|
|
x18 = extract(x13, x17)
|
|
x19 = first(x18)
|
|
x20 = last(x18)
|
|
x21 = x19(I)
|
|
x22 = first(x21)
|
|
x23 = repeat(x22, ONE)
|
|
x24 = dmirror(x23)
|
|
x25 = width(x21)
|
|
x26 = hupscale(x24, x25)
|
|
x27 = asobject(x26)
|
|
x28 = height(x21)
|
|
x29 = height(x27)
|
|
x30 = interval(ZERO, x28, x29)
|
|
x31 = lbind(shift, x27)
|
|
x32 = apply(toivec, x30)
|
|
x33 = mapply(x31, x32)
|
|
x34 = shift(x33, TWO_BY_ZERO)
|
|
x35 = paint(x21, x34)
|
|
x36 = x20(x35)
|
|
return x36
|
|
|
|
|
|
def verify_bda2d7a6(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = compose(maximum, shape)
|
|
x2 = order(x0, x1)
|
|
x3 = first(x2)
|
|
x4 = last(x2)
|
|
x5 = color(x3)
|
|
x6 = color(x4)
|
|
x7 = equality(x5, x6)
|
|
x8 = combine(x3, x4)
|
|
x9 = repeat(x8, ONE)
|
|
x10 = remove(x3, x2)
|
|
x11 = remove(x4, x10)
|
|
x12 = combine(x9, x11)
|
|
x13 = branch(x7, x12, x2)
|
|
x14 = apply(color, x13)
|
|
x15 = last(x13)
|
|
x16 = remove(x15, x13)
|
|
x17 = repeat(x15, ONE)
|
|
x18 = combine(x17, x16)
|
|
x19 = mpapply(recolor, x14, x18)
|
|
x20 = paint(I, x19)
|
|
return x20
|
|
|
|
|
|
def verify_bdad9b1f(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = sfilter(x0, vline)
|
|
x3 = compose(hfrontier, center)
|
|
x4 = fork(recolor, color, x3)
|
|
x5 = mapply(x4, x1)
|
|
x6 = compose(vfrontier, center)
|
|
x7 = fork(recolor, color, x6)
|
|
x8 = mapply(x7, x2)
|
|
x9 = combine(x5, x8)
|
|
x10 = paint(I, x9)
|
|
x11 = toindices(x5)
|
|
x12 = toindices(x8)
|
|
x13 = intersection(x11, x12)
|
|
x14 = fill(x10, FOUR, x13)
|
|
return x14
|
|
|
|
|
|
def verify_be94b721(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = argmax(x0, size)
|
|
x2 = color(x1)
|
|
x3 = remove(x1, x0)
|
|
x4 = argmax(x3, size)
|
|
x5 = shape(x4)
|
|
x6 = canvas(x2, x5)
|
|
x7 = normalize(x4)
|
|
x8 = paint(x6, x7)
|
|
return x8
|
|
|
|
|
|
def verify_beb8660c(I: Grid) -> Grid:
|
|
x0 = astuple(identity, rot90)
|
|
x1 = astuple(rot180, rot270)
|
|
x2 = combine(x0, x1)
|
|
x3 = astuple(identity, rot270)
|
|
x4 = astuple(rot180, rot90)
|
|
x5 = combine(x3, x4)
|
|
x6 = pair(x2, x5)
|
|
x7 = rbind(rapply, I)
|
|
x8 = compose(initset, first)
|
|
x9 = chain(first, x7, x8)
|
|
x10 = rbind(ofcolor, EIGHT)
|
|
x11 = chain(lowermost, x10, x9)
|
|
x12 = matcher(x11, ZERO)
|
|
x13 = extract(x6, x12)
|
|
x14 = first(x13)
|
|
x15 = last(x13)
|
|
x16 = x14(I)
|
|
x17 = rot180(x16)
|
|
x18 = shape(x17)
|
|
x19 = lbind(apply, first)
|
|
x20 = lbind(ofcolor, x17)
|
|
x21 = chain(size, x19, x20)
|
|
x22 = palette(I)
|
|
x23 = argmax(x22, x21)
|
|
x24 = partition(x17)
|
|
x25 = matcher(color, x23)
|
|
x26 = compose(flip, x25)
|
|
x27 = sfilter(x24, x26)
|
|
x28 = compose(invert, size)
|
|
x29 = order(x27, x28)
|
|
x30 = apply(normalize, x29)
|
|
x31 = size(x30)
|
|
x32 = interval(ZERO, x31, ONE)
|
|
x33 = apply(toivec, x32)
|
|
x34 = mpapply(shift, x30, x33)
|
|
x35 = canvas(x23, x18)
|
|
x36 = paint(x35, x34)
|
|
x37 = x15(x36)
|
|
return x37
|
|
|
|
|
|
def verify_c0f76784(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = mostcolor(I)
|
|
x2 = colorfilter(x0, x1)
|
|
x3 = sizefilter(x2, ONE)
|
|
x4 = merge(x3)
|
|
x5 = sizefilter(x2, FOUR)
|
|
x6 = merge(x5)
|
|
x7 = sizefilter(x2, NINE)
|
|
x8 = merge(x7)
|
|
x9 = fill(I, SIX, x4)
|
|
x10 = fill(x9, SEVEN, x6)
|
|
x11 = fill(x10, EIGHT, x8)
|
|
return x11
|
|
|
|
|
|
def verify_c1d99e64(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = fill(I, TWO, x1)
|
|
return x2
|
|
|
|
|
|
def verify_c3e719e8(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = multiply(x0, x0)
|
|
x2 = canvas(ZERO, x1)
|
|
x3 = mostcolor(I)
|
|
x4 = ofcolor(I, x3)
|
|
x5 = lbind(multiply, x0)
|
|
x6 = apply(x5, x4)
|
|
x7 = asobject(I)
|
|
x8 = lbind(shift, x7)
|
|
x9 = mapply(x8, x6)
|
|
x10 = paint(x2, x9)
|
|
return x10
|
|
|
|
|
|
def verify_c3f564a4(I: Grid) -> Grid:
|
|
x0 = height(I)
|
|
x1 = vsplit(I, x0)
|
|
x2 = apply(asobject, x1)
|
|
x3 = apply(hperiod, x2)
|
|
x4 = minimum(x3)
|
|
x5 = width(I)
|
|
x6 = hsplit(I, x5)
|
|
x7 = apply(asobject, x6)
|
|
x8 = apply(vperiod, x7)
|
|
x9 = minimum(x8)
|
|
x10 = matcher(hperiod, x4)
|
|
x11 = sfilter(x2, x10)
|
|
x12 = mapply(palette, x11)
|
|
x13 = matcher(vperiod, x9)
|
|
x14 = sfilter(x7, x13)
|
|
x15 = mapply(palette, x14)
|
|
x16 = palette(I)
|
|
x17 = combine(x12, x15)
|
|
x18 = rbind(contained, x17)
|
|
x19 = argmin(x16, x18)
|
|
x20 = asobject(I)
|
|
x21 = matcher(first, x19)
|
|
x22 = compose(flip, x21)
|
|
x23 = sfilter(x20, x22)
|
|
x24 = height(I)
|
|
x25 = divide(x24, x9)
|
|
x26 = increment(x25)
|
|
x27 = width(I)
|
|
x28 = divide(x27, x4)
|
|
x29 = increment(x28)
|
|
x30 = invert(x26)
|
|
x31 = interval(x30, x26, ONE)
|
|
x32 = invert(x29)
|
|
x33 = interval(x32, x29, ONE)
|
|
x34 = product(x31, x33)
|
|
x35 = astuple(x9, x4)
|
|
x36 = lbind(multiply, x35)
|
|
x37 = apply(x36, x34)
|
|
x38 = lbind(shift, x23)
|
|
x39 = mapply(x38, x37)
|
|
x40 = paint(I, x39)
|
|
return x40
|
|
|
|
|
|
def verify_c444b776(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = leastcolor(x1)
|
|
x3 = shape(I)
|
|
x4 = canvas(x2, x3)
|
|
x5 = hconcat(I, x4)
|
|
x6 = objects(x5, F, F, T)
|
|
x7 = argmax(x6, numcolors)
|
|
x8 = apply(ulcorner, x6)
|
|
x9 = normalize(x7)
|
|
x10 = lbind(shift, x9)
|
|
x11 = mapply(x10, x8)
|
|
x12 = paint(I, x11)
|
|
return x12
|
|
|
|
|
|
def verify_c59eb873(I: Grid) -> Grid:
|
|
x0 = upscale(I, TWO)
|
|
return x0
|
|
|
|
|
|
def verify_c8cbb738(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = valmax(x0, height)
|
|
x2 = valmax(x0, width)
|
|
x3 = astuple(x1, x2)
|
|
x4 = mostcolor(I)
|
|
x5 = canvas(x4, x3)
|
|
x6 = asindices(x5)
|
|
x7 = apply(normalize, x0)
|
|
x8 = box(x6)
|
|
x9 = maximum(x3)
|
|
x10 = double(x9)
|
|
x11 = asindices(x5)
|
|
x12 = center(x11)
|
|
x13 = initset(x12)
|
|
x14 = lbind(manhattan, x13)
|
|
x15 = lbind(multiply, x10)
|
|
x16 = lbind(intersection, x8)
|
|
x17 = chain(x15, size, x16)
|
|
x18 = lbind(fork, subtract)
|
|
x19 = lbind(chain, x17)
|
|
x20 = lbind(x19, toindices)
|
|
x21 = lbind(lbind, shift)
|
|
x22 = compose(x20, x21)
|
|
x23 = lbind(chain, x14)
|
|
x24 = compose(initset, center)
|
|
x25 = lbind(x23, x24)
|
|
x26 = lbind(lbind, shift)
|
|
x27 = compose(x25, x26)
|
|
x28 = lbind(argmax, x6)
|
|
x29 = fork(x18, x22, x27)
|
|
x30 = compose(x28, x29)
|
|
x31 = fork(shift, identity, x30)
|
|
x32 = mapply(x31, x7)
|
|
x33 = paint(x5, x32)
|
|
return x33
|
|
|
|
|
|
def verify_c8f0f002(I: Grid) -> Grid:
|
|
x0 = replace(I, SEVEN, FIVE)
|
|
return x0
|
|
|
|
|
|
def verify_c909285e(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = lbind(contained, ONE)
|
|
x2 = chain(flip, x1, shape)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = fork(equality, toindices, box)
|
|
x5 = sfilter(x3, x4)
|
|
x6 = fork(multiply, height, width)
|
|
x7 = argmin(x5, x6)
|
|
x8 = subgrid(x7, I)
|
|
return x8
|
|
|
|
|
|
def verify_c9e6f938(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = hconcat(I, x0)
|
|
return x1
|
|
|
|
|
|
def verify_c9f8e694(I: Grid) -> Grid:
|
|
x0 = astuple(identity, dmirror)
|
|
x1 = astuple(cmirror, vmirror)
|
|
x2 = combine(x0, x1)
|
|
x3 = compose(first, dmirror)
|
|
x4 = chain(size, dedupe, x3)
|
|
x5 = rbind(rapply, I)
|
|
x6 = compose(first, x5)
|
|
x7 = chain(x4, x6, initset)
|
|
x8 = argmax(x2, x7)
|
|
x9 = x8(I)
|
|
x10 = height(x9)
|
|
x11 = width(x9)
|
|
x12 = ofcolor(x9, ZERO)
|
|
x13 = astuple(x10, ONE)
|
|
x14 = crop(x9, ORIGIN, x13)
|
|
x15 = hupscale(x14, x11)
|
|
x16 = fill(x15, ZERO, x12)
|
|
x17 = x8(x16)
|
|
return x17
|
|
|
|
|
|
def verify_caa06a1f(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = asobject(I)
|
|
x5 = matcher(first, x3)
|
|
x6 = compose(flip, x5)
|
|
x7 = sfilter(x4, x6)
|
|
x8 = hperiod(x7)
|
|
x9 = vperiod(x7)
|
|
x10 = width(I)
|
|
x11 = width(x7)
|
|
x12 = subtract(x10, x11)
|
|
x13 = add(x12, TWO)
|
|
x14 = height(I)
|
|
x15 = height(x7)
|
|
x16 = subtract(x14, x15)
|
|
x17 = add(x16, TWO)
|
|
x18 = rbind(multiply, x8)
|
|
x19 = invert(x13)
|
|
x20 = interval(x19, x13, ONE)
|
|
x21 = apply(x18, x20)
|
|
x22 = rbind(multiply, x9)
|
|
x23 = invert(x17)
|
|
x24 = interval(x23, x17, ONE)
|
|
x25 = apply(x22, x24)
|
|
x26 = product(x25, x21)
|
|
x27 = lbind(shift, x7)
|
|
x28 = mapply(x27, x26)
|
|
x29 = index(I, ORIGIN)
|
|
x30 = equality(x29, x3)
|
|
x31 = flip(x30)
|
|
x32 = asindices(I)
|
|
x33 = urcorner(x32)
|
|
x34 = index(I, x33)
|
|
x35 = equality(x34, x3)
|
|
x36 = flip(x35)
|
|
x37 = asindices(I)
|
|
x38 = lrcorner(x37)
|
|
x39 = index(I, x38)
|
|
x40 = equality(x39, x3)
|
|
x41 = flip(x40)
|
|
x42 = asindices(I)
|
|
x43 = llcorner(x42)
|
|
x44 = index(I, x43)
|
|
x45 = equality(x44, x3)
|
|
x46 = flip(x45)
|
|
x47 = multiply(x31, LEFT)
|
|
x48 = multiply(x36, UP)
|
|
x49 = add(x47, x48)
|
|
x50 = multiply(x41, RIGHT)
|
|
x51 = multiply(x46, DOWN)
|
|
x52 = add(x50, x51)
|
|
x53 = add(x49, x52)
|
|
x54 = shift(x28, x53)
|
|
x55 = paint(I, x54)
|
|
return x55
|
|
|
|
|
|
def verify_cbded52d(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = palette(I)
|
|
x4 = remove(x2, x3)
|
|
x5 = lbind(colorcount, I)
|
|
x6 = argmax(x4, x5)
|
|
x7 = remove(x6, x4)
|
|
x8 = height(I)
|
|
x9 = increment(x8)
|
|
x10 = frontiers(I)
|
|
x11 = sfilter(x10, hline)
|
|
x12 = size(x11)
|
|
x13 = increment(x12)
|
|
x14 = divide(x9, x13)
|
|
x15 = width(I)
|
|
x16 = increment(x15)
|
|
x17 = frontiers(I)
|
|
x18 = sfilter(x17, vline)
|
|
x19 = size(x18)
|
|
x20 = increment(x19)
|
|
x21 = divide(x16, x20)
|
|
x22 = rbind(multiply, x14)
|
|
x23 = rbind(divide, x14)
|
|
x24 = compose(x22, x23)
|
|
x25 = fork(equality, identity, x24)
|
|
x26 = rbind(multiply, x21)
|
|
x27 = rbind(divide, x21)
|
|
x28 = compose(x26, x27)
|
|
x29 = fork(equality, identity, x28)
|
|
x30 = lbind(fork, both)
|
|
x31 = rbind(compose, first)
|
|
x32 = lbind(compose, x25)
|
|
x33 = lbind(rbind, subtract)
|
|
x34 = compose(x33, uppermost)
|
|
x35 = chain(x31, x32, x34)
|
|
x36 = rbind(compose, last)
|
|
x37 = lbind(compose, x29)
|
|
x38 = lbind(rbind, subtract)
|
|
x39 = compose(x38, leftmost)
|
|
x40 = chain(x36, x37, x39)
|
|
x41 = fork(x30, x35, x40)
|
|
x42 = fork(sfilter, identity, x41)
|
|
x43 = fork(connect, first, last)
|
|
x44 = lbind(apply, x43)
|
|
x45 = lbind(ofcolor, I)
|
|
x46 = fork(product, x45, x45)
|
|
x47 = fork(either, vline, hline)
|
|
x48 = rbind(sfilter, x47)
|
|
x49 = chain(x48, x44, x46)
|
|
x50 = lbind(mapply, x42)
|
|
x51 = compose(x50, x49)
|
|
x52 = fork(recolor, identity, x51)
|
|
x53 = mapply(x52, x7)
|
|
x54 = paint(I, x53)
|
|
return x54
|
|
|
|
|
|
def verify_cce03e0d(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = shape(I)
|
|
x2 = multiply(x1, x1)
|
|
x3 = canvas(ZERO, x2)
|
|
x4 = rbind(multiply, x1)
|
|
x5 = apply(x4, x0)
|
|
x6 = asobject(I)
|
|
x7 = lbind(shift, x6)
|
|
x8 = mapply(x7, x5)
|
|
x9 = paint(x3, x8)
|
|
return x9
|
|
|
|
|
|
def verify_cdecee7f(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = mostcolor(I)
|
|
x2 = matcher(first, x1)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x0, x3)
|
|
x5 = apply(initset, x4)
|
|
x6 = astuple(ONE, THREE)
|
|
x7 = size(x5)
|
|
x8 = order(x5, leftmost)
|
|
x9 = apply(color, x8)
|
|
x10 = rbind(canvas, UNITY)
|
|
x11 = apply(x10, x9)
|
|
x12 = merge(x11)
|
|
x13 = dmirror(x12)
|
|
x14 = subtract(NINE, x7)
|
|
x15 = astuple(ONE, x14)
|
|
x16 = mostcolor(I)
|
|
x17 = canvas(x16, x15)
|
|
x18 = hconcat(x13, x17)
|
|
x19 = hsplit(x18, THREE)
|
|
x20 = merge(x19)
|
|
x21 = crop(x20, ORIGIN, x6)
|
|
x22 = crop(x20, DOWN, x6)
|
|
x23 = crop(x20, TWO_BY_ZERO, x6)
|
|
x24 = vmirror(x22)
|
|
x25 = vconcat(x21, x24)
|
|
x26 = vconcat(x25, x23)
|
|
return x26
|
|
|
|
|
|
def verify_ce22a75a(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = apply(initset, x1)
|
|
x3 = apply(outbox, x2)
|
|
x4 = mapply(backdrop, x3)
|
|
x5 = fill(I, ONE, x4)
|
|
return x5
|
|
|
|
|
|
def verify_ce4f8723(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, tophalf, lefthalf)
|
|
x5 = branch(x3, bottomhalf, righthalf)
|
|
x6 = x4(I)
|
|
x7 = x5(I)
|
|
x8 = palette(x6)
|
|
x9 = palette(x7)
|
|
x10 = intersection(x8, x9)
|
|
x11 = first(x10)
|
|
x12 = shape(x6)
|
|
x13 = canvas(x11, x12)
|
|
x14 = palette(x6)
|
|
x15 = other(x14, x11)
|
|
x16 = palette(x7)
|
|
x17 = other(x16, x11)
|
|
x18 = ofcolor(x6, x15)
|
|
x19 = ofcolor(x7, x17)
|
|
x20 = combine(x18, x19)
|
|
x21 = fill(x13, THREE, x20)
|
|
return x21
|
|
|
|
|
|
def verify_ce602527(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = rbind(bordering, I)
|
|
x2 = extract(x0, x1)
|
|
x3 = remove(x2, x0)
|
|
x4 = totuple(x3)
|
|
x5 = first(x4)
|
|
x6 = last(x4)
|
|
x7 = color(x5)
|
|
x8 = mostcolor(I)
|
|
x9 = shape(x5)
|
|
x10 = canvas(x8, x9)
|
|
x11 = normalize(x5)
|
|
x12 = paint(x10, x11)
|
|
x13 = upscale(x12, TWO)
|
|
x14 = shape(x6)
|
|
x15 = canvas(x8, x14)
|
|
x16 = normalize(x6)
|
|
x17 = paint(x15, x16)
|
|
x18 = upscale(x17, TWO)
|
|
x19 = shape(x2)
|
|
x20 = canvas(x8, x19)
|
|
x21 = normalize(x2)
|
|
x22 = paint(x20, x21)
|
|
x23 = color(x2)
|
|
x24 = replace(x22, x23, x7)
|
|
x25 = asobject(x24)
|
|
x26 = occurrences(x13, x25)
|
|
x27 = size(x26)
|
|
x28 = positive(x27)
|
|
x29 = downscale(x13, TWO)
|
|
x30 = downscale(x18, TWO)
|
|
x31 = branch(x28, x29, x30)
|
|
return x31
|
|
|
|
|
|
def verify_ce9e57f2(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = asindices(I)
|
|
x2 = outbox(x1)
|
|
x3 = lbind(adjacent, x2)
|
|
x4 = compose(x3, initset)
|
|
x5 = rbind(extract, x4)
|
|
x6 = compose(x5, toindices)
|
|
x7 = rbind(compose, initset)
|
|
x8 = lbind(rbind, manhattan)
|
|
x9 = chain(x7, x8, initset)
|
|
x10 = lbind(lbind, greater)
|
|
x11 = chain(x10, halve, size)
|
|
x12 = compose(x9, x6)
|
|
x13 = fork(compose, x11, x12)
|
|
x14 = fork(sfilter, toindices, x13)
|
|
x15 = mapply(x14, x0)
|
|
x16 = fill(I, EIGHT, x15)
|
|
return x16
|
|
|
|
|
|
def verify_cf98881b(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = increment(x0)
|
|
x2 = divide(x1, THREE)
|
|
x3 = decrement(x2)
|
|
x4 = height(I)
|
|
x5 = astuple(x4, x3)
|
|
x6 = crop(I, ORIGIN, x5)
|
|
x7 = add(x3, ONE)
|
|
x8 = tojvec(x7)
|
|
x9 = crop(I, x8, x5)
|
|
x10 = double(x3)
|
|
x11 = add(x10, TWO)
|
|
x12 = tojvec(x11)
|
|
x13 = crop(I, x12, x5)
|
|
x14 = palette(x6)
|
|
x15 = palette(x9)
|
|
x16 = palette(x13)
|
|
x17 = intersection(x14, x15)
|
|
x18 = intersection(x17, x16)
|
|
x19 = first(x18)
|
|
x20 = other(x14, x19)
|
|
x21 = other(x15, x19)
|
|
x22 = other(x16, x19)
|
|
x23 = canvas(x19, x5)
|
|
x24 = ofcolor(x6, x20)
|
|
x25 = ofcolor(x9, x21)
|
|
x26 = ofcolor(x13, x22)
|
|
x27 = fill(x23, x22, x26)
|
|
x28 = fill(x27, x21, x25)
|
|
x29 = fill(x28, x20, x24)
|
|
return x29
|
|
|
|
|
|
def verify_d037b0a7(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = rbind(shoot, DOWN)
|
|
x3 = compose(x2, last)
|
|
x4 = fork(recolor, first, x3)
|
|
x5 = mapply(x4, x1)
|
|
x6 = paint(I, x5)
|
|
return x6
|
|
|
|
|
|
def verify_d06dbe63(I: Grid) -> Grid:
|
|
x0 = double(TEN)
|
|
x1 = interval(ZERO, x0, ONE)
|
|
x2 = connect(ORIGIN, DOWN)
|
|
x3 = connect(ORIGIN, ZERO_BY_TWO)
|
|
x4 = combine(x2, x3)
|
|
x5 = astuple(NEG_TWO, TWO)
|
|
x6 = lbind(multiply, x5)
|
|
x7 = toivec(NEG_TWO)
|
|
x8 = apply(x6, x1)
|
|
x9 = rbind(subtract, TWO_BY_ZERO)
|
|
x10 = fork(ofcolor, identity, leastcolor)
|
|
x11 = chain(x9, center, x10)
|
|
x12 = rbind(mapply, x8)
|
|
x13 = lbind(lbind, shift)
|
|
x14 = lbind(shift, x4)
|
|
x15 = compose(x14, x11)
|
|
x16 = chain(x12, x13, x15)
|
|
x17 = lbind(recolor, FIVE)
|
|
x18 = compose(x17, x16)
|
|
x19 = fork(paint, identity, x18)
|
|
x20 = compose(rot180, x19)
|
|
x21 = fork(ofcolor, x20, leastcolor)
|
|
x22 = compose(center, x21)
|
|
x23 = fork(subtract, x22, x11)
|
|
x24 = fork(shift, x16, x23)
|
|
x25 = lbind(recolor, FIVE)
|
|
x26 = rbind(shift, x7)
|
|
x27 = chain(x25, x26, x24)
|
|
x28 = fork(paint, x20, x27)
|
|
x29 = compose(rot180, x28)
|
|
x30 = rbind(ofcolor, FIVE)
|
|
x31 = compose(x30, x29)
|
|
x32 = leastcolor(I)
|
|
x33 = ofcolor(I, x32)
|
|
x34 = mostcolor(I)
|
|
x35 = shape(I)
|
|
x36 = canvas(x34, x35)
|
|
x37 = lbind(paint, x36)
|
|
x38 = lbind(recolor, x32)
|
|
x39 = chain(x37, x38, initset)
|
|
x40 = compose(x31, x39)
|
|
x41 = mapply(x40, x33)
|
|
x42 = fill(I, FIVE, x41)
|
|
x43 = fill(x42, x32, x33)
|
|
return x43
|
|
|
|
|
|
def verify_d07ae81c(I: Grid) -> Grid:
|
|
x0 = lbind(ofcolor, I)
|
|
x1 = lbind(mapply, neighbors)
|
|
x2 = compose(x1, x0)
|
|
x3 = fork(intersection, x0, x2)
|
|
x4 = compose(size, x3)
|
|
x5 = palette(I)
|
|
x6 = matcher(x4, ZERO)
|
|
x7 = sfilter(x5, x6)
|
|
x8 = totuple(x7)
|
|
x9 = first(x8)
|
|
x10 = last(x8)
|
|
x11 = ofcolor(I, x9)
|
|
x12 = mapply(neighbors, x11)
|
|
x13 = toobject(x12, I)
|
|
x14 = mostcolor(x13)
|
|
x15 = ofcolor(I, x10)
|
|
x16 = mapply(neighbors, x15)
|
|
x17 = toobject(x16, I)
|
|
x18 = mostcolor(x17)
|
|
x19 = rbind(shoot, UNITY)
|
|
x20 = rbind(shoot, NEG_UNITY)
|
|
x21 = fork(combine, x19, x20)
|
|
x22 = rbind(shoot, UP_RIGHT)
|
|
x23 = rbind(shoot, DOWN_LEFT)
|
|
x24 = fork(combine, x22, x23)
|
|
x25 = fork(combine, x21, x24)
|
|
x26 = ofcolor(I, x10)
|
|
x27 = ofcolor(I, x9)
|
|
x28 = combine(x26, x27)
|
|
x29 = mapply(x25, x28)
|
|
x30 = ofcolor(I, x14)
|
|
x31 = intersection(x30, x29)
|
|
x32 = ofcolor(I, x18)
|
|
x33 = intersection(x32, x29)
|
|
x34 = fill(I, x9, x31)
|
|
x35 = fill(x34, x10, x33)
|
|
return x35
|
|
|
|
|
|
def verify_d0f5fe59(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = size(x0)
|
|
x2 = astuple(x1, x1)
|
|
x3 = mostcolor(I)
|
|
x4 = canvas(x3, x2)
|
|
x5 = shoot(ORIGIN, UNITY)
|
|
x6 = leastcolor(I)
|
|
x7 = fill(x4, x6, x5)
|
|
return x7
|
|
|
|
|
|
def verify_d10ecb37(I: Grid) -> Grid:
|
|
x0 = crop(I, ORIGIN, TWO_BY_TWO)
|
|
return x0
|
|
|
|
|
|
def verify_d13f3404(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = mostcolor(I)
|
|
x2 = matcher(first, x1)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x0, x3)
|
|
x5 = apply(initset, x4)
|
|
x6 = rbind(shoot, UNITY)
|
|
x7 = compose(x6, center)
|
|
x8 = fork(recolor, color, x7)
|
|
x9 = mapply(x8, x5)
|
|
x10 = shape(I)
|
|
x11 = double(x10)
|
|
x12 = mostcolor(I)
|
|
x13 = canvas(x12, x11)
|
|
x14 = paint(x13, x9)
|
|
return x14
|
|
|
|
|
|
def verify_d22278a0(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = repeat(NEG_ONE, ONE)
|
|
x4 = combine(x2, x3)
|
|
x5 = multiply(TEN, TEN)
|
|
x6 = apply(center, x1)
|
|
x7 = astuple(x5, x5)
|
|
x8 = repeat(x7, ONE)
|
|
x9 = combine(x6, x8)
|
|
x10 = identity(I)
|
|
x11 = asindices(I)
|
|
x12 = shape(I)
|
|
x13 = maximum(x12)
|
|
x14 = halve(x13)
|
|
x15 = add(TWO, x14)
|
|
x16 = interval(ONE, x15, ONE)
|
|
x17 = compose(outbox, outbox)
|
|
x18 = lbind(power, x17)
|
|
x19 = apply(x18, x16)
|
|
x20 = lbind(rapply, x19)
|
|
x21 = chain(merge, x20, initset)
|
|
x22 = fork(combine, initset, x21)
|
|
x23 = lbind(rbind, manhattan)
|
|
x24 = rbind(chain, initset)
|
|
x25 = rbind(x24, x23)
|
|
x26 = lbind(rbind, apply)
|
|
x27 = lbind(apply, initset)
|
|
x28 = rbind(remove, x9)
|
|
x29 = chain(x25, x26, x27)
|
|
x30 = chain(x29, x28, last)
|
|
x31 = lbind(sfilter, x11)
|
|
x32 = rbind(compose, initset)
|
|
x33 = lbind(compose, minimum)
|
|
x34 = lbind(fork, greater)
|
|
x35 = compose(x33, x30)
|
|
x36 = compose(initset, last)
|
|
x37 = chain(x32, x23, x36)
|
|
x38 = fork(x34, x35, x37)
|
|
x39 = compose(x31, x38)
|
|
x40 = compose(x22, last)
|
|
x41 = fork(intersection, x39, x40)
|
|
x42 = fork(recolor, first, x41)
|
|
x43 = pair(x4, x9)
|
|
x44 = mapply(x42, x43)
|
|
x45 = paint(x10, x44)
|
|
return x45
|
|
|
|
|
|
def verify_d23f8c26(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = matcher(first, x0)
|
|
x2 = compose(flip, x1)
|
|
x3 = width(I)
|
|
x4 = halve(x3)
|
|
x5 = compose(last, last)
|
|
x6 = matcher(x5, x4)
|
|
x7 = compose(flip, x6)
|
|
x8 = asobject(I)
|
|
x9 = fork(both, x2, x7)
|
|
x10 = sfilter(x8, x9)
|
|
x11 = fill(I, x0, x10)
|
|
return x11
|
|
|
|
|
|
def verify_d2abd087(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = matcher(size, SIX)
|
|
x2 = compose(flip, x1)
|
|
x3 = mfilter(x0, x1)
|
|
x4 = mfilter(x0, x2)
|
|
x5 = fill(I, TWO, x3)
|
|
x6 = fill(x5, ONE, x4)
|
|
return x6
|
|
|
|
|
|
def verify_d364b489(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = toindices(x1)
|
|
x3 = shift(x2, DOWN)
|
|
x4 = fill(I, EIGHT, x3)
|
|
x5 = shift(x2, UP)
|
|
x6 = fill(x4, TWO, x5)
|
|
x7 = shift(x2, RIGHT)
|
|
x8 = fill(x6, SIX, x7)
|
|
x9 = shift(x2, LEFT)
|
|
x10 = fill(x8, SEVEN, x9)
|
|
return x10
|
|
|
|
|
|
def verify_d406998b(I: Grid) -> Grid:
|
|
x0 = vmirror(I)
|
|
x1 = fgpartition(x0)
|
|
x2 = merge(x1)
|
|
x3 = toindices(x2)
|
|
x4 = compose(double, halve)
|
|
x5 = fork(equality, identity, x4)
|
|
x6 = compose(x5, last)
|
|
x7 = sfilter(x3, x6)
|
|
x8 = fill(x0, THREE, x7)
|
|
x9 = vmirror(x8)
|
|
return x9
|
|
|
|
|
|
def verify_d43fd935(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = asobject(I)
|
|
x2 = matcher(first, x0)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = partition(I)
|
|
x6 = fork(multiply, height, width)
|
|
x7 = fork(equality, size, x6)
|
|
x8 = sfilter(x5, x7)
|
|
x9 = argmax(x8, size)
|
|
x10 = difference(x4, x9)
|
|
x11 = apply(initset, x10)
|
|
x12 = rbind(hmatching, x9)
|
|
x13 = rbind(vmatching, x9)
|
|
x14 = fork(either, x12, x13)
|
|
x15 = sfilter(x11, x14)
|
|
x16 = rbind(gravitate, x9)
|
|
x17 = fork(add, center, x16)
|
|
x18 = fork(connect, center, x17)
|
|
x19 = fork(recolor, color, x18)
|
|
x20 = mapply(x19, x15)
|
|
x21 = paint(I, x20)
|
|
return x21
|
|
|
|
|
|
def verify_d4469b4b(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = contained(ONE, x0)
|
|
x2 = contained(TWO, x0)
|
|
x3 = branch(x1, UNITY, TWO_BY_TWO)
|
|
x4 = branch(x2, RIGHT, x3)
|
|
x5 = fork(combine, vfrontier, hfrontier)
|
|
x6 = x5(x4)
|
|
x7 = canvas(ZERO, THREE_BY_THREE)
|
|
x8 = fill(x7, FIVE, x6)
|
|
return x8
|
|
|
|
|
|
def verify_d4a91cb9(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, EIGHT)
|
|
x1 = ofcolor(I, TWO)
|
|
x2 = first(x0)
|
|
x3 = first(x1)
|
|
x4 = last(x2)
|
|
x5 = first(x3)
|
|
x6 = astuple(x5, x4)
|
|
x7 = connect(x6, x2)
|
|
x8 = connect(x6, x3)
|
|
x9 = combine(x7, x8)
|
|
x10 = underfill(I, FOUR, x9)
|
|
return x10
|
|
|
|
|
|
def verify_d4f3cd78(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = toindices(x1)
|
|
x3 = box(x2)
|
|
x4 = difference(x3, x2)
|
|
x5 = inbox(x2)
|
|
x6 = backdrop(x5)
|
|
x7 = lbind(position, x6)
|
|
x8 = compose(x7, initset)
|
|
x9 = lowermost(x6)
|
|
x10 = rightmost(x6)
|
|
x11 = uppermost(x6)
|
|
x12 = leftmost(x6)
|
|
x13 = rbind(greater, x9)
|
|
x14 = compose(x13, first)
|
|
x15 = lbind(greater, x11)
|
|
x16 = compose(x15, first)
|
|
x17 = rbind(greater, x10)
|
|
x18 = compose(x17, last)
|
|
x19 = lbind(greater, x12)
|
|
x20 = compose(x19, last)
|
|
x21 = compose(invert, x16)
|
|
x22 = fork(add, x14, x21)
|
|
x23 = compose(invert, x20)
|
|
x24 = fork(add, x18, x23)
|
|
x25 = fork(astuple, x22, x24)
|
|
x26 = fork(shoot, identity, x25)
|
|
x27 = mapply(x26, x4)
|
|
x28 = combine(x27, x6)
|
|
x29 = fill(I, EIGHT, x28)
|
|
return x29
|
|
|
|
|
|
def verify_d511f180(I: Grid) -> Grid:
|
|
x0 = switch(I, FIVE, EIGHT)
|
|
return x0
|
|
|
|
|
|
def verify_d5d6de2d(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = merge(x0)
|
|
x2 = cover(I, x1)
|
|
x3 = mapply(delta, x0)
|
|
x4 = fill(x2, THREE, x3)
|
|
return x4
|
|
|
|
|
|
def verify_d631b094(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = other(x0, ZERO)
|
|
x2 = colorcount(I, x1)
|
|
x3 = astuple(ONE, x2)
|
|
x4 = canvas(x1, x3)
|
|
return x4
|
|
|
|
|
|
def verify_d687bc17(I: Grid) -> Grid:
|
|
x0 = trim(I)
|
|
x1 = asobject(x0)
|
|
x2 = shift(x1, UNITY)
|
|
x3 = apply(initset, x2)
|
|
x4 = toindices(x2)
|
|
x5 = asindices(I)
|
|
x6 = corners(x5)
|
|
x7 = combine(x4, x6)
|
|
x8 = fill(I, NEG_ONE, x7)
|
|
x9 = fgpartition(x8)
|
|
x10 = asindices(I)
|
|
x11 = corners(x10)
|
|
x12 = toobject(x11, I)
|
|
x13 = combine(x2, x12)
|
|
x14 = mostcolor(x13)
|
|
x15 = fill(x8, x14, x7)
|
|
x16 = apply(color, x9)
|
|
x17 = rbind(contained, x16)
|
|
x18 = compose(x17, color)
|
|
x19 = sfilter(x3, x18)
|
|
x20 = lbind(colorfilter, x9)
|
|
x21 = chain(first, x20, color)
|
|
x22 = fork(gravitate, identity, x21)
|
|
x23 = fork(shift, identity, x22)
|
|
x24 = mapply(x23, x19)
|
|
x25 = paint(x15, x24)
|
|
return x25
|
|
|
|
|
|
def verify_d6ad076f(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = product(x0, x0)
|
|
x2 = fork(equality, first, last)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x1, x3)
|
|
x5 = fork(adjacent, first, last)
|
|
x6 = compose(flip, x5)
|
|
x7 = extract(x4, x6)
|
|
x8 = totuple(x7)
|
|
x9 = first(x8)
|
|
x10 = last(x8)
|
|
x11 = combine(x9, x10)
|
|
x12 = leftmost(x11)
|
|
x13 = increment(x12)
|
|
x14 = rightmost(x11)
|
|
x15 = decrement(x14)
|
|
x16 = apply(uppermost, x8)
|
|
x17 = maximum(x16)
|
|
x18 = increment(x17)
|
|
x19 = apply(lowermost, x8)
|
|
x20 = minimum(x19)
|
|
x21 = decrement(x20)
|
|
x22 = apply(leftmost, x8)
|
|
x23 = maximum(x22)
|
|
x24 = increment(x23)
|
|
x25 = apply(rightmost, x8)
|
|
x26 = minimum(x25)
|
|
x27 = decrement(x26)
|
|
x28 = uppermost(x11)
|
|
x29 = increment(x28)
|
|
x30 = lowermost(x11)
|
|
x31 = decrement(x30)
|
|
x32 = hmatching(x9, x10)
|
|
x33 = branch(x32, x13, x24)
|
|
x34 = branch(x32, x15, x27)
|
|
x35 = branch(x32, x21, x31)
|
|
x36 = branch(x32, x18, x29)
|
|
x37 = astuple(x35, x34)
|
|
x38 = astuple(x36, x33)
|
|
x39 = initset(x38)
|
|
x40 = insert(x37, x39)
|
|
x41 = backdrop(x40)
|
|
x42 = merge(x7)
|
|
x43 = toindices(x42)
|
|
x44 = rbind(contained, x43)
|
|
x45 = compose(flip, x44)
|
|
x46 = sfilter(x41, x45)
|
|
x47 = fill(I, EIGHT, x46)
|
|
return x47
|
|
|
|
|
|
def verify_d89b689b(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = sfilter(x0, square)
|
|
x2 = argmax(x1, size)
|
|
x3 = toindices(x2)
|
|
x4 = sizefilter(x1, ONE)
|
|
x5 = apply(initset, x3)
|
|
x6 = lbind(argmin, x5)
|
|
x7 = lbind(rbind, manhattan)
|
|
x8 = compose(x6, x7)
|
|
x9 = fork(recolor, color, x8)
|
|
x10 = mapply(x9, x4)
|
|
x11 = merge(x4)
|
|
x12 = cover(I, x11)
|
|
x13 = paint(x12, x10)
|
|
return x13
|
|
|
|
|
|
def verify_d8c310e9(I: Grid) -> Grid:
|
|
x0 = astuple(identity, rot90)
|
|
x1 = astuple(rot180, rot270)
|
|
x2 = combine(x0, x1)
|
|
x3 = astuple(identity, rot270)
|
|
x4 = astuple(rot180, rot90)
|
|
x5 = combine(x3, x4)
|
|
x6 = pair(x2, x5)
|
|
x7 = chain(size, dedupe, first)
|
|
x8 = matcher(x7, ONE)
|
|
x9 = compose(first, cmirror)
|
|
x10 = chain(size, dedupe, x9)
|
|
x11 = matcher(x10, ONE)
|
|
x12 = fork(both, x8, x11)
|
|
x13 = rbind(rapply, I)
|
|
x14 = compose(initset, first)
|
|
x15 = chain(first, x13, x14)
|
|
x16 = compose(x12, x15)
|
|
x17 = extract(x6, x16)
|
|
x18 = first(x17)
|
|
x19 = last(x17)
|
|
x20 = x18(I)
|
|
x21 = width(x20)
|
|
x22 = decrement(x21)
|
|
x23 = tojvec(x22)
|
|
x24 = index(x20, x23)
|
|
x25 = asobject(x20)
|
|
x26 = matcher(first, x24)
|
|
x27 = compose(flip, x26)
|
|
x28 = sfilter(x25, x27)
|
|
x29 = hperiod(x28)
|
|
x30 = width(x20)
|
|
x31 = increment(x30)
|
|
x32 = interval(ZERO, x31, x29)
|
|
x33 = apply(tojvec, x32)
|
|
x34 = lbind(shift, x28)
|
|
x35 = mapply(x34, x33)
|
|
x36 = paint(x20, x35)
|
|
x37 = x19(x36)
|
|
return x37
|
|
|
|
|
|
def verify_d90796e8(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = ofcolor(I, THREE)
|
|
x2 = compose(positive, size)
|
|
x3 = lbind(intersection, x1)
|
|
x4 = chain(x2, x3, dneighbors)
|
|
x5 = compose(positive, size)
|
|
x6 = lbind(intersection, x0)
|
|
x7 = chain(x5, x6, dneighbors)
|
|
x8 = sfilter(x0, x4)
|
|
x9 = sfilter(x1, x7)
|
|
x10 = cover(I, x8)
|
|
x11 = fill(x10, EIGHT, x9)
|
|
return x11
|
|
|
|
|
|
def verify_d9f24cd1(I: Grid) -> Grid:
|
|
x0 = astuple(identity, identity)
|
|
x1 = astuple(rot90, rot270)
|
|
x2 = astuple(x0, x1)
|
|
x3 = astuple(rot180, rot180)
|
|
x4 = astuple(rot270, rot90)
|
|
x5 = astuple(x3, x4)
|
|
x6 = combine(x2, x5)
|
|
x7 = rbind(greater, ONE)
|
|
x8 = chain(size, dedupe, last)
|
|
x9 = compose(x7, x8)
|
|
x10 = rbind(rapply, I)
|
|
x11 = compose(initset, first)
|
|
x12 = chain(first, x10, x11)
|
|
x13 = compose(x9, x12)
|
|
x14 = extract(x6, x13)
|
|
x15 = first(x14)
|
|
x16 = last(x14)
|
|
x17 = x15(I)
|
|
x18 = mostcolor(I)
|
|
x19 = trim(I)
|
|
x20 = palette(x19)
|
|
x21 = other(x20, x18)
|
|
x22 = asindices(I)
|
|
x23 = box(x22)
|
|
x24 = toobject(x23, I)
|
|
x25 = palette(x24)
|
|
x26 = other(x25, x18)
|
|
x27 = ofcolor(x17, x26)
|
|
x28 = ofcolor(x17, x21)
|
|
x29 = prapply(connect, x27, x28)
|
|
x30 = mfilter(x29, vline)
|
|
x31 = underfill(x17, x26, x30)
|
|
x32 = matcher(numcolors, TWO)
|
|
x33 = objects(x31, F, F, T)
|
|
x34 = sfilter(x33, x32)
|
|
x35 = difference(x33, x34)
|
|
x36 = colorfilter(x35, x26)
|
|
x37 = mapply(toindices, x36)
|
|
x38 = apply(urcorner, x34)
|
|
x39 = shift(x38, UNITY)
|
|
x40 = rbind(shoot, UP)
|
|
x41 = mapply(x40, x39)
|
|
x42 = fill(x31, x26, x41)
|
|
x43 = mapply(vfrontier, x37)
|
|
x44 = fill(x42, x26, x43)
|
|
x45 = x16(x44)
|
|
return x45
|
|
|
|
|
|
def verify_d9fac9be(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = totuple(x2)
|
|
x4 = first(x3)
|
|
x5 = last(x3)
|
|
x6 = neighbors(UNITY)
|
|
x7 = initset(UNITY)
|
|
x8 = recolor(x4, x6)
|
|
x9 = recolor(x5, x7)
|
|
x10 = combine(x8, x9)
|
|
x11 = occurrences(I, x10)
|
|
x12 = size(x11)
|
|
x13 = positive(x12)
|
|
x14 = branch(x13, x5, x4)
|
|
x15 = canvas(x14, UNITY)
|
|
return x15
|
|
|
|
|
|
def verify_dae9d2b5(I: Grid) -> Grid:
|
|
x0 = hsplit(I, TWO)
|
|
x1 = apply(numcolors, x0)
|
|
x2 = equality(x1, TWO_BY_TWO)
|
|
x3 = branch(x2, hsplit, vsplit)
|
|
x4 = x3(I, TWO)
|
|
x5 = first(x4)
|
|
x6 = last(x4)
|
|
x7 = palette(x5)
|
|
x8 = palette(x6)
|
|
x9 = intersection(x7, x8)
|
|
x10 = first(x9)
|
|
x11 = palette(x5)
|
|
x12 = other(x11, x10)
|
|
x13 = palette(x6)
|
|
x14 = other(x13, x10)
|
|
x15 = shape(x5)
|
|
x16 = canvas(x10, x15)
|
|
x17 = ofcolor(x5, x12)
|
|
x18 = ofcolor(x6, x14)
|
|
x19 = combine(x17, x18)
|
|
x20 = fill(x16, SIX, x19)
|
|
return x20
|
|
|
|
|
|
def verify_db3e9e38(I: Grid) -> Grid:
|
|
x0 = astuple(identity, dmirror)
|
|
x1 = astuple(cmirror, hmirror)
|
|
x2 = combine(x0, x1)
|
|
x3 = chain(uppermost, merge, fgpartition)
|
|
x4 = rbind(rapply, I)
|
|
x5 = chain(first, x4, initset)
|
|
x6 = compose(x3, x5)
|
|
x7 = matcher(x6, ZERO)
|
|
x8 = extract(x2, x7)
|
|
x9 = x8(I)
|
|
x10 = fgpartition(x9)
|
|
x11 = merge(x10)
|
|
x12 = width(x11)
|
|
x13 = astuple(NEG_ONE, x12)
|
|
x14 = invert(x12)
|
|
x15 = astuple(NEG_ONE, x14)
|
|
x16 = double(x12)
|
|
x17 = astuple(NEG_TWO, x16)
|
|
x18 = double(x12)
|
|
x19 = invert(x18)
|
|
x20 = astuple(NEG_TWO, x19)
|
|
x21 = multiply(THREE, TEN)
|
|
x22 = interval(ZERO, x21, ONE)
|
|
x23 = lbind(multiply, x13)
|
|
x24 = apply(x23, x22)
|
|
x25 = lbind(multiply, x15)
|
|
x26 = apply(x25, x22)
|
|
x27 = lbind(multiply, x17)
|
|
x28 = apply(x27, x22)
|
|
x29 = lbind(multiply, x20)
|
|
x30 = apply(x29, x22)
|
|
x31 = lbind(shift, x11)
|
|
x32 = mapply(x31, x24)
|
|
x33 = lbind(shift, x11)
|
|
x34 = mapply(x33, x26)
|
|
x35 = lbind(shift, x11)
|
|
x36 = mapply(x35, x28)
|
|
x37 = lbind(shift, x11)
|
|
x38 = mapply(x37, x30)
|
|
x39 = combine(x32, x34)
|
|
x40 = fill(x9, EIGHT, x39)
|
|
x41 = combine(x36, x38)
|
|
x42 = paint(x40, x41)
|
|
x43 = x8(x42)
|
|
return x43
|
|
|
|
|
|
def verify_db93a21d(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = merge(x0)
|
|
x2 = toindices(x1)
|
|
x3 = rbind(shoot, DOWN)
|
|
x4 = mapply(x3, x2)
|
|
x5 = underfill(I, ONE, x4)
|
|
x6 = lbind(power, outbox)
|
|
x7 = chain(x6, halve, width)
|
|
x8 = initset(x7)
|
|
x9 = lbind(rapply, x8)
|
|
x10 = fork(rapply, x9, identity)
|
|
x11 = compose(first, x10)
|
|
x12 = compose(backdrop, x11)
|
|
x13 = fork(difference, x12, toindices)
|
|
x14 = mapply(x13, x0)
|
|
x15 = mostcolor(I)
|
|
x16 = ofcolor(I, x15)
|
|
x17 = intersection(x14, x16)
|
|
x18 = fill(x5, THREE, x17)
|
|
return x18
|
|
|
|
|
|
def verify_dbc1a6ce(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = lbind(recolor, EIGHT)
|
|
x3 = rbind(ofcolor, x0)
|
|
x4 = chain(x2, backdrop, x3)
|
|
x5 = fork(paint, identity, x4)
|
|
x6 = height(I)
|
|
x7 = vsplit(I, x6)
|
|
x8 = mapply(x5, x7)
|
|
x9 = ofcolor(x8, EIGHT)
|
|
x10 = dmirror(I)
|
|
x11 = width(I)
|
|
x12 = vsplit(x10, x11)
|
|
x13 = mapply(x5, x12)
|
|
x14 = dmirror(x13)
|
|
x15 = ofcolor(x14, EIGHT)
|
|
x16 = combine(x9, x15)
|
|
x17 = difference(x16, x1)
|
|
x18 = fill(I, EIGHT, x17)
|
|
return x18
|
|
|
|
|
|
def verify_dc0a314f(I: Grid) -> Grid:
|
|
x0 = replace(I, THREE, NEG_ONE)
|
|
x1 = dmirror(x0)
|
|
x2 = papply(pair, x0, x1)
|
|
x3 = lbind(apply, maximum)
|
|
x4 = apply(x3, x2)
|
|
x5 = cmirror(x4)
|
|
x6 = papply(pair, x4, x5)
|
|
x7 = apply(x3, x6)
|
|
x8 = hmirror(x7)
|
|
x9 = papply(pair, x7, x8)
|
|
x10 = apply(x3, x9)
|
|
x11 = vmirror(x10)
|
|
x12 = papply(pair, x11, x10)
|
|
x13 = apply(x3, x12)
|
|
x14 = ofcolor(I, THREE)
|
|
x15 = subgrid(x14, x13)
|
|
return x15
|
|
|
|
|
|
def verify_dc1df850(I: Grid) -> Grid:
|
|
x0 = ofcolor(I, TWO)
|
|
x1 = mapply(neighbors, x0)
|
|
x2 = underfill(I, ONE, x1)
|
|
return x2
|
|
|
|
|
|
def verify_dc433765(I: Grid) -> Grid:
|
|
x0 = mostcolor(I)
|
|
x1 = palette(I)
|
|
x2 = remove(x0, x1)
|
|
x3 = other(x2, FOUR)
|
|
x4 = ofcolor(I, x3)
|
|
x5 = ofcolor(I, FOUR)
|
|
x6 = center(x4)
|
|
x7 = center(x5)
|
|
x8 = subtract(x7, x6)
|
|
x9 = sign(x8)
|
|
x10 = recolor(x3, x4)
|
|
x11 = move(I, x10, x9)
|
|
return x11
|
|
|
|
|
|
def verify_ddf7fa4f(I: Grid) -> Grid:
|
|
x0 = width(I)
|
|
x1 = decrement(x0)
|
|
x2 = tojvec(x1)
|
|
x3 = connect(ORIGIN, x2)
|
|
x4 = height(I)
|
|
x5 = decrement(x4)
|
|
x6 = toivec(x5)
|
|
x7 = connect(ORIGIN, x6)
|
|
x8 = width(I)
|
|
x9 = decrement(x8)
|
|
x10 = tojvec(x9)
|
|
x11 = shape(I)
|
|
x12 = decrement(x11)
|
|
x13 = connect(x10, x12)
|
|
x14 = height(I)
|
|
x15 = decrement(x14)
|
|
x16 = toivec(x15)
|
|
x17 = shape(I)
|
|
x18 = decrement(x17)
|
|
x19 = connect(x16, x18)
|
|
x20 = asindices(I)
|
|
x21 = box(x20)
|
|
x22 = toobject(x21, I)
|
|
x23 = mostcolor(x22)
|
|
x24 = matcher(color, x23)
|
|
x25 = compose(flip, x24)
|
|
x26 = rbind(sfilter, x25)
|
|
x27 = rbind(sizefilter, ONE)
|
|
x28 = rbind(objects, F)
|
|
x29 = rbind(x28, F)
|
|
x30 = rbind(x29, T)
|
|
x31 = rbind(subgrid, I)
|
|
x32 = chain(x26, x30, x31)
|
|
x33 = chain(size, x27, x32)
|
|
x34 = astuple(x3, x7)
|
|
x35 = astuple(x13, x19)
|
|
x36 = combine(x34, x35)
|
|
x37 = argmax(x36, x33)
|
|
x38 = rbind(toobject, I)
|
|
x39 = compose(x38, initset)
|
|
x40 = ofcolor(I, x23)
|
|
x41 = difference(x37, x40)
|
|
x42 = apply(x39, x41)
|
|
x43 = rbind(intersection, x37)
|
|
x44 = chain(size, x43, toindices)
|
|
x45 = matcher(x44, ZERO)
|
|
x46 = objects(I, T, F, T)
|
|
x47 = sfilter(x46, x45)
|
|
x48 = lbind(fork, either)
|
|
x49 = lbind(lbind, hmatching)
|
|
x50 = lbind(lbind, vmatching)
|
|
x51 = fork(x48, x49, x50)
|
|
x52 = lbind(chain, size)
|
|
x53 = rbind(x52, x51)
|
|
x54 = lbind(lbind, sfilter)
|
|
x55 = compose(last, last)
|
|
x56 = chain(x53, x54, x55)
|
|
x57 = rbind(compose, x51)
|
|
x58 = lbind(lbind, extract)
|
|
x59 = compose(last, last)
|
|
x60 = chain(x57, x58, x59)
|
|
x61 = compose(first, last)
|
|
x62 = rbind(matcher, ONE)
|
|
x63 = compose(x62, x56)
|
|
x64 = fork(sfilter, x61, x63)
|
|
x65 = lbind(fork, recolor)
|
|
x66 = lbind(x65, color)
|
|
x67 = compose(x66, x60)
|
|
x68 = fork(mapply, x67, x64)
|
|
x69 = fork(combine, first, x68)
|
|
x70 = compose(first, last)
|
|
x71 = fork(difference, x70, x64)
|
|
x72 = compose(last, last)
|
|
x73 = fork(apply, x60, x64)
|
|
x74 = fork(difference, x72, x73)
|
|
x75 = fork(astuple, x71, x74)
|
|
x76 = fork(astuple, x69, x75)
|
|
x77 = difference(x42, x42)
|
|
x78 = power(x76, TEN)
|
|
x79 = astuple(x42, x47)
|
|
x80 = astuple(x77, x79)
|
|
x81 = x78(x80)
|
|
x82 = first(x81)
|
|
x83 = paint(I, x82)
|
|
return x83
|
|
|
|
|
|
def verify_de1cd16c(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = totuple(x0)
|
|
x2 = apply(color, x1)
|
|
x3 = size(x2)
|
|
x4 = dedupe(x2)
|
|
x5 = size(x4)
|
|
x6 = equality(x3, x5)
|
|
x7 = compose(leastcolor, merge)
|
|
x8 = lbind(apply, color)
|
|
x9 = chain(mostcommon, x8, totuple)
|
|
x10 = branch(x6, x7, x9)
|
|
x11 = x10(x0)
|
|
x12 = objects(I, T, F, F)
|
|
x13 = colorfilter(x12, x11)
|
|
x14 = difference(x12, x13)
|
|
x15 = rbind(subgrid, I)
|
|
x16 = apply(x15, x14)
|
|
x17 = rbind(colorcount, x11)
|
|
x18 = argmax(x16, x17)
|
|
x19 = mostcolor(x18)
|
|
x20 = canvas(x19, UNITY)
|
|
return x20
|
|
|
|
|
|
def verify_ded97339(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = lbind(recolor, NEG_ONE)
|
|
x2 = rbind(ofcolor, x0)
|
|
x3 = chain(x1, backdrop, x2)
|
|
x4 = fork(paint, identity, x3)
|
|
x5 = height(I)
|
|
x6 = vsplit(I, x5)
|
|
x7 = mapply(x4, x6)
|
|
x8 = ofcolor(x7, NEG_ONE)
|
|
x9 = dmirror(I)
|
|
x10 = width(I)
|
|
x11 = vsplit(x9, x10)
|
|
x12 = mapply(x4, x11)
|
|
x13 = dmirror(x12)
|
|
x14 = ofcolor(x13, NEG_ONE)
|
|
x15 = combine(x8, x14)
|
|
x16 = fill(I, x0, x15)
|
|
return x16
|
|
|
|
|
|
def verify_e179c5f4(I: Grid) -> Grid:
|
|
x0 = portrait(I)
|
|
x1 = branch(x0, identity, dmirror)
|
|
x2 = x1(I)
|
|
x3 = asindices(x2)
|
|
x4 = shoot(ORIGIN, UNITY)
|
|
x5 = intersection(x4, x3)
|
|
x6 = lrcorner(x5)
|
|
x7 = shoot(x6, DOWN_LEFT)
|
|
x8 = intersection(x7, x3)
|
|
x9 = combine(x5, x8)
|
|
x10 = llcorner(x9)
|
|
x11 = remove(x10, x9)
|
|
x12 = lbind(shift, x11)
|
|
x13 = height(x11)
|
|
x14 = lbind(multiply, x13)
|
|
x15 = chain(x12, toivec, x14)
|
|
x16 = height(x2)
|
|
x17 = height(x11)
|
|
x18 = divide(x16, x17)
|
|
x19 = increment(x18)
|
|
x20 = interval(ZERO, x19, ONE)
|
|
x21 = mapply(x15, x20)
|
|
x22 = rbind(contained, x21)
|
|
x23 = sfilter(x3, x22)
|
|
x24 = asindices(I)
|
|
x25 = corners(x24)
|
|
x26 = difference(x24, x25)
|
|
x27 = toobject(x26, I)
|
|
x28 = mostcolor(x27)
|
|
x29 = palette(I)
|
|
x30 = other(x29, x28)
|
|
x31 = ulcorner(x3)
|
|
x32 = index(x2, x31)
|
|
x33 = equality(x32, x30)
|
|
x34 = urcorner(x3)
|
|
x35 = index(x2, x34)
|
|
x36 = equality(x35, x30)
|
|
x37 = llcorner(x3)
|
|
x38 = index(x2, x37)
|
|
x39 = equality(x38, x30)
|
|
x40 = lrcorner(x3)
|
|
x41 = index(x2, x40)
|
|
x42 = equality(x41, x30)
|
|
x43 = astuple(x33, x36)
|
|
x44 = astuple(x39, x42)
|
|
x45 = combine(x43, x44)
|
|
x46 = vmirror(x23)
|
|
x47 = astuple(x23, x46)
|
|
x48 = hmirror(x23)
|
|
x49 = hmirror(x46)
|
|
x50 = astuple(x48, x49)
|
|
x51 = combine(x47, x50)
|
|
x52 = pair(x45, x51)
|
|
x53 = sfilter(x52, first)
|
|
x54 = mapply(last, x53)
|
|
x55 = fill(x2, x30, x54)
|
|
x56 = x1(x55)
|
|
x57 = replace(x56, x28, EIGHT)
|
|
return x57
|
|
|
|
|
|
def verify_e21d9049(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = compose(first, last)
|
|
x3 = totuple(x1)
|
|
x4 = apply(x2, x3)
|
|
x5 = mostcommon(x4)
|
|
x6 = compose(last, last)
|
|
x7 = totuple(x1)
|
|
x8 = apply(x6, x7)
|
|
x9 = mostcommon(x8)
|
|
x10 = compose(first, last)
|
|
x11 = matcher(x10, x5)
|
|
x12 = sfilter(x1, x11)
|
|
x13 = compose(last, last)
|
|
x14 = matcher(x13, x9)
|
|
x15 = sfilter(x1, x14)
|
|
x16 = objects(I, F, T, T)
|
|
x17 = size(x16)
|
|
x18 = equality(x17, TWO)
|
|
x19 = mfilter(x16, hline)
|
|
x20 = mfilter(x16, vline)
|
|
x21 = branch(x18, x19, x12)
|
|
x22 = branch(x18, x20, x15)
|
|
x23 = width(x21)
|
|
x24 = lbind(multiply, x23)
|
|
x25 = width(I)
|
|
x26 = divide(x25, x23)
|
|
x27 = increment(x26)
|
|
x28 = interval(ZERO, x27, ONE)
|
|
x29 = apply(x24, x28)
|
|
x30 = apply(invert, x29)
|
|
x31 = combine(x29, x30)
|
|
x32 = apply(tojvec, x31)
|
|
x33 = lbind(shift, x21)
|
|
x34 = mapply(x33, x32)
|
|
x35 = height(x22)
|
|
x36 = lbind(multiply, x35)
|
|
x37 = height(I)
|
|
x38 = height(x21)
|
|
x39 = divide(x37, x38)
|
|
x40 = increment(x39)
|
|
x41 = interval(ZERO, x40, ONE)
|
|
x42 = apply(x36, x41)
|
|
x43 = apply(invert, x42)
|
|
x44 = combine(x42, x43)
|
|
x45 = apply(toivec, x44)
|
|
x46 = lbind(shift, x22)
|
|
x47 = mapply(x46, x45)
|
|
x48 = combine(x34, x47)
|
|
x49 = paint(I, x48)
|
|
return x49
|
|
|
|
|
|
def verify_e26a3af2(I: Grid) -> Grid:
|
|
x0 = rot90(I)
|
|
x1 = apply(mostcommon, I)
|
|
x2 = apply(mostcommon, x0)
|
|
x3 = repeat(x1, ONE)
|
|
x4 = repeat(x2, ONE)
|
|
x5 = compose(size, dedupe)
|
|
x6 = x5(x1)
|
|
x7 = x5(x2)
|
|
x8 = greater(x7, x6)
|
|
x9 = branch(x8, height, width)
|
|
x10 = x9(I)
|
|
x11 = rot90(x3)
|
|
x12 = branch(x8, x4, x11)
|
|
x13 = branch(x8, vupscale, hupscale)
|
|
x14 = x13(x12, x10)
|
|
return x14
|
|
|
|
|
|
def verify_e3497940(I: Grid) -> Grid:
|
|
x0 = lefthalf(I)
|
|
x1 = righthalf(I)
|
|
x2 = vmirror(x1)
|
|
x3 = width(I)
|
|
x4 = hsplit(I, x3)
|
|
x5 = first(x4)
|
|
x6 = mostcolor(x5)
|
|
x7 = objects(x2, T, F, F)
|
|
x8 = matcher(color, x6)
|
|
x9 = compose(flip, x8)
|
|
x10 = sfilter(x7, x9)
|
|
x11 = merge(x10)
|
|
x12 = paint(x0, x11)
|
|
return x12
|
|
|
|
|
|
def verify_e40b9e2f(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = mostcolor(I)
|
|
x3 = uppermost(x1)
|
|
x4 = leftmost(x1)
|
|
x5 = height(x1)
|
|
x6 = width(x1)
|
|
x7 = interval(SEVEN, ONE, NEG_ONE)
|
|
x8 = add(x3, x5)
|
|
x9 = increment(x8)
|
|
x10 = lbind(subtract, x9)
|
|
x11 = add(x4, x6)
|
|
x12 = increment(x11)
|
|
x13 = lbind(subtract, x12)
|
|
x14 = lbind(interval, x3)
|
|
x15 = rbind(x14, ONE)
|
|
x16 = compose(x15, x10)
|
|
x17 = lbind(interval, x4)
|
|
x18 = rbind(x17, ONE)
|
|
x19 = compose(x18, x13)
|
|
x20 = fork(product, x16, x19)
|
|
x21 = fork(equality, identity, rot90)
|
|
x22 = fork(equality, identity, rot180)
|
|
x23 = fork(equality, identity, rot270)
|
|
x24 = fork(both, x22, x23)
|
|
x25 = fork(both, x21, x24)
|
|
x26 = fork(astuple, identity, identity)
|
|
x27 = fork(multiply, identity, identity)
|
|
x28 = compose(decrement, x27)
|
|
x29 = initset(ORIGIN)
|
|
x30 = difference(x29, x29)
|
|
x31 = rbind(branch, x30)
|
|
x32 = rbind(colorcount, x2)
|
|
x33 = rbind(subgrid, I)
|
|
x34 = lbind(compose, backdrop)
|
|
x35 = lbind(fork, insert)
|
|
x36 = lbind(x35, identity)
|
|
x37 = lbind(compose, initset)
|
|
x38 = chain(x34, x36, x37)
|
|
x39 = lbind(rbind, add)
|
|
x40 = chain(x38, x39, decrement)
|
|
x41 = lbind(fork, x31)
|
|
x42 = lbind(fork, both)
|
|
x43 = lbind(x42, x25)
|
|
x44 = rbind(compose, shape)
|
|
x45 = compose(x43, x44)
|
|
x46 = rbind(compose, x32)
|
|
x47 = lbind(lbind, greater)
|
|
x48 = chain(x46, x47, x28)
|
|
x49 = lbind(rbind, equality)
|
|
x50 = chain(x45, x49, x26)
|
|
x51 = fork(x42, x48, x50)
|
|
x52 = lbind(compose, x33)
|
|
x53 = compose(x52, x40)
|
|
x54 = fork(compose, x51, x53)
|
|
x55 = lbind(compose, initset)
|
|
x56 = lbind(rbind, astuple)
|
|
x57 = compose(x55, x56)
|
|
x58 = fork(x41, x54, x57)
|
|
x59 = fork(mapply, x58, x20)
|
|
x60 = center(x1)
|
|
x61 = astuple(x60, ONE)
|
|
x62 = repeat(x61, ONE)
|
|
x63 = mapply(x59, x7)
|
|
x64 = combine(x62, x63)
|
|
x65 = valmax(x64, last)
|
|
x66 = matcher(last, x65)
|
|
x67 = sfilter(x64, x66)
|
|
x68 = center(x1)
|
|
x69 = initset(x68)
|
|
x70 = rbind(manhattan, x69)
|
|
x71 = compose(halve, last)
|
|
x72 = fork(add, first, x71)
|
|
x73 = compose(initset, x72)
|
|
x74 = compose(x70, x73)
|
|
x75 = argmin(x67, x74)
|
|
x76 = first(x75)
|
|
x77 = last(x75)
|
|
x78 = decrement(x77)
|
|
x79 = add(x76, x78)
|
|
x80 = initset(x79)
|
|
x81 = insert(x76, x80)
|
|
x82 = backdrop(x81)
|
|
x83 = subgrid(x82, I)
|
|
x84 = asobject(x83)
|
|
x85 = rot90(I)
|
|
x86 = fgpartition(x85)
|
|
x87 = merge(x86)
|
|
x88 = rot180(I)
|
|
x89 = fgpartition(x88)
|
|
x90 = merge(x89)
|
|
x91 = rot270(I)
|
|
x92 = fgpartition(x91)
|
|
x93 = merge(x92)
|
|
x94 = rot90(I)
|
|
x95 = occurrences(x94, x84)
|
|
x96 = first(x95)
|
|
x97 = invert(x96)
|
|
x98 = shift(x87, x97)
|
|
x99 = shift(x98, x76)
|
|
x100 = rot180(I)
|
|
x101 = occurrences(x100, x84)
|
|
x102 = first(x101)
|
|
x103 = invert(x102)
|
|
x104 = shift(x90, x103)
|
|
x105 = shift(x104, x76)
|
|
x106 = rot270(I)
|
|
x107 = occurrences(x106, x84)
|
|
x108 = first(x107)
|
|
x109 = invert(x108)
|
|
x110 = shift(x93, x109)
|
|
x111 = shift(x110, x76)
|
|
x112 = combine(x99, x105)
|
|
x113 = combine(x112, x111)
|
|
x114 = paint(I, x113)
|
|
return x114
|
|
|
|
|
|
def verify_e48d4e1a(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = merge(x0)
|
|
x2 = color(x1)
|
|
x3 = asobject(I)
|
|
x4 = difference(x3, x1)
|
|
x5 = leastcolor(x4)
|
|
x6 = colorcount(I, x5)
|
|
x7 = mostcolor(x4)
|
|
x8 = ofcolor(I, x5)
|
|
x9 = toindices(x1)
|
|
x10 = combine(x9, x8)
|
|
x11 = fill(I, x7, x10)
|
|
x12 = argmax(x0, width)
|
|
x13 = uppermost(x12)
|
|
x14 = argmax(x0, height)
|
|
x15 = leftmost(x14)
|
|
x16 = astuple(x13, x15)
|
|
x17 = initset(x16)
|
|
x18 = position(x8, x17)
|
|
x19 = multiply(x18, x6)
|
|
x20 = add(x16, x19)
|
|
x21 = hfrontier(x20)
|
|
x22 = vfrontier(x20)
|
|
x23 = combine(x21, x22)
|
|
x24 = fill(x11, x2, x23)
|
|
return x24
|
|
|
|
|
|
def verify_e5062a87(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = ofcolor(I, x0)
|
|
x2 = recolor(ZERO, x1)
|
|
x3 = normalize(x2)
|
|
x4 = occurrences(I, x3)
|
|
x5 = toindices(x3)
|
|
x6 = lbind(shift, x5)
|
|
x7 = mapply(x6, x4)
|
|
x8 = fill(I, x0, x7)
|
|
return x8
|
|
|
|
|
|
def verify_e509e548(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = fork(add, height, width)
|
|
x2 = compose(decrement, x1)
|
|
x3 = fork(equality, size, x2)
|
|
x4 = fork(difference, toindices, box)
|
|
x5 = compose(size, x4)
|
|
x6 = matcher(x5, ZERO)
|
|
x7 = sfilter(x0, x3)
|
|
x8 = difference(x0, x7)
|
|
x9 = sfilter(x8, x6)
|
|
x10 = merge(x0)
|
|
x11 = fill(I, TWO, x10)
|
|
x12 = merge(x7)
|
|
x13 = fill(x11, ONE, x12)
|
|
x14 = merge(x9)
|
|
x15 = fill(x13, SIX, x14)
|
|
return x15
|
|
|
|
|
|
def verify_e50d258f(I: Grid) -> Grid:
|
|
x0 = asindices(I)
|
|
x1 = box(x0)
|
|
x2 = toobject(x1, I)
|
|
x3 = mostcolor(x2)
|
|
x4 = shape(I)
|
|
x5 = canvas(x3, x4)
|
|
x6 = hconcat(I, x5)
|
|
x7 = objects(x6, F, F, T)
|
|
x8 = rbind(colorcount, TWO)
|
|
x9 = argmax(x7, x8)
|
|
x10 = subgrid(x9, I)
|
|
return x10
|
|
|
|
|
|
def verify_e6721834(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = sfilter(x0, vline)
|
|
x4 = size(x3)
|
|
x5 = greater(x2, x4)
|
|
x6 = branch(x5, vsplit, hsplit)
|
|
x7 = x6(I, TWO)
|
|
x8 = order(x7, numcolors)
|
|
x9 = first(x8)
|
|
x10 = last(x8)
|
|
x11 = objects(x10, F, F, T)
|
|
x12 = merge(x11)
|
|
x13 = mostcolor(x12)
|
|
x14 = matcher(first, x13)
|
|
x15 = compose(flip, x14)
|
|
x16 = rbind(sfilter, x15)
|
|
x17 = mostcolor(x9)
|
|
x18 = lbind(recolor, x17)
|
|
x19 = rbind(sfilter, x14)
|
|
x20 = compose(toindices, x19)
|
|
x21 = fork(combine, x20, outbox)
|
|
x22 = compose(x18, x21)
|
|
x23 = fork(combine, x16, x22)
|
|
x24 = shape(x9)
|
|
x25 = add(TWO, x24)
|
|
x26 = canvas(x17, x25)
|
|
x27 = asobject(x9)
|
|
x28 = shift(x27, UNITY)
|
|
x29 = paint(x26, x28)
|
|
x30 = rbind(shift, NEG_UNITY)
|
|
x31 = lbind(occurrences, x29)
|
|
x32 = compose(x30, x31)
|
|
x33 = compose(x32, x23)
|
|
x34 = chain(positive, size, x33)
|
|
x35 = sfilter(x11, x34)
|
|
x36 = chain(first, x32, x23)
|
|
x37 = compose(ulcorner, x23)
|
|
x38 = fork(subtract, x36, x37)
|
|
x39 = fork(shift, identity, x38)
|
|
x40 = mapply(x39, x35)
|
|
x41 = paint(x9, x40)
|
|
return x41
|
|
|
|
|
|
def verify_e73095fd(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = mostcolor(I)
|
|
x2 = colorfilter(x0, x1)
|
|
x3 = fork(equality, toindices, backdrop)
|
|
x4 = sfilter(x2, x3)
|
|
x5 = lbind(mapply, dneighbors)
|
|
x6 = chain(x5, corners, outbox)
|
|
x7 = fork(difference, x6, outbox)
|
|
x8 = leastcolor(I)
|
|
x9 = ofcolor(I, x8)
|
|
x10 = rbind(intersection, x9)
|
|
x11 = matcher(size, ZERO)
|
|
x12 = chain(x11, x10, x7)
|
|
x13 = mfilter(x4, x12)
|
|
x14 = fill(I, FOUR, x13)
|
|
return x14
|
|
|
|
|
|
def verify_e76a88a6(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = argmax(x0, numcolors)
|
|
x2 = normalize(x1)
|
|
x3 = remove(x1, x0)
|
|
x4 = apply(ulcorner, x3)
|
|
x5 = lbind(shift, x2)
|
|
x6 = mapply(x5, x4)
|
|
x7 = paint(I, x6)
|
|
return x7
|
|
|
|
|
|
def verify_e8593010(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = sizefilter(x0, ONE)
|
|
x2 = sizefilter(x0, TWO)
|
|
x3 = sizefilter(x0, THREE)
|
|
x4 = merge(x1)
|
|
x5 = fill(I, THREE, x4)
|
|
x6 = merge(x2)
|
|
x7 = fill(x5, TWO, x6)
|
|
x8 = merge(x3)
|
|
x9 = fill(x7, ONE, x8)
|
|
return x9
|
|
|
|
|
|
def verify_e8dc4411(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = argmax(x0, size)
|
|
x2 = other(x0, x1)
|
|
x3 = ineighbors(ORIGIN)
|
|
x4 = height(x1)
|
|
x5 = increment(x4)
|
|
x6 = interval(ZERO, x5, ONE)
|
|
x7 = lbind(intersection, x1)
|
|
x8 = chain(positive, size, x7)
|
|
x9 = lbind(shift, x1)
|
|
x10 = rbind(multiply, UNITY)
|
|
x11 = chain(x8, x9, x10)
|
|
x12 = sfilter(x6, x11)
|
|
x13 = maximum(x12)
|
|
x14 = increment(x13)
|
|
x15 = toindices(x2)
|
|
x16 = lbind(intersection, x15)
|
|
x17 = lbind(shift, x1)
|
|
x18 = rbind(multiply, x14)
|
|
x19 = chain(toindices, x17, x18)
|
|
x20 = chain(size, x16, x19)
|
|
x21 = argmax(x3, x20)
|
|
x22 = shape(I)
|
|
x23 = maximum(x22)
|
|
x24 = increment(x23)
|
|
x25 = interval(ONE, x24, ONE)
|
|
x26 = lbind(shift, x1)
|
|
x27 = multiply(x14, x21)
|
|
x28 = lbind(multiply, x27)
|
|
x29 = pair(x25, x25)
|
|
x30 = apply(x28, x29)
|
|
x31 = mapply(x26, x30)
|
|
x32 = color(x2)
|
|
x33 = recolor(x32, x31)
|
|
x34 = paint(I, x33)
|
|
return x34
|
|
|
|
|
|
def verify_e9614598(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = merge(x0)
|
|
x2 = center(x1)
|
|
x3 = dneighbors(x2)
|
|
x4 = insert(x2, x3)
|
|
x5 = fill(I, THREE, x4)
|
|
return x5
|
|
|
|
|
|
def verify_e98196ab(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, vsplit, hsplit)
|
|
x5 = x4(I, TWO)
|
|
x6 = first(x5)
|
|
x7 = last(x5)
|
|
x8 = fgpartition(x7)
|
|
x9 = merge(x8)
|
|
x10 = paint(x6, x9)
|
|
return x10
|
|
|
|
|
|
def verify_e9afcf9a(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = height(I)
|
|
x2 = decrement(x1)
|
|
x3 = lbind(subtract, x2)
|
|
x4 = compose(double, halve)
|
|
x5 = fork(equality, identity, x4)
|
|
x6 = compose(last, last)
|
|
x7 = chain(flip, x5, x6)
|
|
x8 = sfilter(x0, x7)
|
|
x9 = chain(x3, first, last)
|
|
x10 = compose(last, last)
|
|
x11 = fork(astuple, x9, x10)
|
|
x12 = fork(astuple, first, x11)
|
|
x13 = apply(x12, x8)
|
|
x14 = paint(I, x13)
|
|
return x14
|
|
|
|
|
|
def verify_ea32f347(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = merge(x0)
|
|
x2 = fill(I, FOUR, x1)
|
|
x3 = argmin(x0, size)
|
|
x4 = argmax(x0, size)
|
|
x5 = fill(x2, ONE, x4)
|
|
x6 = fill(x5, TWO, x3)
|
|
return x6
|
|
|
|
|
|
def verify_ea786f4a(I: Grid) -> Grid:
|
|
x0 = shape(I)
|
|
x1 = halve(x0)
|
|
x2 = rbind(shoot, UP_RIGHT)
|
|
x3 = rbind(shoot, DOWN_LEFT)
|
|
x4 = fork(combine, x2, x3)
|
|
x5 = rbind(shoot, UNITY)
|
|
x6 = rbind(shoot, NEG_UNITY)
|
|
x7 = fork(combine, x5, x6)
|
|
x8 = fork(combine, x4, x7)
|
|
x9 = index(I, x1)
|
|
x10 = x8(x1)
|
|
x11 = fill(I, x9, x10)
|
|
return x11
|
|
|
|
|
|
def verify_eb281b96(I: Grid) -> Grid:
|
|
x0 = height(I)
|
|
x1 = width(I)
|
|
x2 = decrement(x0)
|
|
x3 = astuple(x2, x1)
|
|
x4 = crop(I, ORIGIN, x3)
|
|
x5 = hmirror(x4)
|
|
x6 = vconcat(I, x5)
|
|
x7 = double(x2)
|
|
x8 = astuple(x7, x1)
|
|
x9 = crop(x6, DOWN, x8)
|
|
x10 = vconcat(x6, x9)
|
|
return x10
|
|
|
|
|
|
def verify_eb5a1d5d(I: Grid) -> Grid:
|
|
x0 = compose(dmirror, dedupe)
|
|
x1 = x0(I)
|
|
x2 = x0(x1)
|
|
x3 = fork(remove, last, identity)
|
|
x4 = compose(hmirror, x3)
|
|
x5 = fork(vconcat, identity, x4)
|
|
x6 = x5(x2)
|
|
x7 = dmirror(x6)
|
|
x8 = x5(x7)
|
|
return x8
|
|
|
|
|
|
def verify_ec883f72(I: Grid) -> Grid:
|
|
x0 = fork(multiply, height, width)
|
|
x1 = partition(I)
|
|
x2 = argmax(x1, x0)
|
|
x3 = remove(x2, x1)
|
|
x4 = argmax(x3, x0)
|
|
x5 = other(x3, x4)
|
|
x6 = palette(I)
|
|
x7 = lrcorner(x4)
|
|
x8 = add(x7, UNITY)
|
|
x9 = llcorner(x4)
|
|
x10 = add(x9, DOWN_LEFT)
|
|
x11 = urcorner(x4)
|
|
x12 = add(x11, UP_RIGHT)
|
|
x13 = ulcorner(x4)
|
|
x14 = add(x13, NEG_UNITY)
|
|
x15 = shoot(x8, UNITY)
|
|
x16 = shoot(x10, DOWN_LEFT)
|
|
x17 = shoot(x12, UP_RIGHT)
|
|
x18 = shoot(x14, NEG_UNITY)
|
|
x19 = combine(x15, x16)
|
|
x20 = combine(x17, x18)
|
|
x21 = combine(x19, x20)
|
|
x22 = color(x5)
|
|
x23 = fill(I, x22, x21)
|
|
return x23
|
|
|
|
|
|
def verify_ecdecbb3(I: Grid) -> Grid:
|
|
x0 = leastcolor(I)
|
|
x1 = objects(I, T, F, T)
|
|
x2 = merge(x1)
|
|
x3 = palette(x2)
|
|
x4 = other(x3, x0)
|
|
x5 = ofcolor(I, x0)
|
|
x6 = frontiers(I)
|
|
x7 = colorfilter(x6, x4)
|
|
x8 = sfilter(x7, hline)
|
|
x9 = size(x8)
|
|
x10 = positive(x9)
|
|
x11 = height(I)
|
|
x12 = toivec(x11)
|
|
x13 = hfrontier(x12)
|
|
x14 = toivec(NEG_ONE)
|
|
x15 = hfrontier(x14)
|
|
x16 = insert(x15, x7)
|
|
x17 = insert(x13, x16)
|
|
x18 = width(I)
|
|
x19 = tojvec(x18)
|
|
x20 = vfrontier(x19)
|
|
x21 = tojvec(NEG_ONE)
|
|
x22 = vfrontier(x21)
|
|
x23 = insert(x22, x7)
|
|
x24 = insert(x20, x23)
|
|
x25 = branch(x10, x17, x24)
|
|
x26 = lbind(argmin, x25)
|
|
x27 = lbind(rbind, manhattan)
|
|
x28 = compose(x27, initset)
|
|
x29 = compose(x26, x28)
|
|
x30 = rbind(remove, x25)
|
|
x31 = compose(x30, x29)
|
|
x32 = fork(argmin, x31, x28)
|
|
x33 = fork(gravitate, initset, x29)
|
|
x34 = compose(crement, x33)
|
|
x35 = fork(add, identity, x34)
|
|
x36 = fork(gravitate, initset, x32)
|
|
x37 = compose(crement, x36)
|
|
x38 = fork(add, identity, x37)
|
|
x39 = ofcolor(I, x4)
|
|
x40 = backdrop(x39)
|
|
x41 = fork(connect, x35, x38)
|
|
x42 = rbind(contained, x40)
|
|
x43 = rbind(extract, x42)
|
|
x44 = fork(astuple, x35, x38)
|
|
x45 = compose(x43, x44)
|
|
x46 = fork(connect, identity, x45)
|
|
x47 = rbind(branch, x46)
|
|
x48 = rbind(x47, x41)
|
|
x49 = rbind(contained, x40)
|
|
x50 = compose(x48, x49)
|
|
x51 = compose(initset, x50)
|
|
x52 = fork(rapply, x51, identity)
|
|
x53 = compose(first, x52)
|
|
x54 = mapply(x53, x5)
|
|
x55 = fill(I, x0, x54)
|
|
x56 = intersection(x39, x54)
|
|
x57 = mapply(neighbors, x56)
|
|
x58 = fill(x55, x4, x57)
|
|
return x58
|
|
|
|
|
|
def verify_ed36ccf7(I: Grid) -> Grid:
|
|
x0 = rot270(I)
|
|
return x0
|
|
|
|
|
|
def verify_ef135b50(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = fork(equality, size, x1)
|
|
x3 = compose(flip, x2)
|
|
x4 = sfilter(x0, x3)
|
|
x5 = argmax(x4, x1)
|
|
x6 = color(x5)
|
|
x7 = ofcolor(I, x6)
|
|
x8 = asindices(I)
|
|
x9 = difference(x8, x7)
|
|
x10 = fill(I, NEG_ONE, x9)
|
|
x11 = lbind(recolor, NEG_ONE)
|
|
x12 = rbind(ofcolor, NEG_ONE)
|
|
x13 = chain(x11, backdrop, x12)
|
|
x14 = fork(paint, identity, x13)
|
|
x15 = height(x10)
|
|
x16 = vsplit(x10, x15)
|
|
x17 = mapply(x14, x16)
|
|
x18 = ofcolor(x17, NEG_ONE)
|
|
x19 = asindices(I)
|
|
x20 = box(x19)
|
|
x21 = difference(x18, x20)
|
|
x22 = intersection(x21, x7)
|
|
x23 = fill(I, NINE, x22)
|
|
return x23
|
|
|
|
|
|
def verify_f15e1fac(I: Grid) -> Grid:
|
|
x0 = rbind(ofcolor, TWO)
|
|
x1 = compose(lowermost, x0)
|
|
x2 = matcher(x1, ZERO)
|
|
x3 = astuple(identity, dmirror)
|
|
x4 = astuple(cmirror, hmirror)
|
|
x5 = combine(x3, x4)
|
|
x6 = rbind(rapply, I)
|
|
x7 = compose(first, x6)
|
|
x8 = chain(x2, x7, initset)
|
|
x9 = extract(x5, x8)
|
|
x10 = x9(I)
|
|
x11 = mostcolor(I)
|
|
x12 = palette(I)
|
|
x13 = remove(x11, x12)
|
|
x14 = other(x13, TWO)
|
|
x15 = ofcolor(x10, x14)
|
|
x16 = rightmost(x15)
|
|
x17 = equality(x16, ZERO)
|
|
x18 = branch(x17, identity, vmirror)
|
|
x19 = x18(x10)
|
|
x20 = ofcolor(x19, x14)
|
|
x21 = ofcolor(x19, TWO)
|
|
x22 = apply(last, x21)
|
|
x23 = insert(ZERO, x22)
|
|
x24 = width(x19)
|
|
x25 = insert(x24, x23)
|
|
x26 = order(x25, identity)
|
|
x27 = last(x26)
|
|
x28 = remove(x27, x26)
|
|
x29 = first(x26)
|
|
x30 = remove(x29, x26)
|
|
x31 = pair(x28, x30)
|
|
x32 = size(x28)
|
|
x33 = interval(ZERO, x32, ONE)
|
|
x34 = pair(x33, x31)
|
|
x35 = lbind(fork, connect)
|
|
x36 = compose(first, last)
|
|
x37 = chain(decrement, last, last)
|
|
x38 = lbind(lbind, add)
|
|
x39 = compose(x38, first)
|
|
x40 = lbind(rbind, astuple)
|
|
x41 = rbind(chain, first)
|
|
x42 = compose(x40, x36)
|
|
x43 = compose(x40, x37)
|
|
x44 = fork(x41, x42, x39)
|
|
x45 = fork(x41, x43, x39)
|
|
x46 = fork(x35, x44, x45)
|
|
x47 = rbind(mapply, x20)
|
|
x48 = compose(x47, x46)
|
|
x49 = mapply(x48, x34)
|
|
x50 = fill(x19, x14, x49)
|
|
x51 = x18(x50)
|
|
x52 = x9(x51)
|
|
return x52
|
|
|
|
|
|
def verify_f1cefba8(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmax(x0, x1)
|
|
x3 = argmin(x0, x1)
|
|
x4 = remove(x2, x0)
|
|
x5 = other(x4, x3)
|
|
x6 = color(x3)
|
|
x7 = color(x5)
|
|
x8 = toindices(x3)
|
|
x9 = inbox(x5)
|
|
x10 = intersection(x8, x9)
|
|
x11 = fork(combine, hfrontier, vfrontier)
|
|
x12 = mapply(x11, x10)
|
|
x13 = corners(x5)
|
|
x14 = inbox(x5)
|
|
x15 = corners(x14)
|
|
x16 = combine(x13, x15)
|
|
x17 = mapply(x11, x16)
|
|
x18 = difference(x12, x17)
|
|
x19 = toindices(x2)
|
|
x20 = intersection(x18, x19)
|
|
x21 = fill(I, x6, x20)
|
|
x22 = difference(x18, x20)
|
|
x23 = fill(x21, x7, x22)
|
|
x24 = inbox(x5)
|
|
x25 = fill(x23, x7, x24)
|
|
return x25
|
|
|
|
|
|
def verify_f25fbde4(I: Grid) -> Grid:
|
|
x0 = compress(I)
|
|
x1 = upscale(x0, TWO)
|
|
return x1
|
|
|
|
|
|
def verify_f25ffba3(I: Grid) -> Grid:
|
|
x0 = tophalf(I)
|
|
x1 = numcolors(x0)
|
|
x2 = equality(x1, ONE)
|
|
x3 = bottomhalf(I)
|
|
x4 = numcolors(x3)
|
|
x5 = equality(x4, ONE)
|
|
x6 = either(x2, x5)
|
|
x7 = branch(x6, identity, dmirror)
|
|
x8 = x7(I)
|
|
x9 = asobject(x8)
|
|
x10 = hmirror(x9)
|
|
x11 = mostcolor(I)
|
|
x12 = matcher(first, x11)
|
|
x13 = compose(flip, x12)
|
|
x14 = sfilter(x10, x13)
|
|
x15 = paint(x8, x14)
|
|
x16 = x7(x15)
|
|
return x16
|
|
|
|
|
|
def verify_f2829549(I: Grid) -> Grid:
|
|
x0 = frontiers(I)
|
|
x1 = sfilter(x0, hline)
|
|
x2 = size(x1)
|
|
x3 = positive(x2)
|
|
x4 = branch(x3, vsplit, hsplit)
|
|
x5 = x4(I, TWO)
|
|
x6 = first(x5)
|
|
x7 = last(x5)
|
|
x8 = palette(x6)
|
|
x9 = palette(x7)
|
|
x10 = intersection(x8, x9)
|
|
x11 = first(x10)
|
|
x12 = shape(x6)
|
|
x13 = canvas(x11, x12)
|
|
x14 = ofcolor(x6, x11)
|
|
x15 = ofcolor(x7, x11)
|
|
x16 = intersection(x14, x15)
|
|
x17 = fill(x13, THREE, x16)
|
|
return x17
|
|
|
|
|
|
def verify_f35d900a(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, T)
|
|
x1 = palette(I)
|
|
x2 = mostcolor(I)
|
|
x3 = remove(x2, x1)
|
|
x4 = lbind(other, x3)
|
|
x5 = compose(x4, color)
|
|
x6 = fork(recolor, x5, outbox)
|
|
x7 = mapply(x6, x0)
|
|
x8 = mapply(toindices, x0)
|
|
x9 = box(x8)
|
|
x10 = difference(x9, x8)
|
|
x11 = lbind(argmin, x8)
|
|
x12 = rbind(compose, initset)
|
|
x13 = lbind(rbind, manhattan)
|
|
x14 = chain(x12, x13, initset)
|
|
x15 = chain(initset, x11, x14)
|
|
x16 = fork(manhattan, initset, x15)
|
|
x17 = compose(even, x16)
|
|
x18 = sfilter(x10, x17)
|
|
x19 = paint(I, x7)
|
|
x20 = fill(x19, FIVE, x18)
|
|
return x20
|
|
|
|
|
|
def verify_f5b8619d(I: Grid) -> Grid:
|
|
x0 = fgpartition(I)
|
|
x1 = mapply(toindices, x0)
|
|
x2 = mapply(vfrontier, x1)
|
|
x3 = underfill(I, EIGHT, x2)
|
|
x4 = hconcat(x3, x3)
|
|
x5 = vconcat(x4, x4)
|
|
return x5
|
|
|
|
|
|
def verify_f76d97a5(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = remove(FIVE, x0)
|
|
x2 = first(x1)
|
|
x3 = ofcolor(I, x2)
|
|
x4 = fill(I, ZERO, x3)
|
|
x5 = ofcolor(I, FIVE)
|
|
x6 = fill(x4, x2, x5)
|
|
return x6
|
|
|
|
|
|
def verify_f8a8fe49(I: Grid) -> Grid:
|
|
x0 = partition(I)
|
|
x1 = fork(multiply, height, width)
|
|
x2 = argmin(x0, x1)
|
|
x3 = argmax(x0, x1)
|
|
x4 = remove(x2, x0)
|
|
x5 = other(x4, x3)
|
|
x6 = subgrid(x5, I)
|
|
x7 = frontiers(x6)
|
|
x8 = sfilter(x7, hline)
|
|
x9 = size(x8)
|
|
x10 = positive(x9)
|
|
x11 = branch(x10, dmirror, identity)
|
|
x12 = x11(I)
|
|
x13 = color(x5)
|
|
x14 = ofcolor(x12, x13)
|
|
x15 = subgrid(x14, x12)
|
|
x16 = trim(x15)
|
|
x17 = lefthalf(x16)
|
|
x18 = vmirror(x17)
|
|
x19 = asobject(x18)
|
|
x20 = righthalf(x16)
|
|
x21 = vmirror(x20)
|
|
x22 = asobject(x21)
|
|
x23 = color(x3)
|
|
x24 = inbox(x14)
|
|
x25 = backdrop(x24)
|
|
x26 = fill(x12, x23, x25)
|
|
x27 = urcorner(x14)
|
|
x28 = add(x27, UNITY)
|
|
x29 = shift(x22, x28)
|
|
x30 = ulcorner(x14)
|
|
x31 = width(x19)
|
|
x32 = invert(x31)
|
|
x33 = tojvec(x32)
|
|
x34 = add(DOWN, x33)
|
|
x35 = add(x30, x34)
|
|
x36 = shift(x19, x35)
|
|
x37 = combine(x29, x36)
|
|
x38 = paint(x26, x37)
|
|
x39 = x11(x38)
|
|
return x39
|
|
|
|
|
|
def verify_f8b3ba0a(I: Grid) -> Grid:
|
|
x0 = compress(I)
|
|
x1 = astuple(THREE, ONE)
|
|
x2 = palette(x0)
|
|
x3 = lbind(colorcount, x0)
|
|
x4 = compose(invert, x3)
|
|
x5 = order(x2, x4)
|
|
x6 = rbind(canvas, UNITY)
|
|
x7 = apply(x6, x5)
|
|
x8 = merge(x7)
|
|
x9 = size(x2)
|
|
x10 = decrement(x9)
|
|
x11 = astuple(x10, ONE)
|
|
x12 = crop(x8, DOWN, x11)
|
|
return x12
|
|
|
|
|
|
def verify_f8c80d96(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = compose(maximum, shape)
|
|
x2 = argmin(x0, x1)
|
|
x3 = color(x2)
|
|
x4 = palette(I)
|
|
x5 = other(x4, x3)
|
|
x6 = colorfilter(x0, x5)
|
|
x7 = argmin(x6, x1)
|
|
x8 = remove(x7, x6)
|
|
x9 = rbind(manhattan, x7)
|
|
x10 = argmin(x8, x9)
|
|
x11 = rightmost(x10)
|
|
x12 = rightmost(x7)
|
|
x13 = subtract(x11, x12)
|
|
x14 = leftmost(x7)
|
|
x15 = leftmost(x10)
|
|
x16 = subtract(x14, x15)
|
|
x17 = astuple(x13, x16)
|
|
x18 = maximum(x17)
|
|
x19 = lowermost(x10)
|
|
x20 = lowermost(x7)
|
|
x21 = subtract(x19, x20)
|
|
x22 = uppermost(x7)
|
|
x23 = uppermost(x10)
|
|
x24 = subtract(x22, x23)
|
|
x25 = astuple(x21, x24)
|
|
x26 = maximum(x25)
|
|
x27 = ulcorner(x7)
|
|
x28 = lrcorner(x7)
|
|
x29 = astuple(x26, x18)
|
|
x30 = double(EIGHT)
|
|
x31 = interval(ONE, x30, ONE)
|
|
x32 = lbind(subtract, x27)
|
|
x33 = rbind(multiply, x29)
|
|
x34 = compose(x32, x33)
|
|
x35 = lbind(add, x28)
|
|
x36 = rbind(multiply, x29)
|
|
x37 = chain(initset, x35, x36)
|
|
x38 = fork(insert, x34, x37)
|
|
x39 = compose(box, x38)
|
|
x40 = mapply(x39, x31)
|
|
x41 = fill(I, x5, x40)
|
|
x42 = replace(x41, x3, FIVE)
|
|
return x42
|
|
|
|
|
|
def verify_f8ff0b80(I: Grid) -> Grid:
|
|
x0 = objects(I, T, T, T)
|
|
x1 = order(x0, size)
|
|
x2 = apply(color, x1)
|
|
x3 = rbind(canvas, UNITY)
|
|
x4 = apply(x3, x2)
|
|
x5 = merge(x4)
|
|
x6 = hmirror(x5)
|
|
return x6
|
|
|
|
|
|
def verify_f9012d9b(I: Grid) -> Grid:
|
|
x0 = lbind(contained, ZERO)
|
|
x1 = compose(flip, x0)
|
|
x2 = sfilter(I, x1)
|
|
x3 = dmirror(I)
|
|
x4 = lbind(contained, ZERO)
|
|
x5 = compose(flip, x4)
|
|
x6 = sfilter(x3, x5)
|
|
x7 = compose(hperiod, asobject)
|
|
x8 = height(x2)
|
|
x9 = vsplit(x2, x8)
|
|
x10 = apply(x7, x9)
|
|
x11 = maximum(x10)
|
|
x12 = compose(hperiod, asobject)
|
|
x13 = height(x6)
|
|
x14 = vsplit(x6, x13)
|
|
x15 = apply(x12, x14)
|
|
x16 = maximum(x15)
|
|
x17 = ofcolor(I, ZERO)
|
|
x18 = asobject(I)
|
|
x19 = matcher(first, ZERO)
|
|
x20 = compose(flip, x19)
|
|
x21 = sfilter(x18, x20)
|
|
x22 = lbind(shift, x21)
|
|
x23 = height(I)
|
|
x24 = divide(x23, x16)
|
|
x25 = increment(x24)
|
|
x26 = width(I)
|
|
x27 = divide(x26, x11)
|
|
x28 = increment(x27)
|
|
x29 = invert(x25)
|
|
x30 = increment(x25)
|
|
x31 = interval(x29, x30, ONE)
|
|
x32 = invert(x28)
|
|
x33 = increment(x28)
|
|
x34 = interval(x32, x33, ONE)
|
|
x35 = product(x31, x34)
|
|
x36 = astuple(x16, x11)
|
|
x37 = lbind(multiply, x36)
|
|
x38 = apply(x37, x35)
|
|
x39 = mapply(x22, x38)
|
|
x40 = paint(I, x39)
|
|
x41 = subgrid(x17, x40)
|
|
return x41
|
|
|
|
|
|
def verify_fafffa47(I: Grid) -> Grid:
|
|
x0 = tophalf(I)
|
|
x1 = numcolors(x0)
|
|
x2 = equality(x1, TWO)
|
|
x3 = bottomhalf(I)
|
|
x4 = numcolors(x3)
|
|
x5 = equality(x4, TWO)
|
|
x6 = both(x2, x5)
|
|
x7 = lefthalf(I)
|
|
x8 = numcolors(x7)
|
|
x9 = equality(x8, TWO)
|
|
x10 = righthalf(I)
|
|
x11 = numcolors(x10)
|
|
x12 = equality(x11, TWO)
|
|
x13 = both(x9, x12)
|
|
x14 = flip(x13)
|
|
x15 = both(x6, x14)
|
|
x16 = branch(x15, vsplit, hsplit)
|
|
x17 = x16(I, TWO)
|
|
x18 = first(x17)
|
|
x19 = last(x17)
|
|
x20 = palette(x18)
|
|
x21 = palette(x19)
|
|
x22 = intersection(x20, x21)
|
|
x23 = first(x22)
|
|
x24 = shape(x18)
|
|
x25 = canvas(x23, x24)
|
|
x26 = ofcolor(x18, x23)
|
|
x27 = ofcolor(x19, x23)
|
|
x28 = intersection(x26, x27)
|
|
x29 = fill(x25, TWO, x28)
|
|
return x29
|
|
|
|
|
|
def verify_fcb5c309(I: Grid) -> Grid:
|
|
x0 = objects(I, T, F, F)
|
|
x1 = lbind(contained, F)
|
|
x2 = compose(flip, x1)
|
|
x3 = fork(equality, toindices, box)
|
|
x4 = lbind(apply, x3)
|
|
x5 = lbind(colorfilter, x0)
|
|
x6 = chain(x2, x4, x5)
|
|
x7 = rbind(greater, TWO)
|
|
x8 = compose(minimum, shape)
|
|
x9 = lbind(apply, x8)
|
|
x10 = chain(x7, minimum, x9)
|
|
x11 = lbind(colorfilter, x0)
|
|
x12 = compose(x10, x11)
|
|
x13 = fork(both, x6, x12)
|
|
x14 = palette(I)
|
|
x15 = extract(x14, x13)
|
|
x16 = palette(I)
|
|
x17 = remove(x15, x16)
|
|
x18 = lbind(colorcount, I)
|
|
x19 = argmin(x17, x18)
|
|
x20 = rbind(colorcount, x19)
|
|
x21 = rbind(toobject, I)
|
|
x22 = chain(x20, x21, backdrop)
|
|
x23 = colorfilter(x0, x15)
|
|
x24 = argmax(x23, x22)
|
|
x25 = subgrid(x24, I)
|
|
x26 = replace(x25, x15, x19)
|
|
return x26
|
|
|
|
|
|
def verify_fcc82909(I: Grid) -> Grid:
|
|
x0 = objects(I, F, F, T)
|
|
x1 = lbind(add, DOWN)
|
|
x2 = compose(x1, llcorner)
|
|
x3 = rbind(add, RIGHT)
|
|
x4 = compose(x3, x2)
|
|
x5 = chain(toivec, decrement, numcolors)
|
|
x6 = fork(add, x4, x5)
|
|
x7 = compose(initset, x6)
|
|
x8 = fork(insert, x2, x7)
|
|
x9 = compose(backdrop, x8)
|
|
x10 = mapply(x9, x0)
|
|
x11 = fill(I, THREE, x10)
|
|
return x11
|
|
|
|
|
|
def verify_feca6190(I: Grid) -> Grid:
|
|
x0 = asobject(I)
|
|
x1 = matcher(first, ZERO)
|
|
x2 = compose(flip, x1)
|
|
x3 = sfilter(x0, x2)
|
|
x4 = size(x3)
|
|
x5 = width(I)
|
|
x6 = multiply(x5, x4)
|
|
x7 = multiply(UNITY, x6)
|
|
x8 = canvas(ZERO, x7)
|
|
x9 = multiply(x5, x4)
|
|
x10 = decrement(x9)
|
|
x11 = lbind(astuple, x10)
|
|
x12 = rbind(shoot, UP_RIGHT)
|
|
x13 = compose(last, last)
|
|
x14 = chain(x12, x11, x13)
|
|
x15 = fork(recolor, first, x14)
|
|
x16 = mapply(x15, x3)
|
|
x17 = paint(x8, x16)
|
|
return x17
|
|
|
|
|
|
def verify_ff28f65a(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = remove(TWO, x0)
|
|
x2 = lbind(colorcount, I)
|
|
x3 = argmax(x1, x2)
|
|
x4 = shape(I)
|
|
x5 = canvas(x3, x4)
|
|
x6 = hconcat(I, x5)
|
|
x7 = objects(x6, T, F, T)
|
|
x8 = colorfilter(x7, TWO)
|
|
x9 = size(x8)
|
|
x10 = double(x9)
|
|
x11 = interval(ZERO, x10, TWO)
|
|
x12 = apply(tojvec, x11)
|
|
x13 = astuple(ONE, NINE)
|
|
x14 = canvas(x3, x13)
|
|
x15 = fill(x14, ONE, x12)
|
|
x16 = hsplit(x15, THREE)
|
|
x17 = merge(x16)
|
|
return x17
|
|
|
|
|
|
def verify_ff805c23(I: Grid) -> Grid:
|
|
x0 = palette(I)
|
|
x1 = lbind(rbind, sfilter)
|
|
x2 = lbind(compose, flip)
|
|
x3 = lbind(matcher, first)
|
|
x4 = chain(x1, x2, x3)
|
|
x5 = lbind(paint, I)
|
|
x6 = rbind(compose, asobject)
|
|
x7 = dmirror(I)
|
|
x8 = rbind(rapply, x7)
|
|
x9 = chain(first, x8, initset)
|
|
x10 = chain(x9, x6, x4)
|
|
x11 = compose(x5, x10)
|
|
x12 = compose(x6, x4)
|
|
x13 = compose(cmirror, x11)
|
|
x14 = compose(initset, x12)
|
|
x15 = fork(rapply, x14, x13)
|
|
x16 = compose(first, x15)
|
|
x17 = fork(paint, x11, x16)
|
|
x18 = chain(initset, x6, x4)
|
|
x19 = compose(hmirror, x17)
|
|
x20 = fork(rapply, x18, x19)
|
|
x21 = compose(first, x20)
|
|
x22 = fork(paint, x17, x21)
|
|
x23 = chain(initset, x6, x4)
|
|
x24 = compose(vmirror, x22)
|
|
x25 = fork(rapply, x23, x24)
|
|
x26 = compose(first, x25)
|
|
x27 = fork(paint, x22, x26)
|
|
x28 = fork(equality, identity, hmirror)
|
|
x29 = fork(equality, identity, vmirror)
|
|
x30 = fork(equality, identity, cmirror)
|
|
x31 = fork(equality, identity, dmirror)
|
|
x32 = fork(both, x28, x29)
|
|
x33 = fork(both, x30, x31)
|
|
x34 = fork(both, x32, x33)
|
|
x35 = compose(x34, x27)
|
|
x36 = sfilter(x0, x35)
|
|
x37 = lbind(colorcount, I)
|
|
x38 = argmin(x36, x37)
|
|
x39 = x27(x38)
|
|
x40 = ofcolor(I, x38)
|
|
x41 = subgrid(x40, x39)
|
|
return x41
|
|
|
|
|