From 4d5927084f7feef6bcb684f23166d9a7597efb79 Mon Sep 17 00:00:00 2001 From: monerinngu Date: Sun, 3 May 2026 20:53:28 +0900 Subject: [PATCH] Add support for AWC --- atcoder-problems-frontend/src/pages/TablePage/index.tsx | 3 +++ .../src/pages/UserPage/PieChartBlock/index.tsx | 8 ++++++++ atcoder-problems-frontend/src/utils/ContestClassifier.ts | 4 ++++ yarn.lock | 4 ++++ 4 files changed, 19 insertions(+) create mode 100644 yarn.lock diff --git a/atcoder-problems-frontend/src/pages/TablePage/index.tsx b/atcoder-problems-frontend/src/pages/TablePage/index.tsx index e1c899941..ddaf4a2f6 100644 --- a/atcoder-problems-frontend/src/pages/TablePage/index.tsx +++ b/atcoder-problems-frontend/src/pages/TablePage/index.tsx @@ -129,6 +129,7 @@ export const TablePage: React.FC = (props) => { "ABC", "ARC", "AGC", + "AWC", "ABC-Like", "ARC-Like", "AGC-Like", @@ -146,6 +147,8 @@ export const TablePage: React.FC = (props) => { ? "AtCoder Regular Contest" : activeTab === "AGC" ? "AtCoder Grand Contest" + : activeTab === "AWC" + ? "AtCoder Weekday Contest" : activeTab === "PAST" ? "PAST" : `${activeTab} Contest` diff --git a/atcoder-problems-frontend/src/pages/UserPage/PieChartBlock/index.tsx b/atcoder-problems-frontend/src/pages/UserPage/PieChartBlock/index.tsx index 33f882db7..1ad9af06c 100644 --- a/atcoder-problems-frontend/src/pages/UserPage/PieChartBlock/index.tsx +++ b/atcoder-problems-frontend/src/pages/UserPage/PieChartBlock/index.tsx @@ -165,11 +165,19 @@ export const PieChartBlock = (props: Props) => { submissionsMap, props.userId ); + const awcSolved = solvedCountForPieChart( + Array.from(contestToProblems).filter(([contestId]) => + contestId.startsWith("awc") + ), + submissionsMap, + props.userId + ); return ( <> + ); }; diff --git a/atcoder-problems-frontend/src/utils/ContestClassifier.ts b/atcoder-problems-frontend/src/utils/ContestClassifier.ts index 705e6e1e7..79f0760e9 100644 --- a/atcoder-problems-frontend/src/utils/ContestClassifier.ts +++ b/atcoder-problems-frontend/src/utils/ContestClassifier.ts @@ -5,6 +5,7 @@ export const ContestCategories = [ "ABC", "ARC", "AGC", + "AWC", "ABC-Like", "ARC-Like", "AGC-Like", @@ -56,6 +57,9 @@ export const classifyContest = ( if (/^agc\d{3}$/.exec(contest.id)) { return "AGC"; } + if (/^awc\d{4}$/.exec(contest.id)) { + return "AWC"; + } if ( /^ahc\d{3}$/.exec(contest.id) || ["toyota2023summer-final"].includes(contest.id) diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..fb57ccd13 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +