Sha256: 9cc521d284f292feaae956e7c1cb00324b43d5cb0d2ce0712c7c5d70192448d5

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

require 'base64'

File.open("stdin.txt.bz2", "wb") do |file|
	file.write Base64.decode64 $stdin.read
	file.close
end

system("bunzip2 stdin.txt.bz2")

stdin = File.open("stdin.txt").read.split("\n<$><*><$>\n")
code = stdin[0]
input = stdin[1]
time = stdin[2]

File.open("./main.hs", "w") do |file|
	file.puts code
	file.close
end

File.open("./test.in", "w") do |file|
	file.puts input
	file.close
end

system "timeout -s 9 " + time + " /opt/wandbox/ghc-head/bin/runghc main.hs < test.in"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
judge_system-1.7.2 lib/compile_systems/hs_system.rb