This concept has been extended by Chris MacDonald at UPEI. I will no longer maintain this repo as that version is superior. I may contribute to it in the future.
A repo of solved Kattis problems. Uses Kattis-Grind-Setup.
To create a new problem, run new-problem.bat
on Windows, or newprob.bash
on UNIX, and type the problem id on open Kattis.
The source file for the problem is given as prog.cpp
by default; it includes <bits/stdc++.h> and a main function skeleton.
To run compile and run a problem, run run.bat
on Windows, or run.bash
on UNIX, inside the problem folder.
To open a link to the problem online, run kattis.bat
on Windows, or open link.html
on UNIX, inside the problem folder.
- bash
- zip
- curl
- diff
It is recommended to use the included GCC_ARGS since they are the args Kattis uses.
You must change the GCC_PATH to a valid G++ compiler binary path, or an equivalent alias; eg. GCC_PATH='g++'
or GCC_PATH='/usr/bin/g++'
Be careful when using an alias with arguments, because the GCC_ARGS variable will also be used; set them to empty string if you do not want them.
It is recommended that you install homebrew and use it to install gcc. This is so that you can use GNU extensions, #include <bits/stdc++.h>
, and it is closer to Kattis' environment.
You must then set GCC_PATH to /usr/local/bin/g++-9
or equivalent.
Development:
Reference: