Noam527's blog

By Noam527, history, 4 months ago, In English,

This is a quick question; I'd like to know if there is any place (some online judge possibly) in which I could put 2 programs of mine to interact with each other, just like interactive problems work here (the judge's program interacts with the submitted program).

And if there seems to be none, I'm wondering what's the best way I could implement something to do this for me.

Thanks :).

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

»
4 months ago, # |
Rev. 2   Vote: I like it +54 Vote: I do not like it

If you are on Linux:

mkfifo fifo
(./solution < fifo) | (./interactor > fifo)
»
4 months ago, # |
  Vote: I like it +18 Vote: I do not like it

Here is a cross-platform runtwo tool used a while ago on a marathon contest. There are a D version and a Python version, both should work on Windows and Linux. We use a similar tool locally for problem setting.

Example scripts for batch testing can be found in the directory above.