Testing interactive problems' codes

Revision en2, by ldn694, 2020-11-22 18:13:01

Hello peoples of codeforces, I just want to ask a question. Recently, I found debugging interactive problems' code manually kinda frustrating. Take this problem as an example. Having to answer the code's queries on my own is really time-consuming and one mistake means typing all over again. But if we could have another code that can simply read the original code's queries and answering them automatically then it would be really useful and convenient, especially when participating in a contest. If the problem was non-interactive, I would simply use files for input and output, but interactive problems require simultaneous interaction between two codes, which makes the solution of using files failed. So I am curious to know how to implement that. I would be so appreciative if someone can provide me a template in C++. Thanks for reading and have a nice day.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ldn694 2020-11-22 18:13:01 0 (published)
en1 English ldn694 2020-11-22 18:12:37 950 Initial revision (saved to drafts)