Sha256: 9d65ff4c06da83d93fbb2fa13d25906a5318ba91fd47a39723596756711fa2ac
Contents?: true
Size: 614 Bytes
Versions: 7
Compression:
Stored size: 614 Bytes
Contents
#include <iostream> #include <fstream> using namespace std; char command[1024]; int main(int argc, char const *argv[]) { ofstream ofs; ofs.open("main.cpp",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/g++ main.cpp -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