|
1 | 1 | import clsx from 'clsx'; |
| 2 | +import CodeBlock from '@theme/CodeBlock'; |
2 | 3 | import Heading from '@theme/Heading'; |
3 | 4 | import styles from './styles.module.css'; |
4 | 5 |
|
| 6 | +const ioFormats = |
| 7 | +`void InputFormat() { |
| 8 | + LINE(N); |
| 9 | + LINES(A) % SIZE(N); |
| 10 | +} |
| 11 | +
|
| 12 | +void OutputFormat() { |
| 13 | + LINE(answer); |
| 14 | +} |
| 15 | +` |
| 16 | + |
| 17 | +const constraints = |
| 18 | +`void Constraints() { |
| 19 | + CONS(1 <= N && N <= 1000); |
| 20 | + CONS(eachElementBetween(A, 1, 1000000)); |
| 21 | +}` |
| 22 | + |
| 23 | +const testCases = |
| 24 | +`void TestCases() { |
| 25 | + CASE(N = 1, A = {10}); |
| 26 | + CASE(N = 100, randomArray()); |
| 27 | +}` |
| 28 | + |
5 | 29 | const FeatureList = [ |
6 | 30 | { |
7 | | - title: 'Various problem types', |
| 31 | + title: 'Define input/output formats', |
8 | 32 | description: ( |
9 | | - <> |
10 | | - Supports batch and interactive problems, as well as ICPC- and IOI-style problems. |
11 | | - </> |
| 33 | + <CodeBlock language="cpp"> |
| 34 | + {ioFormats} |
| 35 | + </CodeBlock> |
12 | 36 | ), |
13 | 37 | }, |
14 | 38 | { |
15 | | - title: 'I/O format validation', |
| 39 | + title: 'Define constraints', |
16 | 40 | description: ( |
17 | | - <> |
18 | | - Input/output formats can be validated declaratively. |
19 | | - </> |
| 41 | + <CodeBlock language="cpp"> |
| 42 | + {constraints} |
| 43 | + </CodeBlock> |
20 | 44 | ), |
21 | 45 | }, |
22 | 46 | { |
23 | | - title: 'Local grading', |
| 47 | + title: 'Define test cases', |
24 | 48 | description: ( |
25 | | - <> |
26 | | - Solutions can be tested locally against generated test cases. |
27 | | - </> |
| 49 | + <CodeBlock language="cpp"> |
| 50 | + {testCases} |
| 51 | + </CodeBlock> |
28 | 52 | ), |
29 | 53 | }, |
30 | 54 | ]; |
31 | 55 |
|
32 | 56 | function Feature({Svg, title, description}) { |
33 | 57 | return ( |
34 | 58 | <div className={clsx('col col--4')}> |
35 | | - <div className="text--center padding-horiz--md"> |
| 59 | + <div className="padding-horiz--md"> |
36 | 60 | <Heading as="h3">{title}</Heading> |
37 | 61 | <p>{description}</p> |
38 | 62 | </div> |
|
0 commit comments