judge_system 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/compile_systems/go_system.cpp +28 -0
- data/lib/judge_system/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f505eaee971526fa46596b7e58f0f7f5c55341e
|
4
|
+
data.tar.gz: ebd03907d6da971f3bbc69cf314c2ea018f314f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 695713b0782ef6220f85393871b4bba4bcbdd41231d104369ac3dfdbb713ae35ee85816d964e433b774283015898bb58340e725e3d94bb2ba6a4c861fdf45c8b
|
7
|
+
data.tar.gz: f91f6cd62cde9dee6a9484a916333008f19d940f0ca537685f5498069a222dcc41e700cf919c68a97581b7a6cf95480c21e3a48aa372d7972c3102ea24339f30
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Judge_system is a compile and judge system for online judge.
|
|
4
4
|
This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
|
5
5
|
That means you don't have to concern about dangerous codes if you use judge_system.
|
6
6
|
Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
|
7
|
-
Now, it can compile c, c++, ruby,
|
7
|
+
Now, it can compile c, c++, ruby, go.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -29,7 +29,7 @@ require 'judge_system'
|
|
29
29
|
|
30
30
|
JudgeSystem.judge_result lang: (string text), code: (string text), answer: (string text), stdin: (string text), time: (num sec)
|
31
31
|
|
32
|
-
#Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb',
|
32
|
+
#Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', go is 'go').
|
33
33
|
#You can't use more than 1M byte code, input, answer.
|
34
34
|
|
35
35
|
```
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#include <iostream>
|
2
|
+
#include <fstream>
|
3
|
+
using namespace std;
|
4
|
+
|
5
|
+
char command[1024];
|
6
|
+
|
7
|
+
int main(int argc, char const *argv[])
|
8
|
+
{
|
9
|
+
ofstream ofs;
|
10
|
+
ofs.open("main.go",ios::binary);
|
11
|
+
string buf;
|
12
|
+
string splitter="<$><*><$>";
|
13
|
+
string time;
|
14
|
+
while(getline(cin,buf)){
|
15
|
+
if(buf==splitter)break;
|
16
|
+
ofs<<buf<<endl;
|
17
|
+
}
|
18
|
+
ofs.close();
|
19
|
+
ofs.open("test.in",ios::binary);
|
20
|
+
while(getline(cin,buf)){
|
21
|
+
if(buf==splitter)break;
|
22
|
+
ofs<<buf<<endl;
|
23
|
+
}
|
24
|
+
ofs.close();
|
25
|
+
cin>>time;
|
26
|
+
system(("timeout -s 9 " + time + " /opt/wandbox/go-head/bin/go run main.go < test.in ").c_str());
|
27
|
+
return 0;
|
28
|
+
}
|
data/lib/judge_system/version.rb
CHANGED
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- getty104
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- judge_system.gemspec
|
74
74
|
- lib/compile_systems/c_system.cpp
|
75
75
|
- lib/compile_systems/cpp_system.cpp
|
76
|
+
- lib/compile_systems/go_system.cpp
|
76
77
|
- lib/compile_systems/java_system.cpp
|
77
78
|
- lib/compile_systems/rb_system.cpp
|
78
79
|
- lib/judge_system.rb
|