Experimental. USE AT YOUR OWN RISK.
在正式比赛中使用的风险未知.
- Login in your preferred browser (Chrome/Edge/Firefox).
- Close the browser and make sure no browser processes are running.
- In a new folder, run
nlcc
:
$ nlcc
Choose browser [firefox|chrome|edge] (chrome): [Enter]
Browser profile path (/Users/whoami/Library/Application Support/Google/Chrome/Default): [Enter]
Choose language [nimjs|nimwasm|python3]: python3[Enter]
第 132 场双周赛
Starts in: 0 days, 4 hours, 16 minutes, 12 seconds.
If you have only one browser profile, just accept the default profile path. Otherwise, find the profile path for the current profile:
- Type
chrome://version
in the address bar. - Copy the value of
Profile Path
(个人资料路径
).
- Type
edge://version
in the address bar. - Copy the value of
Profile Path
(个人资料路径
).
- Type
about://profiles
in the address bar. - Copy the value of
Root Directory
of the desired profile.
$ nlcc help
Code templates reside in respective folders in tmpl
. Change the templates as needed (i.e. adding imports, code snippets, etc.), but leave the template variables intact.
Visual Studio Code is hard-coded as the code editor and diff tool at the moment. May be configurable in the future.
- Install Docker.
- Build docker image:
$ cd docker/python3
$ build.bat # windows
$ build.sh # others
- Use
nlcc test -l
instead ofnlcc test
to test locally
- Install Docker.
- Build docker image:
$ cd docker/python3
$ build.bat # windows
$ build.sh # others
- In your Python code, add
breakpoint()
to set breakpoints. - Run
nlcc debug
. - In VS Code, select the
Run and Debug
(运行和调试) tab, and launchnlcc debug
. The debugger should stop at the first breakpoint.
Add new implementations of BaseProject to src/projects/. For example Python3Project. Pull requests are welcome.
- Install zig
$ brew install zig # OSX
- Build
$ ./build.sh
- Browsers and OSes
Firefox | Chrome | Edge | |
---|---|---|---|
Mac OS | ✅ | ✅ | ❌ |
Windows | ✅ | ✅ | |
Linux | ❌ |
- more langauges
- python
- javascript
- typescript
- java
- kotlin
- cpp
- go
- rust
- extract sample outputs from problem description
- generate test cases according to problem description
- docker env
- python
- javascript
- limit memory and runtime
- publish to hub
- support for global site
- support for multiple browser profiles
- protect extracted session
- realtime contest ratings
- compatibility with old folder structure
- compatibility with old code template
- github actions
- build
- release
- split test cases
- custom data structures
- list (https://leetcode.cn/problems/remove-duplicate-node-lcci/)
- tree (1586)
- n-ary tree
- graph
- design
- call function
- call method
- modify args in-place (280.)
- nested integer (339)
- employee (690)
- doubly linked list (3263)
- leetcode library: nimleetcode
- read leetcode session from browser: nimbrowsercookies
- chrome: chrome.nim
- crypto: nimtestcrypto
- parse javascript page data in html: pageData.nim
- parser combinator: nimparsec
- extract question sample output: extraction.nim
- read leetcode session from browser: nimbrowsercookies
- pull precompiled files: pullPrecompiled.nim
- compile nim to javascript: nimJsProject.nim
- compile nim to wasm: nimWasmProject.nim
- build command: build.tmpl
- handle IO: post.tmpl