3 ms·
This was the problem for round 2 of the C International Conciseness Contest in early 1993. Submitted programs were to take on stdin a file consisting of one or
by tzs 10y ago
This was the problem for round 2 of the C International Conciseness Contest in early 1993. Submitted programs were to take on stdin a file consisting of one or more problem instances, where each instance consisted of three lines, and solve those there were solvable, and report as unsolvable those that were not.
The first line of each instance gave the number of numbers you had to work with, the second line gave those numbers separated by space, and the third line gave the target number.
Conciseness was measured by the number of tokens in the source code. Here is a copy of the problem specification: http://computer-programming-forum.com/47-c-language/3e0a04a33eef654e.htm http://computer-programming-forum.com/47-c-language/3e0a04a3...
Here was the token counter used for that round: https://pastebin.com/bdaEedD7 https://pastebin.com/bdaEedD7
Here is the first runner up and the winner: https://pastebin.com/JcamKieX https://pastebin.com/JcamKieX
The runner up is 336 tokens. The winner is 335 tokens.
The best I was able to do was 460 tokens. (Well, the best without exploiting limitations of the token counter, but I was on dial up and so did not have the time to upload a 4 GB source file...)