Suppose a company's programmers are struggling to code a portion of a complex program. HR orders the questions of an upcoming interview to be replaced with that of the unfinished complex program. It is never mentioned in the new question's statement that the applicants are dealing with a real problem rather than an artificial one made just for the purpose of the interview.
Due to the high difficulty, only a handful of candidates successfully solved parts of the problem. While none of their solutions would complete the program alone, when combined they would make a nice solution. CEO decides to do just that but does not hire any of those interviewed, instead have the developers copy-paste then modify the answers those interviewed presented in order to cut costs. Can companies do this without giving any compensation to the code's original writers?