Skip to content

Commit 3b35ac8

Browse files
committed
fix getProblemHeaderAlphabet
1 parent d6cf22e commit 3b35ac8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

atcoder-problems-frontend/src/pages/TablePage/AtCoderRegularTable.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ import {
1717
combineTableColorList,
1818
} from "../../utils/TableColor";
1919
import { ProblemLink } from "../../components/ProblemLink";
20-
import { ContestLink, getRatedTarget } from "../../components/ContestLink";
20+
import { ContestLink } from "../../components/ContestLink";
2121
import ProblemModel from "../../interfaces/ProblemModel";
2222
import { SubmitTimespan } from "../../components/SubmitTimespan";
2323
import { RatingInfo } from "../../utils/RatingInfo";
2424
import { ProblemPoint } from "../../components/Problempoint";
25+
import { classifyContest } from "../../utils/ContestClassifier";
2526

2627
interface Props {
2728
contests: Contest[];
@@ -39,7 +40,8 @@ interface Props {
3940
const getProblemHeaderAlphabet = (problem: MergedProblem, contest: Contest) => {
4041
const list = problem.title.split(".");
4142
if (list.length === 0) return "";
42-
if (list[0] === "H" && getRatedTarget(contest) < 2000) return "Ex";
43+
if (list[0] === "H" && classifyContest(contest).startsWith("ABC"))
44+
return "Ex";
4345
return list[0];
4446
};
4547

@@ -116,7 +118,7 @@ const AtCoderRegularTableSFC: React.FC<Props> = (props) => {
116118
)
117119
.filter((alphabet) => alphabet.length > 0);
118120

119-
let header = Array.from(new Set(headerList));
121+
let header = Array.from(new Set(headerList)).sort();
120122
if (header.includes("Ex"))
121123
header = header.filter((c) => c != "Ex").concat("Ex");
122124

0 commit comments

Comments
 (0)