mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
Update
This commit is contained in:
parent
b74c6126a8
commit
ae1dca202a
@ -16,12 +16,12 @@ judge_type: standard # standard / special
|
||||
# language: cpp
|
||||
extra_files:
|
||||
- hello.txt
|
||||
# code:
|
||||
# file: main.c
|
||||
# language: c
|
||||
code:
|
||||
file: main.c
|
||||
language: c
|
||||
# code:
|
||||
# file: main.cpp
|
||||
# language: cpp
|
||||
code:
|
||||
file: main.py
|
||||
language: python
|
||||
# code:
|
||||
# file: main.py
|
||||
# language: python
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
use super::error::Result;
|
||||
use std::fmt;
|
||||
use std::path::Path;
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct ResourceUsed {
|
||||
@ -20,3 +22,14 @@ impl fmt::Display for TestCaseResult {
|
||||
write!(f, "{:?}", self)
|
||||
}
|
||||
}
|
||||
|
||||
impl TestCaseResult {
|
||||
pub fn standard<P: AsRef<Path>>(output_file: P, answer_file: P) -> Result<TestCaseResult> {
|
||||
let result = TestCaseResult::Accepted(ResourceUsed {
|
||||
time_used: 0,
|
||||
memory_used: 0,
|
||||
});
|
||||
// TODO: 对比答案文件,返回结果
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user