Skip to content

Commit 376123c

Browse files
authored
Merge pull request #3243 from AtCoder-NoviSteps/#3239
feat: Add tasks for ATC (#3239)
2 parents 339953f + 19c9c7e commit 376123c

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/lib/utils/contest.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ const atCoderUniversityPrefixes = getContestPrefixes(ATCODER_UNIVERSITIES);
193193
*/
194194
const ATCODER_OTHERS: ContestPrefix = {
195195
chokudai_S: 'Chokudai SpeedRun',
196+
atc001: 'AtCoder Typical Contest 001',
196197
'code-festival-2014-quala': 'Code Festival 2014 予選 A',
197198
'code-festival-2014-qualb': 'Code Festival 2014 予選 B',
198199
'code-festival-2014-final': 'Code Festival 2014 決勝',
@@ -313,16 +314,18 @@ export function getContestPriority(contestId: string): number {
313314
* - "abc376"
314315
* - "ARC128"
315316
* - "agc045"
317+
* - "atc001"
316318
* - "awc0001"
317319
*
318320
* Example non-matches:
319321
* - "xyz123"
320322
* - "abc12"
321323
* - "abc1234"
324+
* - "atc1234"
322325
* - "awc12345"
323326
*/
324-
const regexForAxc = /^(abc|arc|agc)(\d{3})/i;
325-
const regexForAwc = /^(awc)(\d{4})/i;
327+
const regexForAxc = /^(abc|arc|agc|atc)(\d{3})$/i;
328+
const regexForAwc = /^(awc)(\d{4})$/i;
326329

327330
/**
328331
* Regular expression to match AtCoder University contest identifiers.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export const atCoderOthers = [
3737
contestId: 'chokudai_S002',
3838
expected: 'Chokudai SpeedRun 002',
3939
}),
40+
createTestCaseForContestNameLabel('AtCoder Typical Contest 001')({
41+
contestId: 'atc001',
42+
expected: 'ATC 001',
43+
}),
4044
];
4145

4246
export const mathAndAlgorithm = [

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ export const atCoderOthers = [
398398
contestId: 'chokudai_S002',
399399
expected: ContestType.OTHERS,
400400
}),
401+
createTestCaseForContestType('AtCoder Typical Contest 001')({
402+
contestId: 'atc001',
403+
expected: ContestType.OTHERS,
404+
}),
401405
createTestCaseForContestType('CODE FESTIVAL 2014 qual A')({
402406
contestId: 'code-festival-2014-quala',
403407
expected: ContestType.OTHERS,

0 commit comments

Comments
 (0)