ranking now calculate from max sub

This commit is contained in:
MW-7892 2022-03-28 01:47:52 +07:00
parent 92f719c0f4
commit 0cd980f602
2 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,7 @@ fi
cd $APP/dist
if [ ! -z "$STATIC_CDN_HOST" ]; then
find . -name "*.*" -type f -exec sed -i "s/__STATIC_CDN_HOST__/\/$STATIC_CDN_HOST/g" {} \;
find . -name "*.*" -type f -exec sed -i "s/\/$STATIC_CDN_HOST/g" {} \;
else
find . -name "*.*" -type f -exec sed -i "s/__STATIC_CDN_HOST__\///g" {} \;
fi

View File

@ -396,7 +396,9 @@ class JudgeDispatcher(DispatcherBase):
current_score = self.submission.statistic_info["score"]
last_score = rank.submission_info.get(problem_id)
if last_score:
rank.total_score = rank.total_score - last_score + current_score
# rank.total_score = rank.total_score - last_score + current_score
rank.total_score = max(rank.total_score - last_score + current_score, rank.total_score)
current_score = max(current_score, last_score)
else:
rank.total_score = rank.total_score + current_score
rank.submission_info[problem_id] = current_score