CP hub uses a content editing markup language called CP Hub Flavored Markdown, which is an extension of standard Markdown.
See the Markdown Guide - Basic Syntax for basic Markdown syntax.
We use KaTeX for rendering expressions in Markdown.
To write inline expressions, use double dollar signs for block math and single dollar signs for inline math.
Example: $x = \frac{ -b \pm \sqrt{b^2 - 4ac} }{2a}$
This rendered as:
To write block expressions, use math code blocks described below (language identifier is math
).
Example:
```math
x = \frac{ -b \pm \sqrt{b^2 - 4ac} }{2a}
```
This rendered as:
To create code blocks, use triple backticks (```) before and after the code. For inline code, use single backticks (`).
Example:
```cpp
#include <bits/stdc++.h>
```
This rendered as:
#include <bits/stdc++.h>
To specify the language for syntax highlighting, add the language identifier right after the opening backticks, like: ```cpp.
CP Hub supports syntax highlighting for the following languages:
CP Hub Flavored Markdown extends standard Markdown with additional features especially interconnectedness between contents within CP hub.
Inspired by GitHub Flavored Markdown (GFM)
Syntax | Usage | Example Input | Example Output |
---|---|---|---|
@<username> | Mention specific user | @SylvesterKwon | Loading... |
p#<problem_id> | Reference specific problem | p#0jc_YzOEZlK | Loading... |
c#<contest_id> | Reference specific contest | c#pJ7RylunRng | Loading... |
e#<editorial_id> | Reference specific editorial | e#InbrYf5ckhO | Loading... |