Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 204 additions & 0 deletions prisma/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5134,6 +5134,210 @@ export const tasks = [
title: 'A. 科目選択 (Selecting Subjects)',
grade: 'Q9',
},
{
id: 'typical90_cl',
contest_id: 'typical90',
problem_index: '090',
name: "Tenkei90's Last Problem(★7)",
title: "090. Tenkei90's Last Problem(★7)",
},
{
id: 'typical90_ck',
contest_id: 'typical90',
problem_index: '089',
name: 'Partitions and Inversions(★7)',
title: '089. Partitions and Inversions(★7)',
},
{
id: 'typical90_cj',
contest_id: 'typical90',
problem_index: '088',
name: 'Similar but Different Ways(★6)',
title: '088. Similar but Different Ways(★6)',
},
{
id: 'typical90_ci',
contest_id: 'typical90',
problem_index: '087',
name: "Chokudai's Demand(★5)",
title: "087. Chokudai's Demand(★5)",
},
{
id: 'typical90_ch',
contest_id: 'typical90',
problem_index: '086',
name: "Snuke's Favorite Arrays(★5)",
title: "086. Snuke's Favorite Arrays(★5)",
},
{
id: 'typical90_cg',
contest_id: 'typical90',
problem_index: '085',
name: 'Multiplication 085(★4)',
title: '085. Multiplication 085(★4)',
},
{
id: 'typical90_cf',
contest_id: 'typical90',
problem_index: '084',
name: 'There are two types of characters(★3)',
title: '084. There are two types of characters(★3)',
},
{
id: 'typical90_ce',
contest_id: 'typical90',
problem_index: '083',
name: 'Colorful Graph(★6)',
title: '083. Colorful Graph(★6)',
},
{
id: 'typical90_cd',
contest_id: 'typical90',
problem_index: '082',
name: 'Counting Numbers(★3)',
title: '082. Counting Numbers(★3)',
},
{
id: 'typical90_cc',
contest_id: 'typical90',
problem_index: '081',
name: 'Friendly Group(★5)',
title: '081. Friendly Group(★5)',
},
{
id: 'typical90_cb',
contest_id: 'typical90',
problem_index: '080',
name: "Let's Share Bit(★6)",
title: "080. Let's Share Bit(★6)",
},
{
id: 'typical90_ca',
contest_id: 'typical90',
problem_index: '079',
name: 'Two by Two(★3)',
title: '079. Two by Two(★3)',
},
{
id: 'typical90_bz',
contest_id: 'typical90',
problem_index: '078',
name: 'Easy Graph Problem(★2)',
title: '078. Easy Graph Problem(★2)',
grade: 'Q5',
},
{
id: 'typical90_n',
contest_id: 'typical90',
problem_index: '014',
name: 'We Used to Sing a Song Together(★3)',
title: '014. We Used to Sing a Song Together(★3)',
grade: 'Q3',
},
{
id: 'typical90_m',
contest_id: 'typical90',
problem_index: '013',
name: 'Passing(★5)',
title: '013. Passing(★5)',
grade: 'Q2',
},
{
id: 'typical90_l',
contest_id: 'typical90',
problem_index: '012',
name: 'Red Painting(★4)',
title: '012. Red Painting(★4)',
grade: 'Q3',
},
{
id: 'typical90_k',
contest_id: 'typical90',
problem_index: '011',
name: 'Gravy Jobs(★6)',
title: '011. Gravy Jobs(★6)',
grade: 'D1',
},
{
id: 'typical90_j',
contest_id: 'typical90',
problem_index: '010',
name: 'Score Sum Queries(★2)',
title: '010. Score Sum Queries(★2)',
grade: 'Q4',
},
{
id: 'typical90_i',
contest_id: 'typical90',
problem_index: '009',
name: 'Three Point Angle(★6)',
title: '009. Three Point Angle(★6)',
grade: 'Q1',
},
{
id: 'typical90_h',
contest_id: 'typical90',
problem_index: '008',
name: 'AtCounter(★4)',
title: '008. AtCounter(★4)',
grade: 'Q2',
},
{
id: 'typical90_g',
contest_id: 'typical90',
problem_index: '007',
name: 'CP Classes(★3)',
title: '007. CP Classes(★3)',
grade: 'Q4',
},
{
id: 'typical90_f',
contest_id: 'typical90',
problem_index: '006',
name: 'Smallest Subsequence(★5)',
title: '006. Smallest Subsequence(★5)',
grade: 'Q1',
},
{
id: 'typical90_e',
contest_id: 'typical90',
problem_index: '005',
name: 'Restricted Digits(★7)',
title: '005. Restricted Digits(★7)',
grade: 'D4',
},
{
id: 'typical90_d',
contest_id: 'typical90',
problem_index: '004',
name: 'Cross Sum(★2)',
title: '004. Cross Sum(★2)',
grade: 'Q4',
},
{
id: 'typical90_c',
contest_id: 'typical90',
problem_index: '003',
name: 'Longest Circular Road(★4)',
title: '003. Longest Circular Road(★4)',
grade: 'Q1',
},
{
id: 'typical90_b',
contest_id: 'typical90',
problem_index: '002',
name: 'Encyclopedia of Parentheses(★3)',
title: '002. Encyclopedia of Parentheses(★3)',
grade: 'Q3',
},
{
id: 'typical90_a',
contest_id: 'typical90',
problem_index: '001',
name: 'Yokan Party(★4)',
title: '001. Yokan Party(★4)',
grade: 'Q2',
},
{
id: 'past18_a',
contest_id: 'past18-open',
Expand Down
42 changes: 42 additions & 0 deletions src/lib/utils/contest_table_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,38 @@ export class JOIFirstQualRoundProvider extends ContestTableProviderBase {
}
}

export class Typical90Provider extends ContestTableProviderBase {
protected setFilterCondition(): (taskResult: TaskResult) => boolean {
return (taskResult: TaskResult) => {
if (classifyContest(taskResult.contest_id) !== this.contestType) {
return false;
}

return taskResult.contest_id === 'typical90';
};
}

getMetadata(): ContestTableMetaData {
return {
title: '競プロ典型 90 問',
abbreviationName: 'typical90',
};
}

getDisplayConfig(): ContestTableDisplayConfig {
return {
isShownHeader: false,
isShownRoundLabel: false,
roundLabelWidth: '', // No specific width for the round label in Typical90
isShownTaskIndex: true,
};
}

getContestRoundLabel(contestId: string): string {
return '';
}
}

/**
* A class that manages individual provider groups
* Manages multiple ContestTableProviders as a single group,
Expand Down Expand Up @@ -459,6 +491,15 @@ export const prepareContestProviderPresets = () => {
buttonLabel: 'JOI 一次予選',
ariaLabel: 'Filter JOI First Qualifying Round',
}).addProvider(ContestType.JOI, new JOIFirstQualRoundProvider(ContestType.JOI)),

/**
* Single group for Typical 90 Problems
*/
Typical90: () =>
new ContestTableProviderGroup(`競プロ典型 90 問`, {
buttonLabel: '競プロ典型 90 問',
ariaLabel: 'Filter Typical 90 Problems',
}).addProvider(ContestType.TYPICAL90, new Typical90Provider(ContestType.TYPICAL90)),
};
};

Expand All @@ -468,6 +509,7 @@ export const contestTableProviderGroups = {
fromAbc212ToAbc318: prepareContestProviderPresets().ABC212ToABC318(),
dps: prepareContestProviderPresets().dps(), // Dynamic Programming (DP) Contests
joiFirstQualRound: prepareContestProviderPresets().JOIFirstQualRound(),
typical90: prepareContestProviderPresets().Typical90(),
};

export type ContestTableProviderGroups = keyof typeof contestTableProviderGroups;
Loading
Loading