Блог пользователя irmuun

Автор irmuun, история, 6 месяцев назад, По-английски

Hello,

Does anyone know how to create Codeforces like interactive problem in cms? What I mean codeforces like is no header file, just communicate with stdin/stdout, but I've never seen anything like this from other olympiads.

Thanks.

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится +16 Проголосовать: не нравится

Yes, it's possible. In fact, the two (i.e. I/O format and interactiveness) are completely independent.

In the configuration for a task in CMS, you can choose whether Submissions are compiled with a grader/stub or Submissions are self-sufficient — usually when problem-setters choose to use with a grader/stub, the grader/stub handles I/O and calls a function the contestants implement which is linked through a header file (CMS calls this feature a grader for batch tasks, and a stub for communication tasks but this is largely the same).

Interactivity is added through the task type being set to Communication instead of Batch. You then need to upload a manager, which implements the actual interaction (i.e. has access to I/O of the solution (or solution + stub), as well as the test data, and implements the problem logic). This is also what decides the score for Communication tasks.

This is explained in more detail in the CMS documentation

You can also see some discussion on this in this github issue (note that this is not perfect and has some issues as outlined in this issue)