Seperated File for Main and Template Program?

Revision en2, by SphericalCow, 2024-05-30 14:59:17

Personally, I like to format my code as cleanly and simplistic as possible without much of templates on top of it. On the other hand, having templates can give the advantage in terms of shortening and optimizing code alongside saving time during contests. I was wondering if it were possible to add functionality to codeforces (and other websites) that allows you to submit the main and the template program (as a header file) separately into the same problem submission for the sake of cleanliness. So instead of putting 200-300 lines of templates above, the main program could just communicate with the template in a separate file through #include "template.h".

Also since you would have the same template for a long time I was thinking maybe we can link this template file as a "default template" into your profile so whenever #include "template.h" is called, codeforces would use the last template saved if the user wants to use this functionality. In addition to that, whenever some users wanted to see other people code, they wouldnt need to scroll far down passing all the templates. Probably would be useful in irl contest if the committee allows template.

Out of curiousity, is this a possible or even reasonable feature that can be implemented or are there reasons to not include this into cp? Maybe not possible for security reasons? Thank you.

Tags template, judge


  Rev. Lang. By When Δ Comment
en2 English SphericalCow 2024-05-30 14:59:17 37
en1 English SphericalCow 2024-05-29 14:25:01 1418 Initial revision (published)