Sha256: 89377aa4ade27a1121de23a83b198328727bb094b2907a2ef7fd91b0314b8f0e
Contents?: true
Size: 447 Bytes
Versions: 3
Compression:
Stored size: 447 Bytes
Contents
require 'zlib' require 'base64' stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n") code = stdin[0] input = stdin[1] time = stdin[2] File.open("./main.cpp", "w") do |file| file.puts code file.close end File.open("./test.in", "w") do |file| file.puts input file.close end system "/opt/wandbox/gcc-head/bin/g++ main.cpp -o main -O2" system "timeout -s 9 " + time + " ./main < test.in"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
judge_system-1.6.2 | lib/compile_systems/cpp_system.rb |
judge_system-1.6.1 | lib/compile_systems/cpp_system.rb |
judge_system-1.6.0 | lib/compile_systems/cpp_system.rb |