In this video, I discuss my competitive programming setup, including my terminal, editor, and stress testing scripts.
Links:
WSL Setup Guide: docs.microsoft.com/en-us/windows/wsl/install-win10
WSLtty Setup Guide (with Solarized Light Theme): www.steventammen.com/old-posts/basic-wsl-setup/
Path to WSL Files: \\wsl$\Ubuntu
.vimrc: pastebin.com/khJS1zmN (Make sure to enter the path to your template!)
My Template: pastebin.com/qkM21FGb
Vundle: github.com/VundleVim/Vundle.vim (Not mentioned in the video, but you'll need to install this to use Vim plugins)
Other recommended editors, if Vim isn't your cup of tea:
CLion (full-featured IDE; requires paid subscription if you don't have a student email): www.jetbrains.com/clion/
VSCode (IDE with CP extensions): code.visualstudio.com/
Geany (lightweight IDE): geany.org/
Sublime Text (text editor often used for programming): www.sublimetext.com/
Lines to place in .bashrc:
ulimit -s unlimited (Removes stack size limit)
export PATH=$PATH:~/scripts/ (Enables scripts)
Remember not to include the dashes or the text in parentheses!
Scripts (place in ~/scripts)
build.sh pastebin.com/xhw4rLfn
Format: build.sh A
Compiles A.cpp into output file A
stress.sh pastebin.com/MkfwM3S9
Format: stress.sh solutionA solutionB generator numTests
Runs solutionA and solutionB against test cases output by generator and outputs a test on which they give different results
validate.sh pastebin.com/zuRze3aW
Format: validate.sh solution validator generator numTests
Runs solution against test cases output by generator, then feeds the test cases followed by the output into validator. Returns a test case on which the validator does not output "OK".
interact.sh pastebin.com/eEFx47Nv
Format: interact.sh solution interactor numTests
Runs solution against interactor and outputs the first test on which the interactor's last output is not "OK".
Make sure to enter the path to runner.py in the script!
runner.py pastebin.com/q5GjQCT3
Necessary for interact.sh to work
コメント