Simple Judger
A simple npm module to judge C/C++ program.(Linux only) using EasySandbox for safety judge
Install:
sudo? npm install simple-judger
Usage:
var judge=;var options= src: `#include<iostream>using namespace std;......` //code !REQUIRED! in: '' //input string out: '' //output string timelimit: 1000 //ms !REQUIRED! compile: 'g++ -o {out} {dest}' //compile command, {source} {out} will be replaced !REQUIRED! result: //result strings, these are default value Accepted: 'AC' Runtime_Error: 'RE' Time_Limit_Exceeded: 'TLE' Compile_Error: 'CE' Wrong_Answer: 'WA' System_Error: 'SE' ;;
Result Object:
result: 'AC' time: 10 extra: 'Hello World' //extra in different result represent different result
run npm test
for testing
Installation Error:
if "permission denied" appear, add sudo
then install again
others error please create a Issue
on github