judge_system 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17c804bbd7b25760f2bedf41aa3fa8677ea6648d
4
- data.tar.gz: 8f991461beaf50c023fa166bcff8fe55a29dcd0b
3
+ metadata.gz: b564b3e767e4dab11a8c2724adecb3b264c2605b
4
+ data.tar.gz: 1c18db1c164a55947af759ac3c50cbd83029e067
5
5
  SHA512:
6
- metadata.gz: 5fd59c895e1e6d0043efed4af7029337822be9f74f510d439701dd1ac8ca8163413675e40709f219fcab9080b148e167fceadf4b6bdf6e0054daac44ba13ef34
7
- data.tar.gz: 3695f47bb4a465787cf7fb211eb1f26b0003f06949670fbc8f8623e5a9fdec28177e31291e38c6d12bf50055eb38a5452a7a69edc2b41e56a74b3e501b3dd5c2
6
+ metadata.gz: c49634a4566bc35769d127a2eff6db94b7d771c0b7ca075093444286d9b330b2478a3765a9c8d6eac2cd312cc273fe9f7e10fd3babfaf24b4ef95f6879f022e9
7
+ data.tar.gz: 12de0241a766e12778ed148b30aa73e5b646304a84833479bc74320b4a3b76127c3b1bc765fd856036224da50a0435d43e6a2df8bb912d43de038a53a9d2d1ac
@@ -1,6 +1,6 @@
1
1
  require 'zlib'
2
2
  require 'base64'
3
- stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
3
+ stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n")
4
4
  code = stdin[0]
5
5
  input = stdin[1]
6
6
  time = stdin[2]
@@ -1,6 +1,6 @@
1
1
  require 'zlib'
2
2
  require 'base64'
3
- stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
3
+ stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n")
4
4
  code = stdin[0]
5
5
  input = stdin[1]
6
6
  time = stdin[2]
@@ -1,6 +1,6 @@
1
1
  require 'zlib'
2
2
  require 'base64'
3
- stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
3
+ stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n")
4
4
  code = stdin[0]
5
5
  input = stdin[1]
6
6
  time = stdin[2]
@@ -1,6 +1,6 @@
1
1
  require 'zlib'
2
2
  require 'base64'
3
- stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
3
+ stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n")
4
4
  code = stdin[0]
5
5
  input = stdin[1]
6
6
  time = stdin[2]
@@ -1,6 +1,6 @@
1
1
  require 'zlib'
2
2
  require 'base64'
3
- stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
3
+ stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("\n<$><*><$>\n")
4
4
  code = stdin[0]
5
5
  input = stdin[1]
6
6
  time = stdin[2]
@@ -1,3 +1,3 @@
1
1
  module JudgeSystem
2
- VERSION = "1.5.2"
2
+ VERSION = "1.6.0"
3
3
  end
data/lib/judge_system.rb CHANGED
@@ -29,7 +29,7 @@ module JudgeSystem
29
29
  path = File.expand_path('../', __FILE__ )
30
30
  sys = File.open("#{path}/compile_systems/#{lang}_system.rb", "r").read
31
31
  data = nil
32
- spliter = "<$><*><$>\n"
32
+ spliter = "\n<$><*><$>\n"
33
33
  stdin = ZlibInput.zlib(code + spliter + input + spliter + ("%f" % time))
34
34
  begin
35
35
  data = compile( compiler: "ruby-head", code: sys, stdin: stdin )
data/lib/zlib_input.rb CHANGED
@@ -2,7 +2,7 @@ require 'zlib'
2
2
  require 'base64'
3
3
  module ZlibInput
4
4
  def zlib input
5
- data = Zlib::Deflate.deflate(input)
5
+ data = Zlib::Deflate.deflate(input, Zlib::BEST_COMPRESSION)
6
6
  Base64.encode64(data)
7
7
  end
8
8
  module_function :zlib
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judge_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - getty104