Perl, 0 characters not in squares (25430 bytes)
##(((((((((((((((((((((((((((((((((((((((((((((( ##($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$( ##($rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr$( ##($r,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r$( ##($r,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,r$( ##($r,$cccccccccccccccccccccccccccccccccccc$,r$( ##($r,$c,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,c$,r$( ##($r,$c,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,c$,r$( ##($r,$c,@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@,c$,r$( ##($r,$c,@a))))))))))))))))))))))))))))a@,c$,r$( ##($r,$c,@a)==========================)a@,c$,r$( ##($r,$c,@a)=@@@@@@@@@@@@@@@@@@@@@@@@=)a@,c$,r$( ##($r,$c,@a)=@AAAAAAAAAAAAAAAAAAAAAA@=)a@,c$,r$( ##($r,$c,@a)=@ARRRRRRRRRRRRRRRRRRRRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGGGGGGGGGGGGGGGGGGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGVVVVVVVVVVVVVVVVGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;;;;;;;;;;;;;;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<<<<<<<<<<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<<<<<<<<<<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<''''''''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<''''''''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<'';;;;''<<;VGRA@=)a@,c$,r$( ($r,$c,@a)=@ARGV;<<'';##;''<<;VGRA@=)a@,c$,r$( ($r,$c,@a)=@ARGV;<<'';##;''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<'';;;;''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<''''''''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<''''''''<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<<<<<<<<<<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;<<<<<<<<<<<<;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGV;;;;;;;;;;;;;;VGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGVVVVVVVVVVVVVVVVGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARGGGGGGGGGGGGGGGGGGRA@=)a@,c$,r$( ##($r,$c,@a)=@ARRRRRRRRRRRRRRRRRRRRA@=)a@,c$,r$( ##($r,$c,@a)=@AAAAAAAAAAAAAAAAAAAAAA@=)a@,c$,r$( ##($r,$c,@a)=@@@@@@@@@@@@@@@@@@@@@@@@=)a@,c$,r$( ##($r,$c,@a)==========================)a@,c$,r$( ##($r,$c,@a))))))))))))))))))))))))))))a@,c$,r$( ##($r,$c,@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@,c$,r$( ##($r,$c,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,c$,r$( ##($r,$c,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,c$,r$( ##($r,$cccccccccccccccccccccccccccccccccccc$,r$( ##($r,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,r$( ##($r,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,r$( ##($rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr$( ##($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$( ##(((((((((((((((((((((((((((((((((((((((((((((( ##ffffffffffffffffffffffffffffffffffffffffff ##foooooooooooooooooooooooooooooooooooooooof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##for$yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy$rof ##for$y((((((((((((((((((((((((((((((((y$rof ##for$y(000000000000000000000000000000(y$rof ##for$y(0............................0(y$rof ##for$y(0............................0(y$rof ##for$y(0..$$$$$$$$$$$$$$$$$$$$$$$$..0(y$rof ##for$y(0..$rrrrrrrrrrrrrrrrrrrrrr$..0(y$rof ##for$y(0..$r--------------------r$..0(y$rof ##for$y(0..$r-111111111111111111-r$..0(y$rof ##for$y(0..$r-1))))))))))))))))1-r$..0(y$rof ##for$y(0..$r-1){{{{{{{{{{{{{{)1-r$..0(y$rof ##for$y(0..$r-1){<<<<<<<<<<<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<<<<<<<<<<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<''''''''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<''''''''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<'';;;;''<<{)1-r$..0(y$rof for$y(0..$r-1){<<'';##;''<<{)1-r$..0(y$rof for$y(0..$r-1){<<'';##;''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<'';;;;''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<''''''''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<''''''''<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<<<<<<<<<<<{)1-r$..0(y$rof ##for$y(0..$r-1){<<<<<<<<<<<<{)1-r$..0(y$rof ##for$y(0..$r-1){{{{{{{{{{{{{{)1-r$..0(y$rof ##for$y(0..$r-1))))))))))))))))1-r$..0(y$rof ##for$y(0..$r-111111111111111111-r$..0(y$rof ##for$y(0..$r--------------------r$..0(y$rof ##for$y(0..$rrrrrrrrrrrrrrrrrrrrrr$..0(y$rof ##for$y(0..$$$$$$$$$$$$$$$$$$$$$$$$..0(y$rof ##for$y(0............................0(y$rof ##for$y(0............................0(y$rof ##for$y(000000000000000000000000000000(y$rof ##for$y((((((((((((((((((((((((((((((((y$rof ##for$yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy$rof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##foooooooooooooooooooooooooooooooooooooooof ##ffffffffffffffffffffffffffffffffffffffffff ##ffffffffffffffffffffffffffffffffffffffffff ##foooooooooooooooooooooooooooooooooooooooof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##for$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$rof ##for$x((((((((((((((((((((((((((((((((x$rof ##for$x(000000000000000000000000000000(x$rof ##for$x(0............................0(x$rof ##for$x(0............................0(x$rof ##for$x(0..$$$$$$$$$$$$$$$$$$$$$$$$..0(x$rof ##for$x(0..$cccccccccccccccccccccc$..0(x$rof ##for$x(0..$c--------------------c$..0(x$rof ##for$x(0..$c-111111111111111111-c$..0(x$rof ##for$x(0..$c-1))))))))))))))))1-c$..0(x$rof ##for$x(0..$c-1){{{{{{{{{{{{{{)1-c$..0(x$rof ##for$x(0..$c-1){<<<<<<<<<<<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<<<<<<<<<<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<''''''''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<''''''''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<'';;;;''<<{)1-c$..0(x$rof for$x(0..$c-1){<<'';##;''<<{)1-c$..0(x$rof for$x(0..$c-1){<<'';##;''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<'';;;;''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<''''''''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<''''''''<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<<<<<<<<<<<{)1-c$..0(x$rof ##for$x(0..$c-1){<<<<<<<<<<<<{)1-c$..0(x$rof ##for$x(0..$c-1){{{{{{{{{{{{{{)1-c$..0(x$rof ##for$x(0..$c-1))))))))))))))))1-c$..0(x$rof ##for$x(0..$c-111111111111111111-c$..0(x$rof ##for$x(0..$c--------------------c$..0(x$rof ##for$x(0..$cccccccccccccccccccccc$..0(x$rof ##for$x(0..$$$$$$$$$$$$$$$$$$$$$$$$..0(x$rof ##for$x(0............................0(x$rof ##for$x(0............................0(x$rof ##for$x(000000000000000000000000000000(x$rof ##for$x((((((((((((((((((((((((((((((((x$rof ##for$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$rof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##foooooooooooooooooooooooooooooooooooooooof ##ffffffffffffffffffffffffffffffffffffffffff ##ffffffffffffffffffffffffffffffffffffffffffffffff ##foooooooooooooooooooooooooooooooooooooooooooooof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##for$ssssssssssssssssssssssssssssssssssssssss$rof ##for$s((((((((((((((((((((((((((((((((((((((s$rof ##for$s(111111111111111111111111111111111111(s$rof ##for$s(1..................................1(s$rof ##for$s(1..................................1(s$rof ##for$s(1..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..1(s$rof ##for$s(1..$cccccccccccccccccccccccccccc$..1(s$rof ##for$s(1..$c--------------------------c$..1(s$rof ##for$s(1..$c-$$$$$$$$$$$$$$$$$$$$$$$$-c$..1(s$rof ##for$s(1..$c-$xxxxxxxxxxxxxxxxxxxxxx$-c$..1(s$rof ##for$s(1..$c-$x--------------------x$-c$..1(s$rof ##for$s(1..$c-$x-111111111111111111-x$-c$..1(s$rof ##for$s(1..$c-$x-1))))))))))))))))1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){{{{{{{{{{{{{{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<<<<<<<<<<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<<<<<<<<<<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<''''''''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<''''''''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<'';;;;''<<{)1-x$-c$..1(s$rof for$s(1..$c-$x-1){<<'';##;''<<{)1-x$-c$..1(s$rof for$s(1..$c-$x-1){<<'';##;''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<'';;;;''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<''''''''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<''''''''<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<<<<<<<<<<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){<<<<<<<<<<<<{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1){{{{{{{{{{{{{{)1-x$-c$..1(s$rof ##for$s(1..$c-$x-1))))))))))))))))1-x$-c$..1(s$rof ##for$s(1..$c-$x-111111111111111111-x$-c$..1(s$rof ##for$s(1..$c-$x--------------------x$-c$..1(s$rof ##for$s(1..$c-$xxxxxxxxxxxxxxxxxxxxxx$-c$..1(s$rof ##for$s(1..$c-$$$$$$$$$$$$$$$$$$$$$$$$-c$..1(s$rof ##for$s(1..$c--------------------------c$..1(s$rof ##for$s(1..$cccccccccccccccccccccccccccc$..1(s$rof ##for$s(1..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..1(s$rof ##for$s(1..................................1(s$rof ##for$s(1..................................1(s$rof ##for$s(111111111111111111111111111111111111(s$rof ##for$s((((((((((((((((((((((((((((((((((((((s$rof ##for$ssssssssssssssssssssssssssssssssssssssss$rof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##foooooooooooooooooooooooooooooooooooooooooooooof ##ffffffffffffffffffffffffffffffffffffffffffffffff ##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ##$mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm$ ##$m========================================================m$ ##$m=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=m$ ##$m=$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$=m$ ##$m=$a[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[a$=m$ ##$m=$a[$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$[a$=m$ ##$m=$a[$oooooooooooooooooooooooooooooooooooooooooooooo$[a$=m$ ##$m=$a[$o============================================o$[a$=m$ ##$m=$a[$o=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=o$[a$=m$ ##$m=$a[$o=$cccccccccccccccccccccccccccccccccccccccc$=o$[a$=m$ ##$m=$a[$o=$c**************************************c$=o$[a$=m$ ##$m=$a[$o=$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$=o$[a$=m$ ##$m=$a[$o=$c*$yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y++++++++++++++++++++++++++++++++y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$xxxxxxxxxxxxxxxxxxxxxxxxxxxx$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x]]]]]]]]]]]]]]]]]]]]]]]]]]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];;;;;;;;;;;;;;;;;;;;;;;;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$$$$$$$$$$$$$$$$$$$$$$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$kkkkkkkkkkkkkkkkkkkk$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k==================k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0000000000000000=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;;;;;;;;;;;;;;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<<<<<<<<<<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<<<<<<<<<<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<''''''''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<''''''''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<'';;;;''<<;0=k$;]x$+y$*c$=o$[a$=m$ $m=$a[$o=$c*$y+$x];$k=0;<<'';##;''<<;0=k$;]x$+y$*c$=o$[a$=m$ $m=$a[$o=$c*$y+$x];$k=0;<<'';##;''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<'';;;;''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<''''''''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<''''''''<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<<<<<<<<<<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;<<<<<<<<<<<<;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0;;;;;;;;;;;;;;0=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k=0000000000000000=k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$k==================k$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$kkkkkkkkkkkkkkkkkkkk$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];$$$$$$$$$$$$$$$$$$$$$$;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x];;;;;;;;;;;;;;;;;;;;;;;;]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$x]]]]]]]]]]]]]]]]]]]]]]]]]]x$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$xxxxxxxxxxxxxxxxxxxxxxxxxxxx$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$y++++++++++++++++++++++++++++++++y$*c$=o$[a$=m$ ##$m=$a[$o=$c*$yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy$*c$=o$[a$=m$ ##$m=$a[$o=$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$=o$[a$=m$ ##$m=$a[$o=$c**************************************c$=o$[a$=m$ ##$m=$a[$o=$cccccccccccccccccccccccccccccccccccccccc$=o$[a$=m$ ##$m=$a[$o=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=o$[a$=m$ ##$m=$a[$o============================================o$[a$=m$ ##$m=$a[$oooooooooooooooooooooooooooooooooooooooooooooo$[a$=m$ ##$m=$a[$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$[a$=m$ ##$m=$a[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[a$=m$ ##$m=$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$=m$ ##$m=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=m$ ##$m========================================================m$ ##$mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm$ ##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ##ffffffffffffffffffffffffffffffffffffff ##foooooooooooooooooooooooooooooooooooof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##for$tttttttttttttttttttttttttttttt$rof ##for$t((((((((((((((((((((((((((((t$rof ##for$t(11111111111111111111111111(t$rof ##for$t(1........................1(t$rof ##for$t(1........................1(t$rof ##for$t(1..$$$$$$$$$$$$$$$$$$$$..1(t$rof ##for$t(1..$ssssssssssssssssss$..1(t$rof ##for$t(1..$s))))))))))))))))s$..1(t$rof ##for$t(1..$s){{{{{{{{{{{{{{)s$..1(t$rof ##for$t(1..$s){<<<<<<<<<<<<{)s$..1(t$rof ##for$t(1..$s){<<<<<<<<<<<<{)s$..1(t$rof ##for$t(1..$s){<<''''''''<<{)s$..1(t$rof ##for$t(1..$s){<<''''''''<<{)s$..1(t$rof ##for$t(1..$s){<<'';;;;''<<{)s$..1(t$rof for$t(1..$s){<<'';##;''<<{)s$..1(t$rof for$t(1..$s){<<'';##;''<<{)s$..1(t$rof ##for$t(1..$s){<<'';;;;''<<{)s$..1(t$rof ##for$t(1..$s){<<''''''''<<{)s$..1(t$rof ##for$t(1..$s){<<''''''''<<{)s$..1(t$rof ##for$t(1..$s){<<<<<<<<<<<<{)s$..1(t$rof ##for$t(1..$s){<<<<<<<<<<<<{)s$..1(t$rof ##for$t(1..$s){{{{{{{{{{{{{{)s$..1(t$rof ##for$t(1..$s))))))))))))))))s$..1(t$rof ##for$t(1..$ssssssssssssssssss$..1(t$rof ##for$t(1..$$$$$$$$$$$$$$$$$$$$..1(t$rof ##for$t(1........................1(t$rof ##for$t(1........................1(t$rof ##for$t(11111111111111111111111111(t$rof ##for$t((((((((((((((((((((((((((((t$rof ##for$tttttttttttttttttttttttttttttt$rof ##for$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$rof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##foooooooooooooooooooooooooooooooooooof ##ffffffffffffffffffffffffffffffffffffff ##ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ##foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##for((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((rof ##for($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(rof ##for($tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt$(rof ##for($t,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,t$(rof ##for($t,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,t$(rof ##for($t,$cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc$,t$(rof ##for($t,$c**********************************************************c$,t$(rof ##for($t,$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$,t$(rof ##for($t,$c*$tttttttttttttttttttttttttttttttttttttttttttttttttttttt$*c$,t$(rof ##for($t,$c*$t,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,t$*c$,t$(rof ##for($t,$c*$t,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,t$*c$,t$(rof ##for($t,$c*$t,$tttttttttttttttttttttttttttttttttttttttttttttttt$,t$*c$,t$(rof ##for($t,$c*$t,$t++++++++++++++++++++++++++++++++++++++++++++++t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$cccccccccccccccccccccccccccccccccccccccccc$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c****************************************c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$ssssssssssssssssssssssssssssssssssss$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$cccccccccccccccccccccccccccccc$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c****************************c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$$$$$$$$$$$$$$$$$$$$$$$$$$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$tttttttttttttttttttttttt$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t++++++++++++++++++++++t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$$$$$$$$$$$$$$$$$$$$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$ssssssssssssssssss$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s))))))))))))))))s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){{{{{{{{{{{{{{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<<<<<<<<<<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<<<<<<<<<<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<''''''''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<''''''''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<'';;;;''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<'';##;''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<'';##;''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<'';;;;''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<''''''''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<''''''''<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<<<<<<<<<<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){<<<<<<<<<<<<{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s){{{{{{{{{{{{{{)s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$s))))))))))))))))s$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$ssssssssssssssssss$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t+$$$$$$$$$$$$$$$$$$$$+t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$t++++++++++++++++++++++t$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$tttttttttttttttttttttttt$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c*$$$$$$$$$$$$$$$$$$$$$$$$$$*c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$c****************************c$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$cccccccccccccccccccccccccccccc$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$s,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,s$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$ssssssssssssssssssssssssssssssssssss$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$c****************************************c$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$cccccccccccccccccccccccccccccccccccccccccc$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+t$,t$*c$,t$(rof ##for($t,$c*$t,$t++++++++++++++++++++++++++++++++++++++++++++++t$,t$*c$,t$(rof ##for($t,$c*$t,$tttttttttttttttttttttttttttttttttttttttttttttttt$,t$*c$,t$(rof ##for($t,$c*$t,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,t$*c$,t$(rof ##for($t,$c*$t,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,t$*c$,t$(rof ##for($t,$c*$tttttttttttttttttttttttttttttttttttttttttttttttttttttt$*c$,t$(rof ##for($t,$c*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*c$,t$(rof ##for($t,$c**********************************************************c$,t$(rof ##for($t,$cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc$,t$(rof ##for($t,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,t$(rof ##for($t,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,t$(rof ##for($tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt$(rof ##for($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(rof ##for((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((rof ##forrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrof ##foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooof ##ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ##$kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk$ ##$k++++++++++++++++++++++++++++++++++++++++++++k$ ##$k+==========================================+k$ ##$k+=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=+k$ ##$k+=$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$=+k$ ##$k+=$a[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[a$=+k$ ##$k+=$a[$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$[a$=+k$ ##$k+=$a[$oooooooooooooooooooooooooooooooo$[a$=+k$ ##$k+=$a[$o++++++++++++++++++++++++++++++o$[a$=+k$ ##$k+=$a[$o+$$$$$$$$$$$$$$$$$$$$$$$$$$$$+o$[a$=+k$ ##$k+=$a[$o+$__________________________$+o$[a$=+k$ ##$k+=$a[$o+$_]]]]]]]]]]]]]]]]]]]]]]]]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eeeeeeeeeeeeeeeeeeeeee]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eqqqqqqqqqqqqqqqqqqqqe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$$$$$$$$$$$$$$$$$$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$mmmmmmmmmmmmmmmm$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;;;;;;;;;;;;;;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<<<<<<<<<<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<<<<<<<<<<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<''''''''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<''''''''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<'';;;;''<<;m$qe]_$+o$[a$=+k$ $k+=$a[$o+$_]eq$m;<<'';##;''<<;m$qe]_$+o$[a$=+k$ $k+=$a[$o+$_]eq$m;<<'';##;''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<'';;;;''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<''''''''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<''''''''<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<<<<<<<<<<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;<<<<<<<<<<<<;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$m;;;;;;;;;;;;;;m$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$mmmmmmmmmmmmmmmm$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eq$$$$$$$$$$$$$$$$$$qe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eqqqqqqqqqqqqqqqqqqqqe]_$+o$[a$=+k$ ##$k+=$a[$o+$_]eeeeeeeeeeeeeeeeeeeeee]_$+o$[a$=+k$ ##$k+=$a[$o+$_]]]]]]]]]]]]]]]]]]]]]]]]_$+o$[a$=+k$ ##$k+=$a[$o+$__________________________$+o$[a$=+k$ ##$k+=$a[$o+$$$$$$$$$$$$$$$$$$$$$$$$$$$$+o$[a$=+k$ ##$k+=$a[$o++++++++++++++++++++++++++++++o$[a$=+k$ ##$k+=$a[$oooooooooooooooooooooooooooooooo$[a$=+k$ ##$k+=$a[$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$[a$=+k$ ##$k+=$a[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[a$=+k$ ##$k+=$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$=+k$ ##$k+=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=+k$ ##$k+==========================================+k$ ##$k++++++++++++++++++++++++++++++++++++++++++++k$ ##$kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk$ ##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$}} ##}}$nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn$}} ##}}$n++++++++++++++++++++++++++++++++++n$}} ##}}$n+================================+n$}} ##}}$n+=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=+n$}} ##}}$n+=$kkkkkkkkkkkkkkkkkkkkkkkkkkkk$=+n$}} ##}}$n+=$k==========================k$=+n$}} ##}}$n+=$k==========================k$=+n$}} ##}}$n+=$k==4444444444444444444444==k$=+n$}} ##}}$n+=$k==4********************4==k$=+n$}} ##}}$n+=$k==4*$$$$$$$$$$$$$$$$$$*4==k$=+n$}} ##}}$n+=$k==4*$ssssssssssssssss$*4==k$=+n$}} ##}}$n+=$k==4*$s;;;;;;;;;;;;;;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<<<<<<<<<<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<<<<<<<<<<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<''''''''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<''''''''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<'';;;;''<<;s$*4==k$=+n$}} }}$n+=$k==4*$s;<<'';##;''<<;s$*4==k$=+n$}} }}$n+=$k==4*$s;<<'';##;''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<'';;;;''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<''''''''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<''''''''<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<<<<<<<<<<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;<<<<<<<<<<<<;s$*4==k$=+n$}} ##}}$n+=$k==4*$s;;;;;;;;;;;;;;s$*4==k$=+n$}} ##}}$n+=$k==4*$ssssssssssssssss$*4==k$=+n$}} ##}}$n+=$k==4*$$$$$$$$$$$$$$$$$$*4==k$=+n$}} ##}}$n+=$k==4********************4==k$=+n$}} ##}}$n+=$k==4444444444444444444444==k$=+n$}} ##}}$n+=$k==========================k$=+n$}} ##}}$n+=$k==========================k$=+n$}} ##}}$n+=$kkkkkkkkkkkkkkkkkkkkkkkkkkkk$=+n$}} ##}}$n+=$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$=+n$}} ##}}$n+================================+n$}} ##}}$n++++++++++++++++++++++++++++++++++n$}} ##}}$nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn$}} ##}}$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}pppppppppppppppppppppppppppp}}} ##}}}prrrrrrrrrrrrrrrrrrrrrrrrrrp}}} ##}}}priiiiiiiiiiiiiiiiiiiiiiiirp}}} ##}}}prinnnnnnnnnnnnnnnnnnnnnnirp}}} ##}}}printtttttttttttttttttttnirp}}} ##}}}print$$$$$$$$$$$$$$$$$$tnirp}}} ##}}}print$nnnnnnnnnnnnnnnn$tnirp}}} ##}}}print$n;;;;;;;;;;;;;;n$tnirp}}} ##}}}print$n;<<<<<<<<<<<<;n$tnirp}}} ##}}}print$n;<<<<<<<<<<<<;n$tnirp}}} ##}}}print$n;<<''''''''<<;n$tnirp}}} ##}}}print$n;<<''''''''<<;n$tnirp}}} ##}}}print$n;<<'';;;;''<<;n$tnirp}}} }}}print$n;<<'';##;''<<;n$tnirp}}} }}}print$n;<<'';##;''<<;n$tnirp}}} ##}}}print$n;<<'';;;;''<<;n$tnirp}}} ##}}}print$n;<<''''''''<<;n$tnirp}}} ##}}}print$n;<<''''''''<<;n$tnirp}}} ##}}}print$n;<<<<<<<<<<<<;n$tnirp}}} ##}}}print$n;<<<<<<<<<<<<;n$tnirp}}} ##}}}print$n;;;;;;;;;;;;;;n$tnirp}}} ##}}}print$nnnnnnnnnnnnnnnn$tnirp}}} ##}}}print$$$$$$$$$$$$$$$$$$tnirp}}} ##}}}printtttttttttttttttttttnirp}}} ##}}}prinnnnnnnnnnnnnnnnnnnnnnirp}}} ##}}}priiiiiiiiiiiiiiiiiiiiiiiirp}}} ##}}}prrrrrrrrrrrrrrrrrrrrrrrrrrp}}} ##}}}pppppppppppppppppppppppppppp}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ##}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
As you can see, every single character is part of a square. The top half of each big square is commented out by line comments, and the bottom half (including the second non-commented line) is escaped by a big here-document beginning in the middle of the square (<<'';#) and ending at the empty line after the big square.
This program was automatically generated from the following program:
($r,$c,@a)=@ARGV; for$y(0..$r-1){ for$x(0..$c-1){ for$s(1..$c-$x-1){ $m=$a[$o=$c*$y+$x];$k=0; for$t(1..$s){ for($t,$c*$t,$t+$c*$s,$c*$t+$s){ $k+=$a[$o+$_]eq$m; }}$n+=$k==4*$s; }}}print$n;
Which is a program to solve the same challenge, but (very lightly) golfed for bytes and short line lengths, not for score.
It takes as inputs first the height and width of the rectangle, then the individual characters of the rectangle separated by spaces. Example usage: To solve the rectangle
xxxyy xxyyy xyyxx
you call the program like this: perl theprogram.pl 3 5 x x x y y x x y y y x y y x x
Anyway, by squaring the code like this, it should be possible to get down to score 0 or 2 with any programming language that has a one-line solution and a line comment character, by transforming the one-liner
one-liner
like this:
##ooooooooooooooooooooo ##onnnnnnnnnnnnnnnnnnno ##oneeeeeeeeeeeeeeeeeno ##one---------------eno ##one-lllllllllllll-eno ##one-liiiiiiiiiiil-eno ##one-linnnnnnnnnil-eno ##one-lineeeeeeenil-eno ##one-linerrrrrenil-eno ##one-liner###renil-eno one-liner###renil-eno ##one-liner###renil-eno ##one-linerrrrrenil-eno ##one-lineeeeeeenil-eno ##one-linnnnnnnnnil-eno ##one-liiiiiiiiiiil-eno ##one-lllllllllllll-eno ##one---------------eno ##oneeeeeeeeeeeeeeeeeno ##onnnnnnnnnnnnnnnnnnno ##ooooooooooooooooooooo
The only characters not part of a square are the two spaces. Depending on the language, there may also be ways to use clever multiline strings or comments (like Perl's here-docs) or some sort of redundant code to make those two space characters into a square.
As for getting the byte count low, my solution has a bunch of immediate improvements, and I'm sure there are also lots of other ways to refine this technique, but I don't have the patience for that; I just wanted to provide a demonstration so you guys can go wild with it.