-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtask390.py
More file actions
30 lines (25 loc) · 977 Bytes
/
task390.py
File metadata and controls
30 lines (25 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# best: 98(Code Golf International, jailctf merger) / others: 99(4atj sisyphus luke Seek mukundan), 100(ox jam), 101(intgrah jimboko awu macaque sammyuri), 103(LogicLynx), 107(jacekw Potatoman nauti natte)
# ============================================== 98 ==============================================
# def p(g):
# for _ in 0,1:
# for i in range(15):
# if g[i].count(2)>4:
# # g[i-3:i+4]=[g[i+k-4]for k in(7,6,3,4,5,2,1)]
# g[i-3:i+4]=[g[i+k-4]for k in b""]
# *g,=zip(*g)
# return g
p=lambda g,c=-29,k=3:c*g or exec(g[i:=c%15].count(2)//5*2*"g[i-k],g[i+k]=g[i+k],g[i-k];k=2;")or p([*zip(*g)],c+1)
# def p(g):
# for _ in 0,1:
# for i in range(15):
# if g[i].count(2)>4:g[i+2],g[i-2],g[i+3],g[i-3]=g[i-2],g[i+2],g[i-3],g[i+3]
# *g,=zip(*g)
# return g
# def p(g):
# for _ in 0,1:
# for i in range(15):
# if g[i].count(2)>4:
# g[i+2],g[i-2]=g[i-2],g[i+2]
# g[i+3],g[i-3]=g[i-3],g[i+3]
# *g,=zip(*g)
# return[*map(list,g)]