From da07a9a9a430e7301ff85409298e1f97fd27bee6 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 24 Apr 2023 11:56:10 -0500 Subject: [PATCH] Fix stat out-of-list --- judge/views/contests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/judge/views/contests.py b/judge/views/contests.py index d1f5245..6dd739a 100644 --- a/judge/views/contests.py +++ b/judge/views/contests.py @@ -847,6 +847,7 @@ class ContestStats(TitleMixin, ContestMixin, DetailView): continue problem_idx = codes.index(problem_code) bin_idx = math.floor(point * self.POINT_BIN / max_point) + bin_idx = max(min(bin_idx, self.POINT_BIN), 0) counter[problem_idx][bin_idx] += count for i in range(num_problems): problem_points[i] = [