docs icon indicating copy to clipboard operation
docs copied to clipboard

problem_format: add C++ templates

Open Riolku opened this issue 2 years ago • 3 comments

Many templates have been floating around in the DMOJ community for validation and input handling in checkers. This commit aims to consolidate them. It has two main goals:

  • Correct. Duh.

  • Simple. Other templates that circulate, including the ones I have published, are too complex. People naively try and write their own. I am sick and tired of reading over incorrect validators.

    These templates forgo some principles of good design (such as object-oriented programming) in favour of pure simplicity. They should be simple enough that they are understandable by the broader community, and are not a black box. Hopefully this also dissuades re-writing.

Riolku avatar Jan 08 '24 05:01 Riolku

Can we make sure the templates pass clang-format?

quantum5 avatar Jan 08 '24 05:01 quantum5

Yes, I'd be happy to add CI for that. Would you also like me to add some tests for the methods using ctest?

Riolku avatar Jan 08 '24 05:01 Riolku

Would you also like me to add some tests for the methods using ctest?

Sure, but at least make sure they build or something.

quantum5 avatar Jan 08 '24 05:01 quantum5