Lucy
Lucy, a CLI companion for competitive programming on AtCoder and Codeforces, frees you from tedious tasks. It automatically fetches sample tests, sets up directories, and lets you test your code with just a few commands, streamlining your workflow and letting you focus on writing brilliant solutions.
Supported Languages
- [x] C++
- [ ] Python
Supported Platforms
- [x] AtCoder
- [ ] Codeforces
Featues
- [x] Fetch Sample Test Cases
- [x] Fetch Hidden Test Cases (after the contest ðĪŠ)
- [x] Test Solution
- [x] Setup Snippets
- [x] Submit Solution
- [x] ACL Support
- [ ] What else? ðĪ
Installation
pip install lucy01
Environment Variables
-
LUCY_HOMESpecify home directory for
lucy.
Configuration
Lucy supports the following configuration options which can be accessed using the config command
group:
-
AtCoder.UserId,AtCoder.PasswordAtCoder login credentials. Required to perform tasks which require signing in such as setting up an ongoing contest.
-
NThreadsDefault threads of execution to be used when setting up a contest.
4seems to be a good choice.
Getting Started
- Set the environment variable
$LUCY_HOMEas preferred. By default, it uses the~/.lucy. - Get help!
lucy --helpCheck out the documentation.
Directory Structure
$LUCY_HOME
âââ .vscode
â âââ cp.code-snippets*
âââ AtCoder
â âââ {ARC177}
â âââ{A}
â â âââ main
â â âââ tests
â â â âââ in
â â â â âââ {00.txt}
â â â â âââ ...
â â â âââ out
â â â âââ {00.txt}
â â â âââ ...
â â âââ main.cpp
â âââ...
âââ Codeforces
âââ common*
âââ base.cpp*
âââ structures
â âââ grid.cpp
â âââ ...
âââ ...
-
Lucy organizes your competitive programming workspace with a clear directory structure. Besides folders for specific contests and their solutions with
tests, a key element is thecommondirectory. This folder stores reusable code snippets(*.cpp). These snippets can be easily inserted into your solution files using filename prefixes thanks to thecp.code-snippetsfile in the.vscodefolder. This file, automatically generated withlucy update-snippets, facilitates code completion within Visual Studio Code.