Ai
1 Star 1 Fork 0

hangq/coder

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
problem.cpp 826 Bytes
一键复制 编辑 原始数据 按行查看 历史
hangq 提交于 2023-09-11 20:33 +08:00 . rename question to problem
/*
* Created by hangangqiang on 2020.11.04.
*/
#include "problem.h"
#include "common/log.h"
void TestCase::FinishInput() {
this->input_ = std::make_unique<Data>(this->input_metas_);
for (auto *input_meta : input_metas_) {
delete (input_meta);
}
this->input_metas_.clear();
}
void Problem::Execute() {
size_t answer_index = 1;
for (auto &answer : solutions_) {
CHECK_NULL_CONTINUE(answer, "test_case is nullptr");
for (auto &test_case : this->test_cases_) {
CHECK_NULL_CONTINUE(test_case, "test_case is nullptr");
CHECK_NULL_CONTINUE(test_case->GetInput(), "input in test_case is nullptr");
CHECK_NULL_CONTINUE(test_case->GetOutput(), "output in test_case is nullptr");
auto output = answer->Execute(test_case);
test_case->ResetData();
}
answer_index++;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/hangangqiang/coder.git
git@gitee.com:hangangqiang/coder.git
hangangqiang
coder
coder
master

搜索帮助