So, my contest is over. I partially accomplish the assignment.
Successfully resolve the first task in the scope of which program should speed up comparing with an example and should write to stdout tetrahedral number for each positive integer that came from stdin.
The second task should resolve the maximum subarray problem using some algorithm, but I haven't enough time to get it done.