$10K coding deathmatch

Chris Carey chris.carey at gmail.com
Thu Nov 2 11:48:08 MST 2006


and PHP as one-line

$i = split("\n", fread(fopen('php://stdin','r'), 8192)); foreach($i as
$l) { $u = split(" ",$l); $s = count($u); if (strlen(trim($u[0])) ==
0) echo("not a "); for($n=0;$n<$s-1;$n++) { if (abs($u[$n] - $u[$n+1])
> $s) { printf("not a "); break; } } printf("match\n"); }



More information about the PLUG mailing list