diff --git a/models/judge_state.js b/models/judge_state.js index 0fad90d..3737da9 100644 --- a/models/judge_state.js +++ b/models/judge_state.js @@ -93,7 +93,7 @@ class JudgeState extends Model { score: 0, status: 'Waiting', - result: '{ "status": "Waiting", "total_time": 0, "total_memory": 0, "score": 0, "case_num": 0 }' + result: '{ "status": "Waiting", "total_time": 0, "total_memory": 0, "score": 0, "case_num": 0, "compiler_output": "" }' }, val))); } diff --git a/views/judge_detail.ejs b/views/judge_detail.ejs index 930432c..7f669b8 100644 --- a/views/judge_detail.ejs +++ b/views/judge_detail.ejs @@ -26,6 +26,10 @@
<%- judge.code %>
+<% if (judge.result.compiler_output && judge.result.status === 'Compile Error') { %> +

编译信息

+
<%= judge.result.compiler_output %>
+<% } else { %>
<% for (let i = 0; i < judge.result.case_num; i++) { %> <% let testcase = judge.result[i]; %> @@ -51,6 +55,7 @@
<% } %> +<% } %>