SphericalCow's blog

By SphericalCow, history, 7 months ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +38
  • Vote: I do not like it