Skip to content

Commit 66d2d4c

Browse files
authored
Merge pull request #2611 from AtCoder-NoviSteps/#2590
✨ Add tasks (#2590)
2 parents b6bf77c + 0d73c91 commit 66d2d4c

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

src/lib/utils/contest.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ export const classifyContest = (contest_id: string) => {
9292
return null;
9393
};
9494

95-
// HACK: As of June 2025, the following contests are applicable.
95+
// HACK: As of September 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 = {
98+
abl: 'ACL Beginner Contest',
9899
caddi2018b: 'CADDi 2018 for Beginners',
99100
aising2020: 'エイシング プログラミング コンテスト 2020',
100101
hhkb2020: 'HHKB プログラミングコンテスト 2020',
@@ -123,14 +124,15 @@ const AGC_LIKE: ContestPrefix = {
123124
} as const;
124125
const agcLikePrefixes = getContestPrefixes(AGC_LIKE);
125126

126-
// HACK: As of March 2025, KUPC, UTPC, TTPC and TUPC are included.
127+
// HACK: As of September 2025, KUPC, QUPC, UTPC, TTPC and TUPC are included.
127128
// More university contests may be added in the future.
128129
/**
129130
* Maps university contest ID prefixes to their display names.
130131
*
131132
* @example
132133
* {
133134
* kupc: 'KUPC' // Kyoto University Programming Contest
135+
* qupc: 'QUPC' // Kyushu University Programming Contest
134136
* utpc: 'UTPC' // University of Tokyo Programming Contest
135137
* ttpc: 'TTPC' // Tokyo Institute of Technology Programming Contest
136138
* tupc: 'TUPC' // Tohoku University Programming Contest
@@ -144,6 +146,7 @@ const agcLikePrefixes = getContestPrefixes(AGC_LIKE);
144146
*/
145147
const ATCODER_UNIVERSITIES: ContestPrefix = {
146148
kupc: 'KUPC',
149+
qupc: 'QUPC',
147150
utpc: 'UTPC',
148151
ttpc: 'TTPC',
149152
tupc: 'TUPC',
@@ -181,13 +184,15 @@ const ATCODER_OTHERS: ContestPrefix = {
181184
'mujin-pc-2016': 'Mujin Programming Challenge 2016',
182185
'mujin-pc-2018': 'Mujin Programming Challenge 2018',
183186
'tenka1-2015-quala': '天下一プログラマーコンテスト2015予選A',
187+
'tenka1-2015-qualb': '天下一プログラマーコンテスト2015予選B',
184188
'tenka1-2016-final': '天下一プログラマーコンテスト2016本戦',
185189
// Discovery Channel contest featuring algorithm problems
186190
discovery2016: 'DISCO presents ディスカバリーチャンネル プログラミングコンテスト2016',
187191
colopl: 'COLOCON',
188192
gigacode: 'GigaCode',
189193
cpsco2019: 'CPSCO 2019',
190194
'jsc2019-final': '第一回日本最強プログラマー学生選手権決勝',
195+
'jsc2025-final': '第六回日本最強プログラマー学生選手権 -決勝-',
191196
DEGwer2023: 'DEGwer さんの D 論応援コンテスト',
192197
} as const;
193198
const atCoderOthersPrefixes = getContestPrefixes(ATCODER_OTHERS);
@@ -293,17 +298,18 @@ const regexForAxc = /^(abc|arc|agc)(\d{3})/i;
293298
* Regular expression to match AtCoder University contest identifiers.
294299
*
295300
* The pattern matches strings that:
296-
* - Start with either "ku", "ut", "tt", or "tu"
301+
* - Start with either "ku", "qu", "ut", "tt", or "tu"
297302
* - Followed by "pc"
298303
* - End with exactly year (four digits)
299304
*
300305
* Example matches:
301306
* - "kupc2024"
307+
* - "qupc2018"
302308
* - "utpc2014"
303309
* - "ttpc2022"
304310
* - "tupc2023"
305311
*/
306-
const regexForAtCoderUniversity = /^(ku|ut|tt|tu)(pc)(\d{4})/i;
312+
const regexForAtCoderUniversity = /^(ku|qu|ut|tt|tu)(pc)(\d{4})$/i;
307313

308314
export const getContestNameLabel = (contestId: string) => {
309315
// AtCoder

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ export const agc = agcContestIds.map((contestId) =>
187187
);
188188

189189
export const abcLike = [
190+
createTestCaseForContestType('ACL Beginner Contest')({
191+
contestId: 'abl',
192+
expected: ContestType.ABC_LIKE,
193+
}),
190194
createTestCaseForContestType('CADDi 2018 for Beginners')({
191195
contestId: 'caddi2018b',
192196
expected: ContestType.ABC_LIKE,
@@ -277,6 +281,7 @@ export const agcLike = [
277281

278282
// Note:
279283
// KUPC contests on AtCoder: 2012-2021 and 2024- (not held during 2022-2023)
284+
// QUPC contests on AtCoder: 2014, 2018 (not held during 2015-2017, 2019-)
280285
// UTPC contests on AtCoder: 2011-2014 and 2020-2023 (not held during 2015-2019)
281286
// TTPC contests on AtCoder: 2015, 2019, 2022-
282287
// TUPC contests on AtCoder: 2022-
@@ -291,6 +296,8 @@ const universityContestIds = [
291296
'kupc2020',
292297
'kupc2021',
293298
'kupc2024',
299+
'qupc2014',
300+
'qupc2018',
294301
'utpc2011',
295302
'utpc2012',
296303
'utpc2013',
@@ -379,6 +386,10 @@ export const atCoderOthers = [
379386
contestId: 'tenka1-2015-quala',
380387
expected: ContestType.OTHERS,
381388
}),
389+
createTestCaseForContestType('天下一プログラマーコンテスト2015予選B')({
390+
contestId: 'tenka1-2015-qualb',
391+
expected: ContestType.OTHERS,
392+
}),
382393
createTestCaseForContestType('天下一プログラマーコンテスト2016本戦')({
383394
contestId: 'tenka1-2016-final',
384395
expected: ContestType.OTHERS,
@@ -411,6 +422,10 @@ export const atCoderOthers = [
411422
contestId: 'jsc2019-final',
412423
expected: ContestType.OTHERS,
413424
}),
425+
createTestCaseForContestType('第六回日本最強プログラマー学生選手権 -決勝-')({
426+
contestId: 'jsc2025-final',
427+
expected: ContestType.OTHERS,
428+
}),
414429
createTestCaseForContestType('DEGwer さんの D 論応援コンテスト')({
415430
contestId: 'DEGwer2023',
416431
expected: ContestType.OTHERS,

0 commit comments

Comments
 (0)