Hello, Codeforces!
Today I’ve released an important update of the Polygon — partial support for advanced properties of resources. The main task that is being solved by this update is to support the development of problems with graders.
In most competitions, participants need to submit a complete solution code, including reading an input reading and an output writing. For example, in Codeforces rounds you solve such kind of problems. However, in some competitions another approach is using: a participant needs to implement the required function or interface.
For example, in a problem statement can be written that in a C ++ solution you need to implement a function that has prototype int sum (int a, int b) and submit the implementation. In this case, a participant has to submit a source code that contains the implementation of this function. Then, in the process of judging this solution for such a problem, an online judge should compile and link into a single executable file the file sent by the participant and a special jury-prepared file that contains the rest of the necessary code (in particular, there will be the function main).
In the case of problem ``A + B’’, such file, which is called a grader, might look like (grader.cpp):
#include <iostream>
int sum(int a, int b);
int main() {
int a, b;
std::cin >> a >> b;
std::cout << sum(a, b) << std::endl;
}
A solution might look like:
int sum(int a, int b) {
return a + b;
}
Therefore, a grader cannot be independently compiled into an executable file: it also needs a solution to the problem.
And now basic support for such problems in Polygon has been implemented (thanks to PavelKunyavskiy and cannor147 for the help!). I've started with C++ support only.
In order to add grader files, you must upload them as resources, specifying additional advanced properties: that resources are applicable to cpp.* language group, that they are compile-time resources and that solutions need to be compiled with them.

After adding such resources, while compiling solutions, they will be in the same folder with the solution, and those resources that are C++ files will be appended to the compiler command line.
Please note that all additional information for resources is available in the problem descriptor file problem.xml. Also, API is updated (see the documentation for the methods problem.files and problem.saveFile).
Later, the support of some other languages will be added. Also, I’ll add a feature to attach resources in a similar way not to solutions only, but also to validators/integrators/checkers. Of course, you can expect support for such kind of problems on Codeforces. I note that such problems can be used not only in olympiads/contests but also in the educational process. For example, I can easily imagine an exercise on Java, where you need to implement a given interface, and all other routines (unit tests and other things) are hidden in resources files.
P.S. The support of graders appeared for a special reason: today in Russia begins the IOI training camp. The best high school students will compete for the right to represent Russia on International Olympiad in Informatics. I hope, this feature will help the scientific committee to write new problems. And I wish participants every success and luck!