Fix stat out-of-list
This commit is contained in:
parent
9cdcfa54d6
commit
da07a9a9a4
1 changed files with 1 additions and 0 deletions
|
@ -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] = [
|
||||
|
|
Loading…
Reference in a new issue