Sha256: 2c963b22471ced9445a0f5518b2999de6909f7fadab547c8682df7a72759e444

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

#include <iostream>
#include <fstream>
using namespace std;

char command[1024];

int main(int argc, char const *argv[])
{
  ofstream ofs;
  ofs.open("main.py",ios::binary);
  string buf;
  string splitter="<$><*><$>";
  string time;
  while(getline(cin,buf)){
    if(buf==splitter)break;
    ofs<<buf<<endl;
  }
  ofs.close();
  ofs.open("test.in",ios::binary);
  while(getline(cin,buf)){
    if(buf==splitter)break;
    ofs<<buf<<endl;
  }
  ofs.close();
  cin>>time;
  system(("timeout -s 9 " + time + " /opt/wandbox/cpython-head/bin/python3 main.py < test.in").c_str());
  return 0;
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
judge_system-1.4.0 lib/compile_systems/py_system.cpp