Skip to content

Commit 7f572c6

Browse files
committed
✨ Add arc to contest type (#747)
1 parent a541951 commit 7f572c6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/lib/utils/contest.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export const classifyContest = (contest_id: string) => {
88
return ContestType.ABC;
99
}
1010

11+
if (/^arc\d{3}$/.exec(contest_id)) {
12+
return ContestType.ARC;
13+
}
14+
1115
if (contest_id.startsWith('APG4b')) {
1216
return ContestType.APG4B;
1317
}
@@ -57,7 +61,9 @@ export const classifyContest = (contest_id: string) => {
5761
return null;
5862
};
5963

60-
// priority: 0 (High) - 11 (Low)
64+
// priority: 0 (High) - 12 (Low)
65+
// HACK: ARCの優先順位は暫定版
66+
//
6167
// See:
6268
// https://jsprimer.net/basic/map-and-set/
6369
export const contestTypePriorities: Map<ContestType, number> = new Map([
@@ -72,7 +78,8 @@ export const contestTypePriorities: Map<ContestType, number> = new Map([
7278
[ContestType.JOI, 8],
7379
[ContestType.TESSOKU_BOOK, 9],
7480
[ContestType.MATH_AND_ALGORITHM, 10],
75-
[ContestType.OTHERS, 11],
81+
[ContestType.ARC, 11],
82+
[ContestType.OTHERS, 12],
7683
]);
7784

7885
export function getContestPriority(contestId: string): number {

0 commit comments

Comments
 (0)