Skip to content

Releases: key-moon/golf

Submission 2025-10-29 13:12:20 UTC

29 Oct 13:12

Choose a tag to compare

  • score: +14 (957468 → 957482)
  • changed: 1
  • commits: 3

commits

  • db676ce by github-actions[bot]: Update submission.zip [skip ci]
  • f341301 by Yu212: 145
  • b6bf723 by github-actions[bot]: Update public data [skip ci]

dist/task145.py (-14, best+40, vis_many, task-details)

best: 187(import itertools) / others: 189(intgrah jimboko awu macaque sammyuri), 191(Code Golf International), 191(4atj sisyphus luke Seek mukundan), 191(ox jam), 195(jailctf merger)

old (241 bytes, base_yu/task145.py, forplain/genetic-algo(zlib), )

# before compress: 279 bytes
def p(r):
 i,e=len(r),len(r[0]);f=sorted((p,t,n,h,o)for g in range(i*e)if[[1]*e,*r][t:=g%i][n:=g//i]if[1,*r[t]][n]if(p:=(h:=[*r[t][n:],2].index(2))*(o:=[*[*zip(*r)][n][t:],2].index(2))))
 for(p,t,n,o,h)in f:
  for g in r[t:t+h]:g[n:n+o]=[(p==f[0][0])*8+(p==f[-1][0])]*o
 return r

new (227 bytes, base_yu/task145.py, raw/genetic-algo(zopfli), )

# before compress: 281 bytes
def p(p):
 f=sorted((s*i,r,g,s,i)for r in range(len(p))for g in range(len(p[0]))if(s:=[*p[r],2][g:].index(2))*(i:=[*[*zip(*p)][g],2][r:].index(2))if[1,*p[r]][g]if[1,*[*zip(*p)][g]][r])
 for n,r,g,i,s in f:
  for e in p[r:r+s]:
   e[g:g+i]=[(n==f[0][0])*8+(n==f[-1][0])]*i
 return p

Submission 2025-10-29 10:38:14 UTC

29 Oct 10:38

Choose a tag to compare

  • score: +2 (957466 → 957468)
  • changed: 1
  • commits: 3

commits

  • 615ba20 by github-actions[bot]: Update submission.zip [skip ci]
  • 7e7b4f6 by Yu212: 143
  • f643238 by github-actions[bot]: Update public data [skip ci]

dist/task143.py (-2, best+20, vis_many, task-details)

best: 135(jailctf merger) / others: 137(ox jam), 140(biz), 157(HIMAGINE THE FUTURE.), 158(Code Golf International), 158(4atj sisyphus luke Seek mukundan)

old (157 bytes, base_yu/task143.py, raw/raw, not worth compress)

p=lambda g:[[((f:=lambda c:[i-sum(g,[]).index(c)for i,v in enumerate(sum(g,[]))if v==c])(v)==f(c:=max(g[0][:3]+g[1][:3]))!=v!=c)*5or v for v in s]for s in g]

new (155 bytes, base_yu/task143.py, raw/raw, not worth compress)

p=lambda g:[[((f:=lambda c,t=0:[~i-(t:=t or~i)for i,v in enumerate(sum(g,[]))if v==c])(v)==f(c:=max(g[0][:3]+g[1][:3]))!=v!=c)*5or v for v in s]for s in g]

Submission 2025-10-29 07:47:00 UTC

29 Oct 07:47

Choose a tag to compare

  • score: +1 (957465 → 957466)
  • changed: 1
  • commits: 2

commits

  • 3543128 by github-actions[bot]: Update submission.zip [skip ci]
  • 8e50a35 by Yu212: 105

dist/task105.py (-1, best+58, 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 (185 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 (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:]

Submission 2025-10-29 07:22:20 UTC

29 Oct 07:22

Choose a tag to compare

  • score: +3 (957462 → 957465)
  • changed: 1
  • commits: 2

commits

  • 79102a3 by github-actions[bot]: Update submission.zip [skip ci]
  • d67c048 by Yu212: 285

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

best: 262(HIMAGINE THE FUTURE.) / others: 283(THUNDER THUNDER), 286(jailctf merger), 294(ShadowPrompt Labs), 296(ox jam), 297(jacekw Potatoman nauti natte)

old (262 bytes, base_yu/task285.py, forcomp-t/genetic-algo(zlib), )

<too long (len: 784)>

new (259 bytes, base_yu/task285.py, forcomp-t/genetic-algo(zopfli), )

<too long (len: 781)>

Submission 2025-10-29 07:12:22 UTC

29 Oct 07:12

Choose a tag to compare

  • score: +9 (957453 → 957462)
  • changed: 1
  • commits: 3

commits

  • c5ca5c6 by github-actions[bot]: Update submission.zip [skip ci]
  • cfc6b6d by Yu212: 255
  • c097679 by github-actions[bot]: Update public data [skip ci]

dist/task255.py (-9, best+38, vis_many, task-details)

best: 240(jailctf merger) / others: 244(ox jam), 252(intgrah jimboko awu macaque sammyuri), 281(import itertools), 287(HIMAGINE THE FUTURE.), 293(�イスケ�サ���II)

old (287 bytes, base_yu/task255.py, forcomp-t/genetic-algo(zopfli), )

# before compress: 362 bytes
def p(r):
 e=max(sum(r,[]))
 for n in range(4):
  b=[30]+[[*n,e].index(e)for n in r]+[30];i=set()
  while True:
   s,a,l,t=max((min(b[l:t])*(t-l-1),min(b[l:t])-1,l,t)for t in range(len(b)+1)for l in range(t-2)if not{l,t-1}&i)
   if s<25or a<5:break
   i|={*range(l,t)};a-=2*(t-l<5)
   for p in range(l,t-2):r[p][:a]=[3]*a
  r[:]=map(list,zip(*r[::-1]))
 return r

new (278 bytes, base_yu/task255.py, forcomp-s/genetic-algo(zlib), )

# before compress: 345 bytes
def p(r):
 f=max(r[0])
 for g in range(4):
  r[::-1]=zip(*r);i=[30]+[[*e,f].index(f)for e in r]+[30];t=set()
  while 1:
   o,a,n,e=max((min(i[n:e])*(e-n-1),min(i[n:e])-1,n,e)for e in range(len(i)+1)for n in range(e-2)if not{n,e-1}&t)
   if o<25or a<5:break
   t|={*range(n,e)};a-=2*(e-n<5)
   for l in range(n,e-2):r[l]=(3,)*a+r[l][a:]
 return r

Submission 2025-10-29 05:43:32 UTC

29 Oct 05:43

Choose a tag to compare

  • score: +16 (957437 → 957453)
  • changed: 1
  • commits: 2

commits

  • b2af393 by github-actions[bot]: Update submission.zip [skip ci]
  • c17f571 by Yu212: 101

dist/task101.py (-16, best+11, vis_many, task-details)

best: 274(jailctf merger) / others: 281(ox jam), 304(HIMAGINE THE FUTURE.), 326(jacekw Potatoman nauti natte), 326(import itertools), 337(THUNDER THUNDER)

old (301 bytes, base_yu/task101.py, raw/genetic-algo(zopfli), )

<too long (len: 1335)>

new (285 bytes, base_yu/task101.py, forcomp-t/genetic-algo(zopfli), )

<too long (len: 1251)>

Submission 2025-10-29 05:11:20 UTC

29 Oct 05:11

Choose a tag to compare

  • score: +3 (957434 → 957437)
  • changed: 1
  • commits: 2

commits

  • f14c3c8 by github-actions[bot]: Update submission.zip [skip ci]
  • f7b8079 by Yu212: 101

dist/task101.py (-3, best+27, vis_many, task-details)

best: 274(jailctf merger) / others: 281(ox jam), 304(HIMAGINE THE FUTURE.), 326(jacekw Potatoman nauti natte), 326(import itertools), 337(THUNDER THUNDER)

old (304 bytes, base_yu/task101.py, forcomp-t/genetic-algo(zopfli), )

<too long (len: 1420)>

new (301 bytes, base_yu/task101.py, raw/genetic-algo(zopfli), )

<too long (len: 1335)>

Submission 2025-10-29 04:57:57 UTC

29 Oct 04:58

Choose a tag to compare

  • score: +28 (957406 → 957434)
  • changed: 1
  • commits: 2

commits

  • 5ad22a3 by github-actions[bot]: Update submission.zip [skip ci]
  • b8258f3 by Yu212: 205

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

best: 148(jailctf merger) / others: 161(intgrah jimboko awu macaque sammyuri), 166(Code Golf International), 166(4atj sisyphus luke Seek mukundan), 170(ox jam), 179(import itertools)

old (181 bytes, base_keymoon/task205.py, raw/raw, not worth compress)

p=lambda g,c=7:-c*[[[v,sum(S:={*t,*s})-t[0]][len(S)>1]for*t,v in zip(*g,s)]for s in g]or p([*zip(*[r for r in g if(c<4)*len({*r})<4<r.count(max(u:=sum(g,g[-3]),key=u.count))])],c-1)

new (153 bytes, base_keymoon/task205.py, raw/raw, not worth compress)

p=lambda g,c=-99:c*[[[v,sum(S:={*s,*t})-v][S>{v}]for*t,v in zip(*g)]for s in g]or p([*zip(*g[any(bytes([c]*5)in bytes(g[-1])for c in g[-1])-2::-1])],c+1)

Submission 2025-10-29 04:40:21 UTC

29 Oct 04:40

Choose a tag to compare

  • score: +18 (957388 → 957406)
  • changed: 1
  • commits: 2

commits

  • 7a0f855 by github-actions[bot]: Update submission.zip [skip ci]
  • d0d9bec by Yu212: 273

dist/task273.py (-18, best+17, vis_many, task-details)

best: 88(biz) / others: 109(ShadowPrompt Labs), 116(Code Golf International), 116(4atj sisyphus luke Seek mukundan), 116(jailctf merger), 116(ox jam)

old (123 bytes, base_kq5y/task273.py, raw/raw, not worth compress)

p=lambda g,t=[],R=range(10):[sum(c)and[t:=[i for i in R if c[i]if[]==t],c][1]or[2*([]<t!=t[0]<i<t[1])for i in R]for c in g]

new (105 bytes, base_kq5y/task273.py, raw/raw, not worth compress)

p=lambda g,t={10}:[[2*[min(t)<i<max(t-{10}),s[i]and(t:=t^{i})and 2][any(s)]for i in range(10)]for s in g]

Submission 2025-10-29 04:17:31 UTC

29 Oct 04:17

Choose a tag to compare

  • score: +22 (957366 → 957388)
  • changed: 1
  • commits: 3

commits

  • c6f92c4 by github-actions[bot]: Update submission.zip [skip ci]
  • bea1c1d by Yu212: 283
  • 1da1520 by github-actions[bot]: Update public data [skip ci]

dist/task284.py (-22, best+17, vis_many, task-details)

best: 201(jailctf merger) / others: 220(Code Golf International), 220(4atj sisyphus luke Seek mukundan), 227(jacekw Potatoman nauti natte), 227(import itertools), 228(ox jam)

old (240 bytes, base_keymoon/task284.py, forcomp-t/genetic-algo(zopfli), )

# before compress: 313 bytes
def p(i):
 d,f=sorted(i)[-2:];e,s=sum(d),sum(f)
 if e<1:return[*map(list,zip(*p([*map(list,zip(*i))])))]
 f,r,d=d.index(e),i.index(d),i.index(f)
 if r>d:r,d=d,r;e,s=s,e
 while d>r+4:i[r][f]=e;i[d][f]=s;d-=1;r+=1
 i[r][f-2:f+3]=[e]*5;i[d][f-2:f+3]=[s]*5;i[r+1][f-2]=i[r+1][f+2]=e;i[d-1][f-2]=i[d-1][f+2]=s;return i

new (218 bytes, base_keymoon/task284.py, forcomp-t/genetic-algo(zopfli), )

# before compress: 303 bytes
p=lambda n:(len(i:=[a for a in range(len(n))if any(n[a])])>1)*[[max(n[i[-(a>i[0]+i[-1]>>1)]])*((i[0]+i[-1]>>1<=a<(i[0]+i[-1]>>1)+2)*2<=abs(r-n[i[0]].index(max(n[i[0]])))<=((i[0]+i[-1]>>1)-2<a<(i[0]+i[-1]>>1)+3)*2)*(i[0]<=a<=i[-1])for r in range(len(n[0]))]for a in range(len(n))]or[*zip(*p([*zip(*n)]))]