Sha256: 804cbe8d925652782fe8eb90f49e95a057a509faca49dda15e581c217f734817

Contents?: true

Size: 525 Bytes

Versions: 3

Compression:

Stored size: 525 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.swift", "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/swift-head/usr/bin/swiftc main.swift -o main"
system "timeout -s 9 " + time + " ./main < test.in" 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
judge_system-1.7.2 lib/compile_systems/swift_system.rb
judge_system-1.7.1 lib/compile_systems/swift_system.rb
judge_system-1.7.0 lib/compile_systems/swift_system.rb