This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/ordering.ts

308 lines
5 KiB
TypeScript
Raw Normal View History

2020-07-15 23:00:20 +00:00
// Section -> Category -> Module
export type SectionID = "intro" | "bronze" | "silver" | "gold" | "plat" | "adv";
export type Category = {
2020-06-25 21:26:35 +00:00
name: string;
2020-07-15 23:00:20 +00:00
items: string[];
}
2020-06-25 21:26:35 +00:00
2020-07-15 23:00:20 +00:00
const MODULE_ORDERING: {[key in SectionID]: Category[]} = {
2020-06-15 23:19:07 +00:00
"intro": [
2020-07-15 01:22:24 +00:00
{
name: "About This Guide",
items: [
"using-this-guide",
"modules",
2020-07-16 18:54:27 +00:00
"code-con",
2020-07-15 01:22:24 +00:00
]
},
2020-07-14 18:52:55 +00:00
{
2020-07-15 01:02:57 +00:00
name: "Getting Started",
2020-07-14 18:52:55 +00:00
items: [
2020-07-15 01:02:57 +00:00
"intro",
"choosing-lang",
2020-07-14 22:46:55 +00:00
"running-code",
2020-07-15 01:02:57 +00:00
"data-types",
"io",
"expected",
]
},
2020-07-16 18:23:29 +00:00
{
name: "General",
items: [
"resources",
"practicing",
"contest-strategy",
2020-07-16 20:33:46 +00:00
"contests",
"oly",
2020-07-16 18:23:29 +00:00
]
},
2020-07-15 01:02:57 +00:00
{
name: "Language-Specific",
items: [
"factors-choosing",
"fast-io",
"debugging",
2020-07-16 22:39:07 +00:00
"cpp-tips",
2020-07-14 18:52:55 +00:00
]
},
2020-07-14 22:54:51 +00:00
{
name: "Move to usaco.org?",
items: [
2020-07-14 22:46:55 +00:00
"proposing",
2020-07-17 00:49:32 +00:00
"usaco-camp",
2020-06-22 02:16:01 +00:00
]
},
2020-06-15 23:19:07 +00:00
],
"bronze": [
2020-07-15 23:00:20 +00:00
{
name: "Basics",
items: [
"time-comp",
"simulation",
"rect-geo",
"ad-hoc",
]
},
2020-06-16 01:06:49 +00:00
{
name: "Data Structures",
items: [
2020-07-06 16:37:04 +00:00
"intro-ds",
2020-06-22 17:56:41 +00:00
"pairs-tuples",
2020-07-15 17:13:31 +00:00
"unordered",
2020-06-16 01:06:49 +00:00
]
},
{
name: "Complete Search",
items: [
"complete-search",
"gen-perm",
]
},
2020-07-15 23:00:20 +00:00
{
name: "Graphs",
items: [
"intro-graphs",
]
}
2020-06-15 23:19:07 +00:00
],
"silver": [
2020-07-15 23:00:20 +00:00
{
name: "Prefix Sums",
items: [
"prefix-sums",
]
},
2020-07-06 19:33:42 +00:00
{
name: "Binary Search",
items: [
"binary-search-sorted",
"binary-search-ans",
]
},
2020-06-16 01:58:45 +00:00
{
name: "Sorting",
items: [
2020-07-06 19:33:42 +00:00
"sorting-methods",
2020-07-07 00:36:30 +00:00
"sorting-custom",
"greedy",
2020-06-16 01:58:45 +00:00
]
},
2020-06-23 01:00:35 +00:00
{
2020-07-07 00:36:30 +00:00
name: "Ordered Sets & Maps",
2020-06-23 02:17:59 +00:00
items: [
2020-07-06 19:33:42 +00:00
"intro-ordered",
"custom-cpp-stl",
2020-07-13 18:09:14 +00:00
"harder-ordered",
2020-07-06 16:37:04 +00:00
]
},
{
name: "Stacks & Queues",
items: [
"stacks-queues",
"sliding",
2020-06-23 02:17:59 +00:00
]
2020-06-23 01:00:35 +00:00
},
2020-06-22 02:16:01 +00:00
{
name: "Graphs",
items: [
"dfs",
"ff",
2020-06-22 14:26:06 +00:00
"func-graphs",
2020-06-22 02:16:01 +00:00
]
2020-06-22 14:26:06 +00:00
},
2020-06-15 23:19:07 +00:00
],
"gold": [
2020-07-15 23:00:20 +00:00
{
name: "Dynamic Programming",
items: [
"dp",
]
},
{
name: "Number Theory",
items: [
"intro-nt", // does this really belong so high up on the list??
]
},
2020-06-16 01:06:49 +00:00
{
name: "Graphs",
items: [
2020-07-13 18:09:14 +00:00
"bfs",
2020-06-16 01:06:49 +00:00
"toposort",
2020-06-20 22:27:52 +00:00
"cyc",
2020-06-16 01:06:49 +00:00
"sp",
]
},
{
2020-06-22 14:26:06 +00:00
name: "Range Queries",
2020-06-16 01:06:49 +00:00
items: [
2020-06-22 14:26:06 +00:00
"SRQ",
2020-06-23 17:27:41 +00:00
"springboards",
2020-06-22 14:26:06 +00:00
"PURS",
"PURQ",
]
},
{
name: "Trees",
items: [
2020-07-06 19:33:42 +00:00
"dsu",
"mst",
2020-06-22 14:26:06 +00:00
"dp-trees",
"tree-euler",
2020-06-16 01:06:49 +00:00
]
2020-06-16 17:51:55 +00:00
},
2020-07-15 17:13:31 +00:00
{
name: "Hashing",
items: [
"faster-hashmap",
"string-hashing",
]
}
2020-06-15 23:19:07 +00:00
],
"plat": [
2020-06-16 01:06:49 +00:00
{
name: "Range Queries",
items: [
2020-06-26 21:12:04 +00:00
"seg-ext",
2020-06-22 14:26:06 +00:00
"RURQ",
2020-06-16 01:06:49 +00:00
"2DRQ",
2020-06-28 03:56:39 +00:00
"sqrt",
2020-06-16 01:06:49 +00:00
]
},
{
2020-06-22 01:45:24 +00:00
name: "Trees",
2020-06-16 01:06:49 +00:00
items: [
2020-06-26 21:12:04 +00:00
"bin-jump",
2020-06-28 16:03:46 +00:00
"merging",
2020-06-22 01:45:24 +00:00
"hld",
"centroid",
2020-06-16 01:06:49 +00:00
]
},
2020-06-15 23:19:07 +00:00
{
name: "Dynamic Programming",
items: [
"dp-bitmasks",
2020-06-16 01:06:49 +00:00
"dp-ranges",
2020-06-28 16:03:46 +00:00
"dp-more",
2020-06-15 23:19:07 +00:00
]
2020-06-16 01:06:49 +00:00
},
2020-06-22 14:26:06 +00:00
{
name: "Graphs",
items: [
"sp-neg",
2020-06-28 03:56:39 +00:00
"BCC-2CC",
"SCC",
2020-06-25 17:43:28 +00:00
"eulers-formula",
2020-06-25 15:52:19 +00:00
"max-flow",
2020-06-28 16:03:46 +00:00
"eulerian-tours",
2020-06-22 14:26:06 +00:00
]
},
{
name: "Strings",
items: [
"string-search",
2020-06-28 02:11:09 +00:00
"suffix-array",
2020-06-22 14:26:06 +00:00
]
},
2020-06-22 21:07:07 +00:00
{
name: "Geometry",
items: [
"geo-pri",
2020-06-27 03:07:31 +00:00
"sweep-line",
2020-06-22 21:07:07 +00:00
"hull",
2020-06-25 04:00:28 +00:00
"LC",
2020-06-26 21:12:04 +00:00
"lagrange",
2020-06-25 15:52:19 +00:00
"slope",
2020-06-22 21:07:07 +00:00
]
},
2020-07-15 23:00:20 +00:00
{
name: "Misc. Topics",
items: [
"bitsets",
"fracture",
"dyna",
]
}
2020-06-25 17:51:12 +00:00
],
"adv": [
2020-06-28 16:03:46 +00:00
{
name: "Data Structures",
items: [
"treaps",
"persistent",
"segtree-beats",
"LCT",
]
},
{
name: "Flows",
items: [
"more-flows",
"min-cost-flow",
]
},
{
name: "Polynomials",
items: [
"fft",
"fft-ext",
]
},
2020-07-15 23:00:20 +00:00
{
name: "Misc. Topics",
items: [
"critical",
"string-suffix",
"game-theory",
"multiplicative",
"matroid-isect",
]
}
2020-06-15 23:19:07 +00:00
]
};
2020-07-15 23:00:20 +00:00
export default MODULE_ORDERING;
export const SECTIONS: SectionID[] = Object.keys(MODULE_ORDERING) as SectionID[];
export const SECTION_LABELS: {[key in SectionID]: string} = {
2020-06-17 01:39:47 +00:00
"intro": "Intro",
"bronze": "Bronze",
"silver": "Silver",
"gold": "Gold",
"plat": "Platinum",
2020-06-25 17:51:12 +00:00
"adv": "Advanced",
2020-06-17 02:14:52 +00:00
};
2020-06-25 21:26:35 +00:00
let moduleIDToSectionMap: {[key: string]: SectionID} = {};
2020-06-25 21:26:35 +00:00
2020-07-15 23:00:20 +00:00
SECTIONS.forEach(section => {
MODULE_ORDERING[section].forEach(category => {
category.items.forEach(moduleID => {
moduleIDToSectionMap[moduleID] = section;
})
});
2020-06-25 21:26:35 +00:00
});
2020-07-15 23:00:20 +00:00
export { moduleIDToSectionMap };