develooper Front page | | Postings from July 2002

Re: It's so simple ! It can't be that hard !

Thread Previous | Thread Next
July 31, 2002 10:26
Re: It's so simple ! It can't be that hard !
Message ID:
In article <>,
	Jasper McCrea <> writes:
> Ton Hospel wrote:
>> Another one that was done as a (very quick, only half a day) ircnet golf
>> for you to try your teeth on.
>> Won by mtve with a score of 85, but in the postmortem we are at 77.
>> How well can the mailinglist do this as an open golf (post your attempts
>> here)
>> Only for people who haven't played it and haven't looked at the web page.
>> Consider a 2x2 square where each position can be filled (represented by a O
>> (that's not a zero)), or empty (represented by a .). You can then
>> look how many elements are filled on each row and column, for example:
> i got 131, so not really threatening the leaderboard.
> sub p{$a[pop]+$a[pop]}sub
> r{($_/=2)&1}map{@a=(r,r,2,r,r,2);pop,print+('.',O,$/)[@a]if
> p(0,1).p(3,4).$".p(0,3).p(1,4)eq"@ARGV"}0..31
> two subroutines! my only excuse is that i am doped up on codeine after
> breaking both arms (so one was only chipped, sue me), and didn't spend
> too long on it.

It's pretty typical for this problem. It's very simple, but writing it
down seems lead to big sizes.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About