@@ -43,7 +43,8 @@ aims to do.
4343 ``` bash
4444 python main.py get -l < languages> < url-to-contest-page>
4545 ```
46- For instance, to generate testing code in C++ and Python for Weekly Contest 163, run the command:
46+ For instance, to generate testing code in C++ and Python for
47+ [ Weekly Contest 163] ( https://leetcode.com/contest/weekly-contest-163 ) , run the command:
4748 ``` bash
4849 python main.py get -l cpp python -o projects/ https://leetcode.com/contest/weekly-contest-163
4950 ```
@@ -65,4 +66,24 @@ cmake .
6566make
6667./A # to run tests for problem A
6768```
69+ You can also use IDEs (e.g., JetBrains CLion) to automate the process.
70+
6871Note that problems are renamed to single uppercase letters (in the same order as on the web page) for simplicity.
72+
73+ The generated code contains quite a lot of boilerplate code for debugging. When submitting, remember to copy everything
74+ between the lines ` // BEGIN SUBMIT ` and ` // END SUBMIT ` .
75+
76+ You can use your own template by modifying the ` TEMPLATE_CODE ` class variable in the file ` lchelper/codegen/cpp.py ` , but
77+ you should only do so if you understand what you're doing. Remember to keep the following parts intact:
78+
79+ - Comments ` // BEGIN * ` and ` // END * ` . The code generator needs them to know where to insert generated code.
80+ - ` struct TreeNode ` , ` const int NONE ` , and ` TreeNode *_construct_reee() ` . These are required to handle tree inputs in
81+ LeetCode format.
82+ - ` #include "testing.h" ` . This include points to a tiny header-only library for testing your output.
83+
84+
85+ ## TODO
86+
87+ - [ ] Python code generation
88+ - [ ] Automatic submission
89+ - [ ] Customized code templates
0 commit comments