diff --git a/prisma/tasks.ts b/prisma/tasks.ts index e2b795a1a..a0809412a 100755 --- a/prisma/tasks.ts +++ b/prisma/tasks.ts @@ -7667,6 +7667,62 @@ export const tasks = [ title: 'G. Wildcards', grade: 'Q1', }, + { + id: 'pastbook2022_a', + contest_id: 'pastbook2022', + problem_index: 'A', + name: '区間分割の仕方を最適化する問題', + title: 'A. 区間分割の仕方を最適化する問題', + }, + { + id: 'pastbook2022_b', + contest_id: 'pastbook2022', + problem_index: 'B', + name: '編集距離', + title: 'B. 編集距離', + }, + { + id: 'pastbook2022_c', + contest_id: 'pastbook2022', + problem_index: 'C', + name: '各部分木の大きさ', + title: 'C. 各部分木の大きさ', + }, + { + id: 'pastbook2022_d', + contest_id: 'pastbook2022', + problem_index: 'D', + name: '最小共通祖先', + title: 'D. 最小共通祖先', + }, + { + id: 'pastbook2022_e', + contest_id: 'pastbook2022', + problem_index: 'E', + name: '最大流', + title: 'E. 最大流', + }, + { + id: 'pastbook2022_f', + contest_id: 'pastbook2022', + problem_index: 'F', + name: '最小費用流', + title: 'F. 最小費用流', + }, + { + id: 'pastbook2022_g', + contest_id: 'pastbook2022', + problem_index: 'G', + name: '一点更新・区間最小値', + title: 'G. 一点更新・区間最小値', + }, + { + id: 'pastbook2022_h', + contest_id: 'pastbook2022', + problem_index: 'H', + name: '区間加算・区間最小値', + title: 'H. 区間加算・区間最小値', + }, { id: 'zone2021_f', contest_id: 'zone2021', diff --git a/src/lib/utils/contest.ts b/src/lib/utils/contest.ts index ba291fe2f..f3e045d20 100644 --- a/src/lib/utils/contest.ts +++ b/src/lib/utils/contest.ts @@ -161,6 +161,7 @@ const agcLikePrefixes = getContestPrefixes(AGC_LIKE); * utpc: 'UTPC' // University of Tokyo Programming Contest * ttpc: 'TTPC' // Tokyo Institute of Technology Programming Contest * tupc: 'TUPC' // Tohoku University Programming Contest + * wupc: 'WUPC' // Waseda University Programming Contest * } * * @remarks @@ -175,6 +176,7 @@ const ATCODER_UNIVERSITIES: ContestPrefix = { utpc: 'UTPC', ttpc: 'TTPC', tupc: 'TUPC', + wupc: 'WUPC', } as const; const atCoderUniversityPrefixes = getContestPrefixes(ATCODER_UNIVERSITIES); @@ -198,10 +200,15 @@ const atCoderUniversityPrefixes = getContestPrefixes(ATCODER_UNIVERSITIES); const ATCODER_OTHERS: ContestPrefix = { chokudai_S: 'Chokudai SpeedRun', atc001: 'AtCoder Typical Contest 001', + geocon2013: '幾何コンテスト2013', + 's8pc-3': 'square869120Contest #3', 's8pc-4': 'square869120Contest #4', + 'maximum-cup-2013': 'Maximum-Cup 2013', + 'maximum-cup-2018': 'Maximum-Cup 2018', 'code-festival-2014-quala': 'Code Festival 2014 予選 A', 'code-festival-2014-qualb': 'Code Festival 2014 予選 B', 'code-festival-2014-final': 'Code Festival 2014 決勝', + 'code-festival-2014-china-open': 'Code Festival 2014 上海', 'code-festival-2015-qualb': 'Code Festival 2015 予選 B', 'code-festival-2015-morning-middle': 'CODE FESTIVAL 2015 あさぷろ Middle', 'code-thanks-festival': 'CODE THANKS FESTIVAL', @@ -210,6 +217,9 @@ const ATCODER_OTHERS: ContestPrefix = { 'dwacon2017-prelims': '第3回 ドワンゴからの挑戦状 予選', 'mujin-pc-2016': 'Mujin Programming Challenge 2016', 'mujin-pc-2018': 'Mujin Programming Challenge 2018', + soundhound2018: 'SoundHound Inc. Programming Contest 2018 (春)', + 'pakencamp-2018-day3': 'パ研合宿コンペティション 3日目', + 'tenka1-2012-qualB': '天下一プログラマーコンテスト2012予選B', 'tenka1-2015-quala': '天下一プログラマーコンテスト2015予選A', 'tenka1-2015-qualb': '天下一プログラマーコンテスト2015予選B', 'tenka1-2016-final': '天下一プログラマーコンテスト2016本戦', @@ -218,9 +228,12 @@ const ATCODER_OTHERS: ContestPrefix = { colopl: 'COLOCON', gigacode: 'GigaCode', cpsco2019: 'CPSCO 2019', + 'nikkei2019-final': '全国統一プログラミング王決定戦本戦', 'jsc2019-final': '第一回日本最強プログラマー学生選手権決勝', 'jsc2025-final': '第六回日本最強プログラマー学生選手権 -決勝-', DEGwer2023: 'DEGwer さんの D 論応援コンテスト', + awtf2024: 'World Tour Finals 2024', + xmascon19: 'Xmas Contest 2019', } as const; const atCoderOthersPrefixes = getContestPrefixes(ATCODER_OTHERS); @@ -337,7 +350,7 @@ const regexForAwc = /^(awc)(\d{4})$/i; * Regular expression to match AtCoder University contest identifiers. * * The pattern matches strings that: - * - Start with either "ku", "qu", "ut", "tt", or "tu" + * - Start with either "ku", "qu", "ut", "tt","tu", or "wu" * - Followed by "pc" * - End with exactly year (four digits) * @@ -347,8 +360,9 @@ const regexForAwc = /^(awc)(\d{4})$/i; * - "utpc2014" * - "ttpc2022" * - "tupc2023" + * - "wupc2019" */ -const regexForAtCoderUniversity = /^(ku|qu|ut|tt|tu)(pc)(\d{4})$/i; +const regexForAtCoderUniversity = /^(ku|qu|ut|tt|tu|wu)(pc)(\d{4})$/i; export const getContestNameLabel = (contestId: string) => { // AtCoder diff --git a/src/test/lib/utils/test_cases/contest_name_labels.ts b/src/test/lib/utils/test_cases/contest_name_labels.ts index 7ce7a8f4a..a181d7e7c 100644 --- a/src/test/lib/utils/test_cases/contest_name_labels.ts +++ b/src/test/lib/utils/test_cases/contest_name_labels.ts @@ -48,6 +48,10 @@ export const atCoderOthers = [ contestId: 'atc001', expected: 'ATC 001', }), + createTestCaseForContestNameLabel('square869120Contest #3')({ + contestId: 's8pc-3', + expected: 'square869120Contest #3', + }), createTestCaseForContestNameLabel('square869120Contest #4')({ contestId: 's8pc-4', expected: 'square869120Contest #4', diff --git a/src/test/lib/utils/test_cases/contest_type.ts b/src/test/lib/utils/test_cases/contest_type.ts index 7e3d10fe9..c864ae7b4 100644 --- a/src/test/lib/utils/test_cases/contest_type.ts +++ b/src/test/lib/utils/test_cases/contest_type.ts @@ -78,6 +78,7 @@ const pastContestData = [ { name: 'PAST 15th', contestId: 'past15-open' }, { name: 'PAST 16th', contestId: 'past16-open' }, { name: 'PAST 17th', contestId: 'past17-open' }, + { name: '典型アルゴリズム問題集 上級〜エキスパート編', contestId: 'pastbook2022' }, ]; export const past = pastContestData.map(({ name, contestId }) => @@ -360,6 +361,7 @@ export const awc = awcContestIds.map((contestId) => // UTPC contests on AtCoder: 2011-2014 and 2020-2023 (not held during 2015-2019) // TTPC contests on AtCoder: 2015, 2019, 2022- // TUPC contests on AtCoder: 2022- +// WUPC contests on AtCoder: 2019 // // See: // https://kenkoooo.com/atcoder/resources/contests.json @@ -387,6 +389,7 @@ const universityContestIds = [ 'ttpc2023', 'tupc2022', 'tupc2023', + 'wupc2019', ]; export const universities = universityContestIds.map((contestId) => @@ -409,10 +412,26 @@ export const atCoderOthers = [ contestId: 'atc001', expected: ContestType.OTHERS, }), + createTestCaseForContestType('幾何コンテスト2013')({ + contestId: 'geocon2013', + expected: ContestType.OTHERS, + }), + createTestCaseForContestType('square869120Contest #3')({ + contestId: 's8pc-3', + expected: ContestType.OTHERS, + }), createTestCaseForContestType('square869120Contest #4')({ contestId: 's8pc-4', expected: ContestType.OTHERS, }), + createTestCaseForContestType('Maximum-Cup 2013')({ + contestId: 'maximum-cup-2013', + expected: ContestType.OTHERS, + }), + createTestCaseForContestType('Maximum-Cup 2018')({ + contestId: 'maximum-cup-2018', + expected: ContestType.OTHERS, + }), createTestCaseForContestType('CODE FESTIVAL 2014 qual A')({ contestId: 'code-festival-2014-quala', expected: ContestType.OTHERS, @@ -425,6 +444,10 @@ export const atCoderOthers = [ contestId: 'code-festival-2014-final', expected: ContestType.OTHERS, }), + createTestCaseForContestType('CODE FESTIVAL 2014 上海')({ + contestId: 'code-festival-2014-china-open', + expected: ContestType.OTHERS, + }), createTestCaseForContestType('CODE FESTIVAL 2015 qual B')({ contestId: 'code-festival-2015-qualb', expected: ContestType.OTHERS, @@ -465,6 +488,18 @@ export const atCoderOthers = [ contestId: 'mujin-pc-2018', expected: ContestType.OTHERS, }), + createTestCaseForContestType('SoundHound Inc. Programming Contest 2018 (春)')({ + contestId: 'soundhound2018', + expected: ContestType.OTHERS, + }), + createTestCaseForContestType('パ研合宿コンペティション 3日目')({ + contestId: 'pakencamp-2018-day3', + expected: ContestType.OTHERS, + }), + createTestCaseForContestType('天下一プログラマーコンテスト2012予選B')({ + contestId: 'tenka1-2012-qualB', + expected: ContestType.OTHERS, + }), createTestCaseForContestType('天下一プログラマーコンテスト2015予選A')({ contestId: 'tenka1-2015-quala', expected: ContestType.OTHERS, @@ -501,6 +536,10 @@ export const atCoderOthers = [ expected: ContestType.OTHERS, }), ), + createTestCaseForContestType('全国統一プログラミング王決定戦本戦')({ + contestId: 'nikkei2019-final', + expected: ContestType.OTHERS, + }), createTestCaseForContestType('第一回日本最強プログラマー学生選手権決勝')({ contestId: 'jsc2019-final', expected: ContestType.OTHERS, @@ -513,6 +552,14 @@ export const atCoderOthers = [ contestId: 'DEGwer2023', expected: ContestType.OTHERS, }), + createTestCaseForContestType('World Tour Finals 2024')({ + contestId: 'awtf2024', + expected: ContestType.OTHERS, + }), + createTestCaseForContestType('Xmas Contest 2019')({ + contestId: 'xmascon19', + expected: ContestType.OTHERS, + }), ]; // See: