Skip to content

Releases: key-moon/golf

Submission 2025-10-30 18:05:36 UTC

30 Oct 18:05

Choose a tag to compare

  • score: +3 (957565 → 957568)
  • changed: 1
  • commits: 2

commits

  • e54f97c by github-actions[bot]: Update submission.zip [skip ci]
  • 3cf2b5a by Yu212: 46

dist/task046.py (-3, best+13, vis_many, task-details)

best: 168(jailctf merger) / others: 170(ox jam), 178(Code Golf International), 178(4atj sisyphus luke Seek mukundan), 184(HIMAGINE THE FUTURE.), 192(import itertools)

old (184 bytes, base_keymoon/task046.py, raw/raw, not worth compress)

def p(g):a=[*zip(*g)];o=2;return[*zip(*[[[v,sum({*S+s,*t}-{5})][v==5]for v in[0,0,*s,0,0][o:o+3]]for s,S,t in zip(a,[()]+a,a[1:]+[[5]])if any(s)or(o:=t.index(5)+o-[*S,5].index(5))*0])]

new (181 bytes, base_keymoon/task046.py, raw/raw, not worth compress)

def p(g):*a,=zip(*g);o=2;return[*zip(*[[[v,sum({*S+s,*t})-5][v==5]for v in[0,0,*s,0,0][o:o+3]]for s,S,t in zip(a,[()]+a,a[1:]+[[5]])if any(s)or(o:=t.index(5)+o-[*S,5].index(5))*0])]

Submission 2025-10-30 17:48:29 UTC

30 Oct 17:48

Choose a tag to compare

  • score: +16 (957549 → 957565)
  • changed: 1
  • commits: 2

commits

  • 1e4c4b1 by github-actions[bot]: Update submission.zip [skip ci]
  • 33a3e4f by Yu212: 396

dist/task396.py (-16, best-8, vis_many, task-details)

best: 179(Code Golf International, 4atj sisyphus luke Seek mukundan) / others: 184(jailctf merger), 187(HIMAGINE THE FUTURE.), 188(ox jam), 193(2F), 193(biz)

old (187 bytes, base_yu/task396.py, forplain/raw, not worth compress)

p=lambda g,c=-3:[[v and sum({*sum(g,())})-s[0]for v in s]for s in g]*(g[0]==g[-1])*all(s[0]&s[-1]for s in g)if c>0else max((len(u:=p([*zip(*g[l::-1])],c+1)),u)for l in range(3,len(g)))[1]

new (171 bytes, base_yu/task396.py, forplain/raw, not worth compress)

p=lambda g,c=-3:[[v and sum({*sum(g,())})-s[0]for v in s]for s in g]*(g[0]==g[-1])*all(a&b for(a,*_,b)in g)if c>0else max(p([*zip(*g[l::-1])],c+1)for l in range(3,len(g)))

Submission 2025-10-30 17:38:07 UTC

30 Oct 17:38

Choose a tag to compare

  • score: +0 (957549 → 957549)
  • changed: 0
  • commits: 2

commits

  • f580530 by github-actions[bot]: Update submission.zip [skip ci]
  • 3c9b487 by Yu212: a

Submission 2025-10-30 16:49:25 UTC

30 Oct 16:49

Choose a tag to compare

  • score: +28 (957521 → 957549)
  • changed: 1
  • commits: 2

commits

  • acf5309 by github-actions[bot]: Update submission.zip [skip ci]
  • 655a449 by Yu212: 363

dist/task363.py (-28, best-7, vis_many, task-details)

best: 212(jailctf merger) / others: 217(Code Golf International), 217(4atj sisyphus luke Seek mukundan), 217(import itertools), 217(JRKKX), 228(ox jam)

old (233 bytes, base_yu/task363.py, forcomp-t/genetic-algo(zopfli), )

# before compress: 253 bytes
def p(i):
 a=[(f%10,f//10)for f in range(100)if i[f%10][f//10]&2]
 for n in range(441):
  if~-(((f:=n%21-10)in(2,-4))*(hash((*a,))>>50in(4633,5384)))*all(-1<e+f<10>r+(h:=n//21-10)>-1and i[e+f][r+h]<1for(e,r)in a):
   for(e,r)in a:i[e+f][r+h]=2
 return i

new (205 bytes, base_yu/task363.py, raw/genetic-algo(zlib), )

# before compress: 246 bytes
def p(i):
 r=[(f,n)for n in range(10)for f in range(10)if i[f][n]&2]
 for n in range(-10,11):
  for f in range(-10,11):
   if(hash((*r,f))>>49in(9095,-6408))<all(-1<e+f<10>a+n>-1<-i[e+f][a+n]for e,a in r):
    for e,a in r:i[e+f][a+n]=2
 return i

Submission 2025-10-30 15:44:38 UTC

30 Oct 15:44

Choose a tag to compare

  • score: +2 (957519 → 957521)
  • changed: 1
  • commits: 2

commits

  • da6652d by github-actions[bot]: Update submission.zip [skip ci]
  • b55beb4 by Yu212: a

dist/task133.py (-2, best-2, vis_many, task-details)

best: 277(HIMAGINE THE FUTURE.) / others: 291(jailctf merger), 298(ox jam), 320(kambarakun), 321(open source), 321(jacekw Potatoman nauti natte)

old (277 bytes, base_yu/task133.py, forcomp-t/genetic-algo(zopfli), )

<too long (len: 1080)>

new (275 bytes, base_yu/task133.py, raw/genetic-algo(zopfli), )

<too long (len: 949)>

Submission 2025-10-30 15:07:08 UTC

30 Oct 15:07

Choose a tag to compare

  • score: +8 (957511 → 957519)
  • changed: 2
  • commits: 2

commits

  • 3dcdd52 by github-actions[bot]: Update submission.zip [skip ci]
  • 6eaa383 by Yu212: a

dist/task018.py (-3, best-3, vis_many, task-details)

best: 314(HIMAGINE THE FUTURE.) / others: 320(jailctf merger), 323(ox jam), 338(jacekw Potatoman nauti natte), 338(import itertools), 339(cg-klogw-sekken)

old (314 bytes, base_yu/task018.py, raw/genetic-algo(zopfli), )

<too long (len: 1154)>

new (311 bytes, base_yu/task018.py, forcomp-s/genetic-algo(zopfli), )

<too long (len: 1158)>

dist/task209.py (-5, best+5, vis_many, task-details)

best: 268(jailctf merger) / others: 273(JRKX), 273(JRKXK), 273(JRKKX), 278(HIMAGINE THE FUTURE.), 283(�イスケ�サ���II)

old (278 bytes, base_yu/task209.py, forcomp-s/genetic-algo(zlib), )

# before compress: 563 bytes
def p(a):
 (l,r),*t,(p,i)=[(n,e)for n in range(len(a))for e in range(len(a[0]))if a[n][e]==4];f=[a[n][r:i+1]for n in range(l,p+1)]
 for n in range(l,p+1):a[n][r:i+1]=[0]*(i+1-r)
 for d in range(2,6):
  for o in range(6,68):
   for g in range(-6,68):
    if all(len(a)>(n+o)//d>-1<(e+g)//d<len(a[0])and a[(n+o)//d][(e+g)//d]==f[n][e]for n in range(len(f))for e in range(len(f[0]))if f[n][e]|4!=4):
     for n in range(len(f)):
      for e in range(len(f[0])):
       if f[n][e]<1and len(a)>(n+o)//d>-1<(e+g)//d<len(a[0]):f[n][e]=a[(n+o)//d][(e+g)//d]
     return f

new (273 bytes, base_yu/task209.py, forcomp-s/genetic-algo(zlib), )

# before compress: 579 bytes
def p(n):
 (p,d),*o,(j,g)=[(l,r)for l in range(len(n))for r in range(len(n[0]))if n[l][r]==4];i=[n[l][d:g+1]for l in range(p,j+1)]
 for l in range(p,j+1):n[l][d:g+1]=[0]*(g+1-d)
 for f in range(2,6):
  for a in range(6,68):
   for e in range(-6,68):
    if all(l+a in range(len(n)*f)and r+e in range(len(n[0])*f)and n[(l+a)//f][(r+e)//f]==i[l][r]for l in range(len(i))for r in range(len(i[0]))if i[l][r]|4!=4):
     for l in range(len(i)):
      for r in range(len(i[0])):
       if l+a in range(len(n)*f)and r+e in range(len(n[0])*f):i[l][r]|=n[(l+a)//f][(r+e)//f]
     return i

Submission 2025-10-30 14:24:55 UTC

30 Oct 14:25

Choose a tag to compare

  • score: +11 (957500 → 957511)
  • changed: 1
  • commits: 9

commits

  • 869fda0 by github-actions[bot]: Update submission.zip [skip ci]
  • 81593eb by Yu212: 117
  • 05113f2 by github-actions[bot]: Update public data [skip ci]
  • 606ba53 by github-actions[bot]: Update public data [skip ci]
  • 1ffd240 by github-actions[bot]: Update public data [skip ci]
  • 105a52a by github-actions[bot]: Update public data [skip ci]
  • fda248c by github-actions[bot]: Update public data [skip ci]
  • 56dc843 by github-actions[bot]: Update public data [skip ci]
  • 34827c4 by github-actions[bot]: Update public data [skip ci]

dist/task117.py (-11, best+36, vis_many, task-details)

best: 148(Code Golf International, 4atj sisyphus luke Seek mukundan, jailctf merger) / others: 154(ox jam), 172(import itertools), 193(jacekw Potatoman nauti natte), 194(�イスケ�サ���II), 194(MasukenSamba)

old (195 bytes, base_yu/task117.py, forcomp-t/genetic-algo(zlib), )

# before compress: 224 bytes
def p(i):
 f=len(i)
 for n in range(f-2,0,-1):
  for r in range(f):
   if[1]<[i[n][r]]*4==i[n-1][r-1:r+2:2]+i[n+1][r-1:r+2:2]:
    for d in range(f*f*2):
     if e:=i[a:=d//f%f][g:=d%f]:i[n*2-a][g]=i[a][r*2-g]=e
    return i

new (184 bytes, base_yu/task117.py, forcomp-t/genetic-algo(zlib), )

# before compress: 351 bytes
def p(e):
 for r in range(len(e)-2,0,-1):
  for n in range(len(e)):
   if[1]<[e[r][n]]*4==e[r-1][n-1:n+2:2]+e[r+1][n-1:n+2:2]:
    for f in range(len(e)):
     for i in range(len(e)):
      if e[i][f]:e[r*2-i][f]=e[i][n*2-f]=e[i][f]
    for f in range(len(e)):
     for i in range(len(e)):
      if e[i][f]:e[r*2-i][f]=e[i][n*2-f]=e[i][f]
    return e

Submission 2025-10-29 16:45:38 UTC

29 Oct 16:45

Choose a tag to compare

  • score: +2 (957498 → 957500)
  • changed: 2
  • commits: 2

commits

  • 4db8d61 by github-actions[bot]: Update submission.zip [skip ci]
  • 4b9673d by Yu212: a

dist/task206.py (-1, best+17, vis_many, task-details)

best: 144(jailctf merger) / others: 148(JRKKX), 149(jacekw Potatoman nauti natte), 149(jacekw Potatoman nauti), 149(import itertools), 150(THUNDER THUNDER)

old (162 bytes, base_yu/task206.py, forplain/raw, not worth compress)

def p(g):
 y,x=divmod(sum(g,[]).index(5),len(g[0]));g[y][x]=k=0
 for v in[v for s in g for*t,v in zip(*g,s)if any(s)*any(t)]:g[y-1+k//3][x-1+k%3]=v;k+=1
 return g

new (161 bytes, base_yu/task206.py, forplain/raw, not worth compress)

def p(g):
 y,x=divmod(sum(g,[]).index(5),len(g[0]));g[y][x]=k=0
 for v in[v for s in g for*t,v in zip(*g,s)if{*s}>{0}<{*t}]:g[y-1+k//3][x-1+k%3]=v;k+=1
 return g

dist/task256.py (-1, best+12, vis_many, task-details)

best: 95(jailctf merger) / others: 96(ox jam), 98(Code Golf International), 98(4atj sisyphus luke Seek mukundan), 100(biz), 104(adakoda)

old (108 bytes, base_keymoon/task256.py, raw/raw, not worth compress)

def p(g):
 m=max(g);s=sum(m)//2;n=g.index(m)+s;h=g[:]
 while n:g.pop(0)[:n]=[2+(s<n)-(s>n)]*n;n-=1
 return h

new (107 bytes, base_keymoon/task256.py, raw/raw, not worth compress)

def p(g):
 m=max(g);s=sum(m)//2;n=g.index(m)+s;h=g*1
 while n:g.pop(0)[:n]=[2+(s<n)-(s>n)]*n;n-=1
 return h

Submission 2025-10-29 16:31:48 UTC

29 Oct 16:31

Choose a tag to compare

  • score: +9 (957489 → 957498)
  • changed: 1
  • commits: 3

commits

  • da16ad4 by github-actions[bot]: Update submission.zip [skip ci]
  • 2ec50c0 by Yu212: 105
  • cc8d02c by github-actions[bot]: Update public data [skip ci]

dist/task105.py (-9, best+49, vis_many, task-details)

best: 126(import itertools) / others: 145(jailctf merger), 148(Code Golf International), 148(4atj sisyphus luke Seek mukundan), 152(intgrah jimboko awu macaque sammyuri), 153(ox jam)

old (184 bytes, base_yu/task105.py, raw/raw, not worth compress)

p=lambda g,c=33:g*-c or c<2and p([*zip(*[[v or(s[1:-1].count(1)>1or i%~-len(g)<1)*2for v in s]for i,s in enumerate(g)])],c-1)or[*zip(*p([*zip(*g[any(g[-1])-2::-1])],c-1))][::-1]+g[-1:]

new (175 bytes, base_yu/task105.py, raw/raw, not worth compress)

p=lambda g,c=35,f=0:g*-c or c<4and[*zip(*[[v or(f<s[1:-1].count(1)**3)*2for v in s]*(f:=1)for s in p(g,c-1)][::-1])]or[*zip(*p([*zip(*g[any(g[-1])-2::-1])],c-1))][::-1]+g[-1:]

Submission 2025-10-29 13:36:10 UTC

29 Oct 13:36

Choose a tag to compare

  • score: +7 (957482 → 957489)
  • changed: 1
  • commits: 2

commits

  • 5d8e46f by github-actions[bot]: Update submission.zip [skip ci]
  • 0232d15 by Yu212: 260

dist/task260.py (-7, best+33, vis_many, task-details)

best: 135(jailctf merger) / others: 140(jacekw Potatoman nauti natte), 140(import itertools), 140(ox jam), 152(Code Golf International), 152(4atj sisyphus luke Seek mukundan)

old (175 bytes, base_yu/task260.py, forplain/raw, not worth compress)

def p(g,R=range(10)):c=sum({*sum(g,[])})-5;x,*y,z=sorted(i-j for i in R for j in R if g[i][j]);return[[c*(5!=g[i][j]>0 or i-j+2==x<y[0]or i-j-2==z>y[-1])for j in R]for i in R]

new (168 bytes, base_yu/task260.py, raw/raw, not worth compress)

p=lambda g,R=range(10):[[sum({*sum(g,[-5])})*(g[i][j]%5|(i-j+2==(z:=sorted(i-j for i in R for j in R if g[i][j]))[0]<z[1])|(i-j-2==z[-1]>z[-2])>0)for j in R]for i in R]