judge_system 0.1.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -5
- data/lib/judge_system/version.rb +1 -1
- data/test.rb +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3294a46aaa12f33ed104aceb00d1a36be89735d9
|
4
|
+
data.tar.gz: 0fb22e4a345143faa2962a0d8a52f4c94a048f5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd06c5921d69176d2de37144fa789b1b73089646928e1249cda0bb9febfcc5308b80486715c18a0b9b1e3ae235e1c9e14f7f8b3c93ce7ba9481de195898ddd8
|
7
|
+
data.tar.gz: e42df5751978e866a7fcc3b6d2fa015b2ff6143fbe2354b73df65e5de3f6e70883935cd50920723f627193798bf8cade73d47041c82d63328719d59c692f7dd2
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# JudgeSystem
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Judge_system is a compile and judge system for online judge.
|
4
|
+
This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
|
5
|
+
That means you don't have to concern about dangerous codes if you use judge_system.
|
6
|
+
Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
|
7
|
+
Now, it can compile c, c++, ruby, java.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -14,14 +16,37 @@ gem 'judge_system'
|
|
14
16
|
|
15
17
|
And then execute:
|
16
18
|
|
17
|
-
|
19
|
+
$ bundle
|
18
20
|
|
19
21
|
Or install it yourself as:
|
20
22
|
|
21
|
-
|
23
|
+
$ gem install judge_system
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
27
|
+
```ruby
|
28
|
+
require 'judge_system'
|
29
|
+
|
30
|
+
JudgeSystem.judge_result lang(string text), code(string text), answer(string text), input(string text), time-limit(num sec)
|
31
|
+
|
32
|
+
#Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', java is 'java').
|
33
|
+
#You can't use more than 1M byte code, input, answer.
|
34
|
+
|
35
|
+
```
|
36
|
+
|
37
|
+
example
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
require 'judge_system'
|
41
|
+
|
42
|
+
p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'AC'
|
43
|
+
p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "2\n", 5 #=> 'WA'
|
44
|
+
p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "\n", 0.001 #=> 'TLE'
|
45
|
+
p JudgeSystem.judge_result 'c', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'RE'
|
46
|
+
```
|
47
|
+
|
48
|
+
|
49
|
+
|
25
50
|
|
26
51
|
|
27
52
|
## Development
|
data/lib/judge_system/version.rb
CHANGED
data/test.rb
CHANGED