This repository is a mirror of my competitive programming site. It is primarily intended for reference by myself and other members of the programming team at the University of Alabama, but anyone is welcome to find it useful.
Sites for problems
- Code Drills will recommend problems from the above based on your past submissions
- Competitive Programming 3 by Steven & Felix Halim
- Competitive Programmer's Handbook by Antti Laaksonen
- Guide to Competitive Programming by Antti Laaksonen
Compiling & running solutions
The commands below emulate how submissions are compiled and run at competitions and practice sites (some flags that shouldn't affect a solution's correctness unless you're doing something very strange are omitted for brevity):
g++ -std=c++14 -O2 solution.cpp && ./a.out < input.txt
gcc -O2 solution.c && ./a.out < input.txt
javac Solution.java && java Solution < input.txt
- Python 3:
python3 solution.py < input.txt
- Python 2:
python2 solution.py < input.txt
perl solution.pl < input.txt
-g for gcc/g++ to get additional debugging information out of your runtime errors.
All solutions (even Java) must be one file.