omg :)
The Underhanded C Contest
http://www.underhanded-c.org/
Your goal is to write the function that compares a test measurement to a reference pattern:
int match( double * test, double * reference, int bins, double threshold )
…where test and reference are 1-dimensional arrays of width bins, that encode a gamma ray spectrum of a test warhead and a reference warhead, respectively. Your detector should output a 1 (“yes”) if these two arrays are sufficiently similar, and 0 (“no”) otherwise; you should use the parameter threshold to adjust the sensitivity of the match.