-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
536 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include "Runner.hpp" | ||
RunResult::RunResult() | ||
: usrTime(0), totTime(0), mem(0), syscallcnt(0), | ||
st(Status::UKE), ret(RuntimeError::Unknown), | ||
sig(-1), maxErr(0.0) {} | ||
std::string toString(Status st) { | ||
switch(st) { | ||
case Status::AC: | ||
return "\033[32mAccepted\033[0m"; | ||
break; | ||
case Status::WA: | ||
return "\033[31mWrong Answer\033[0m"; | ||
break; | ||
case Status::MLE: | ||
return "\033[33mMemory Limit " | ||
"Exceeded\033[0m"; | ||
break; | ||
case Status::TLE: | ||
return "\033[36mTime Limit " | ||
"Exceeded\033[0m"; | ||
break; | ||
case Status::RE: | ||
return "\033[35mRuntime Error\033[0m"; | ||
break; | ||
case Status::UKE: | ||
return "\033[35mUnknown Error\033[0m"; | ||
break; | ||
case Status::SE: | ||
return "\033[35mJudge System Error\033[0m"; | ||
break; | ||
case Status::SKIPPED: | ||
return "\033[33mSkipped\033[0m"; | ||
break; | ||
default: | ||
throw; | ||
break; | ||
} | ||
} | ||
std::string toString(RuntimeError st) { | ||
switch(st) { | ||
case RuntimeError::FloatingPointError: | ||
return "Floating Point Error"; | ||
break; | ||
case RuntimeError::FloatingPointErrorO2: | ||
return "(SIGFPE):Floating Point " | ||
"Error(-O2?)"; | ||
break; | ||
case RuntimeError::NonzeroExitCode: | ||
return "Nonzero Exit Code"; | ||
break; | ||
case RuntimeError::SegmentationFault: | ||
return "Segmentation Fault"; | ||
break; | ||
case RuntimeError::Exception: | ||
return "Uncaught C++ Exception"; | ||
break; | ||
case RuntimeError::Unknown: | ||
return "Unknown"; | ||
break; | ||
default: | ||
throw; | ||
break; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "Runner.hpp" | ||
#include <Windows.h> | ||
void initRunner() {} | ||
std::string getCallName(long) { | ||
return "Unknown"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
x86_64-w64-mingw32-g++ Common.cpp Judger.cpp OJAdapter.cpp OJAPI.cpp Timer.cpp ^ | ||
PerfAnalyzer.cpp RunnerShared.cpp Scanner.cpp Checker.cpp RunnerWindows.cpp ^ | ||
Adapters/BZOJJudger.cpp Adapters/LOJJudger.cpp Adapters/DefaultJudger.cpp ^ | ||
-o ../bin/checker.out -O2 -std=c++17 -lstdc++fs -Wall -Wextra -D__WIN32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
g++ Common.cpp Judger.cpp OJAdapter.cpp OJAPI.cpp Timer.cpp \ | ||
PerfAnalyzer.cpp Runner.cpp Scanner.cpp Checker.cpp \ | ||
PerfAnalyzer.cpp RunnerCommon.cpp Scanner.cpp Checker.cpp RunnerLinux.cpp \ | ||
Adapters/BZOJJudger.cpp Adapters/LOJJudger.cpp Adapters/DefaultJudger.cpp \ | ||
-o ../bin/checker.out -O2 -std=c++17 -lstdc++fs -Wall -Wextra |
Oops, something went wrong.