Skip to content

Commit 6922b6c

Browse files
committed
✨ Add tasks and tests (#2141)
1 parent ed7e0ed commit 6922b6c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/lib/utils/contest.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,21 @@ export const classifyContest = (contest_id: string) => {
9292
return null;
9393
};
9494

95-
// HACK: As of April 2025, the following contests are applicable.
95+
// HACK: As of June 2025, the following contests are applicable.
9696
// Note: The classification logic may need to be revised when new contests are added.
9797
const ABC_LIKE: ContestPrefix = {
9898
aising2020: 'エイシング プログラミング コンテスト 2020',
9999
hhkb2020: 'HHKB プログラミングコンテスト 2020',
100100
panasonic2020: 'パナソニックプログラミングコンテスト 2020',
101+
jsc2021: '第二回日本最強プログラマー学生選手権',
101102
} as const;
102103
const abcLikePrefixes = new Set(getContestPrefixes(ABC_LIKE));
103104

104105
const ARC_LIKE: ContestPrefix = {
105106
'tenka1-2018': 'Tenka1 Programmer Contest 2018',
106107
'dwacon5th-prelims': '第5回 ドワンゴからの挑戦状 予選',
107108
'dwacon6th-prelims': '第6回 ドワンゴからの挑戦状 予選',
109+
diverta2019: 'diverta 2019 Programming Contest',
108110
keyence2019: 'キーエンス プログラミング コンテスト 2019',
109111
keyence2020: 'キーエンス プログラミング コンテスト 2020',
110112
keyence2021: 'キーエンス プログラミング コンテスト 2021',
@@ -168,6 +170,7 @@ const ATCODER_OTHERS: ContestPrefix = {
168170
'code-festival-2014-quala': 'Code Festival 2014 予選 A',
169171
'code-festival-2014-qualb': 'Code Festival 2014 予選 B',
170172
'code-festival-2014-final': 'Code Festival 2014 決勝',
173+
'code-festival-2015-qualb': 'Code Festival 2015 予選 B',
171174
'code-festival-2015-morning-middle': 'CODE FESTIVAL 2015 あさぷろ Middle',
172175
'code-thanks-festival': 'CODE THANKS FESTIVAL',
173176
donuts: 'Donutsプロコンチャレンジ',
@@ -181,6 +184,7 @@ const ATCODER_OTHERS: ContestPrefix = {
181184
colopl: 'COLOCON',
182185
gigacode: 'GigaCode',
183186
cpsco2019: 'CPSCO 2019',
187+
'jsc2019-final': '第一回日本最強プログラマー学生選手権決勝',
184188
DEGwer2023: 'DEGwer さんの D 論応援コンテスト',
185189
} as const;
186190
const atCoderOthersPrefixes = getContestPrefixes(ATCODER_OTHERS);

src/test/lib/utils/test_cases/contest_type.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ export const abcLike = [
199199
contestId: 'panasonic2020',
200200
expected: ContestType.ABC_LIKE,
201201
}),
202+
createTestCaseForContestType('Japanese Student Championship 2021')({
203+
contestId: 'jsc2021',
204+
expected: ContestType.ABC_LIKE,
205+
}),
202206
];
203207

204208
export const arcLike = [
@@ -214,6 +218,10 @@ export const arcLike = [
214218
contestId: 'dwacon6th-prelims',
215219
expected: ContestType.ARC_LIKE,
216220
}),
221+
createTestCaseForContestType('diverta 2019 Programming Contest')({
222+
contestId: 'diverta2019',
223+
expected: ContestType.ARC_LIKE,
224+
}),
217225
createTestCaseForContestType('KEYENCE2019')({
218226
contestId: 'keyence2019',
219227
expected: ContestType.ARC_LIKE,
@@ -319,6 +327,10 @@ export const atCoderOthers = [
319327
contestId: 'code-festival-2014-final',
320328
expected: ContestType.OTHERS,
321329
}),
330+
createTestCaseForContestType('CODE FESTIVAL 2015 qual B')({
331+
contestId: 'code-festival-2015-qualb',
332+
expected: ContestType.OTHERS,
333+
}),
322334
createTestCaseForContestType('CODE FESTIVAL 2015 あさぷろ Middle')({
323335
contestId: 'code-festival-2015-morning-middle',
324336
expected: ContestType.OTHERS,
@@ -383,6 +395,10 @@ export const atCoderOthers = [
383395
expected: ContestType.OTHERS,
384396
}),
385397
),
398+
createTestCaseForContestType('第一回日本最強プログラマー学生選手権決勝')({
399+
contestId: 'jsc2019-final',
400+
expected: ContestType.OTHERS,
401+
}),
386402
createTestCaseForContestType('DEGwer さんの D 論応援コンテスト')({
387403
contestId: 'DEGwer2023',
388404
expected: ContestType.OTHERS,

0 commit comments

Comments
 (0)