Skip to content

Commit a6bdfad

Browse files
authored
Merge pull request #1439 from kenkoooo/fix/1429
fix: algo-rated always has >=3 problems
2 parents dc92d7b + b933a54 commit a6bdfad

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

atcoder-problems-backend/sql-client/src/rated_point_sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl RatedPointSumClient for PgPool {
3030
WHERE
3131
contests.start_epoch_second >= $1
3232
AND contests.rate_change != $2
33-
AND contest_problem_count.problem_count >= 2
33+
AND contest_problem_count.problem_count >= 3
3434
",
3535
)
3636
.bind(FIRST_AGC_EPOCH_SECOND)

atcoder-problems-backend/sql-client/tests/test_rated_point_sum.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async fn setup_contests(pool: &PgPool) {
4545
id: SAME_CONTEST_RATED.to_string(),
4646
start_epoch_second: FIRST_AGC_EPOCH_SECOND,
4747
duration_second: 1000,
48-
title: "Unrated New Contest".to_string(),
48+
title: "Rated New Contest".to_string(),
4949
rate_change: "All".to_string(),
5050
},
5151
Contest {
@@ -129,6 +129,16 @@ async fn setup_contest_problems(pool: &PgPool) {
129129
problem_index: "1".to_string(),
130130
contest_id: HEURISTIC_CONTEST.to_string(),
131131
},
132+
ContestProblem {
133+
problem_id: "problem7".to_string(),
134+
problem_index: "7".to_string(),
135+
contest_id: RATED_CONTEST.to_string(),
136+
},
137+
ContestProblem {
138+
problem_id: "problem8".to_string(),
139+
problem_index: "8".to_string(),
140+
contest_id: SAME_CONTEST_RATED.to_string(),
141+
},
132142
];
133143

134144
for problem in problems {

0 commit comments

Comments
 (0)