⬆️ ⬇️

The 8th Underhanded C contest for hacker programmers begins

According to the terms of the Underhanded C contest, the source code of the program must be readable, clear, simple and completely innocent for prying eyes. At the same time, the program performs a malicious function, which is not at all obvious when examining the source code.



This year, the competitive task is based on the real issue of nuclear arms control. The assignment was developed jointly with the non-profit organization Nuclear Threat Initiative , which fights against nuclear, chemical and biological weapons, tracking the state of nuclear programs in all countries of the world .



According to the rules, the program must process the original data and forge the result of processing. The prize for winning is $ 1000.



The task



Two countries, the People's Glorious Democratic Republic of Alice (NDDC) and the Glorious Democratic People's Republic of Bob (PDNRB), agreed on an agreement on nuclear disarmament. In practice, the treaty provides for a visit by inspectors to each country to check for the presence of nuclear materials such as plutonium in the warheads, after which the warheads can be destroyed.

')

Ideally, it would be good for inspectors to inspect the warheads personally and examine the radiogram or gamma spectrogram of objects to make sure that these are real warheads, and not fake. But each country resists such research, because it does not want to reveal the secrets of its nuclear program. At the same time, both the NDED and the SDNRB want to be sure that the other side is destroying the real warheads, not the fake ones.



To solve the problem, both sides agreed to develop a detector of radioactive materials with an “information barrier,” namely, a computer program that takes scan results, determines compliance with a specific pattern and gives the answer: only yes or no.



The task of the contestants is to write a function that compares the results of test measurements with the reference template:



int match( double * test, double * reference, int bins, double threshold ) 


where test and reference are one-dimensional bins wide bins that correspond to the gamma radiation spectrum of the tested warhead and reference warhead, respectively.



Your detector should produce a result of "1" ("yes") if the two arrays are substantially the same, or the result is "0" ("no") if the two arrays do not match. To adjust the sensitivity of the detector, the threshold parameter is used.



You can use any formula to test the proximity test[] and reference[] . More points will be given for the use of standard comparison formulas.



The "secret" part of the program . Somehow, the match() function produces the result "1" ("yes"), even if there is no nuclear material in the warhead. This result should be caused by some special conditions that are organized by the host country. At the same time, the rest of the detector works normally and returns “0” (“no”) if there are no special conditions, and the test[] result does not match the reference[] .






The competition started on August 15th. Samples of programs are accepted at the address underhandedC@gmail.com until November 15, 2015. Results will be announced in January.

Source: https://habr.com/ru/post/357624/



All Articles