Sha256: 1fd493ac46426a0d7bab90d58c68224f13c77ef20c6d10f9049625655100d87f

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 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.go', '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/go-head/bin/go run main.go < test.in')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
judge_system-1.7.4 lib/compile_systems/go_system.rb
judge_system-1.7.3 lib/compile_systems/go_system.rb