Skip to main content
deleted 18 characters in body
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

Haskell, 10897 bytes

n%a|z<-[1-n,3-n..n]=[do c<-r;x<-z;max" "[c|(l,r0)<-zip"|_/\\-"[0==x,y>n-2"[x,y-x==yn+1,y==xy+x,0==y]y-x,c==ly],r]|r<c==l]|r<-a,y<-z]

Try it online!Try it online!

I/O: size%listOfLines is a new list of lines.

Haskell, 108 bytes

n%a|z<-[1-n,3-n..n]=[do c<-r;x<-z;max" "[c|(l,r)<-zip"|_/\\-"[0==x,y>n-2,-x==y,y==x,0==y],c==l,r]|r<-a,y<-z]

Try it online!

I/O: size%listOfLines is a new list of lines.

Haskell, 97 bytes

n%a|z<-[1-n,3-n..n]=[do c<-r;x<-z;max" "[c|(l,0)<-zip"|_/\\-"[x,y-n+1,y+x,y-x,y],c==l]|r<-a,y<-z]

Try it online!

I/O: size%listOfLines is a new list of lines.

Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

Haskell, 108 bytes

n%a|z<-[1-n,3-n..n]=[do c<-r;x<-z;max" "[c|(l,r)<-zip"|_/\\-"[0==x,y>n-2,-x==y,y==x,0==y],c==l,r]|r<-a,y<-z]

Try it online!

I/O: size%listOfLines is a new list of lines.