Skip to content

Commit

Permalink
fix(statisticsbrowser): no longer throw error when problems have subt…
Browse files Browse the repository at this point in the history
…ask dependence
  • Loading branch information
alphagocc committed Jul 29, 2022
1 parent 2d560e8 commit 07634fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion makespec/BUILDVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
223
224
7 changes: 5 additions & 2 deletions src/core/taskjudger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,13 @@ int TaskJudger::judge() {

overallStatus[i] = qMin(overallStatus[i], status);
}
if (isSkipped)
continue;

if (! dependenceSubtask.empty())
score[i].push_back(overallStatus[i]);

if (isSkipped)
continue;

for (int j = 0; j < task->getTestCase(i)->getInputFiles().size(); j++) {
inputFiles[i][j] = QFileInfo(curTestCase->getInputFiles().at(j)).fileName();

Expand Down
3 changes: 3 additions & 0 deletions src/statisticsbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ auto StatisticsBrowser::checkValid(QList<Task *> taskList, const QList<Contestan
return false;

for (int k = 0; k < testCaseList.length(); k++) {

//如果有子任务依赖,就会比一般的题目多一个 score 存依赖

if (scoreList[k].length() - (! testCaseList[k]->getDependenceSubtask().empty()) !=
testCaseList[k]->getInputFiles().length())
return false;
Expand Down

0 comments on commit 07634fd

Please sign in to comment.