Sha256: 26edf13f51e65cb89ef654196d636a4d7846c019577aeed90cc53d7e44065fce

Contents?: true

Size: 612 Bytes

Versions: 7

Compression:

Stored size: 612 Bytes

Contents

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

char command[1024];

int main(int argc, char const *argv[])
{
  ofstream ofs;
  ofs.open("main.c",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("/opt/wandbox/gcc-head/bin/gcc main.c -o main -O2");
  system(("timeout -s 9 " + time + " ./main < test.in").c_str());
  return 0;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
judge_system-1.4.0 lib/compile_systems/c_system.cpp
judge_system-1.3.0 lib/compile_systems/c_system.cpp
judge_system-1.2.4 lib/compile_systems/c_system.cpp
judge_system-1.2.3 lib/compile_systems/c_system.cpp
judge_system-1.2.2 lib/compile_systems/c_system.cpp
judge_system-1.2.1 lib/compile_systems/c_system.cpp
judge_system-1.2.0 lib/compile_systems/c_system.cpp