Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/kenkoooo/AtCoderProblems
Browse files Browse the repository at this point in the history
…into feat-contest
  • Loading branch information
southball committed Jul 7, 2020
2 parents db52f04 + 4eb59a6 commit 5c613ac
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ export const calcTotalResult = (
return state;
}

const additionalPoint = point ? point : best.point;
return {
trialsBeforeBest: state.trialsBeforeBest + info.trialsBeforeBest,
lastBestSubmissionTime: Math.max(
state.lastBestSubmissionTime,
best.epoch_second
),
point: state.point + (point ? point : best.point),
solveCount: state.solveCount + (point ? 1 : 0),
point: state.point + additionalPoint,
solveCount: state.solveCount + (additionalPoint > 0 ? 1 : 0),
};
},
{
Expand Down

0 comments on commit 5c613ac

Please sign in to comment.