oi_helper
is an utility application to help managing your C++ OI workspaces.
We all know that we often need a project manager when we're developing an application or a library. For example, I use cargo
to manage this project. But, there is a special kind of programming, which is for algorithm competitions. This kind of programming is often called OI by people, or at least in China. OI is very special because an OI project often has a lot of source files and each source file can be compiled in to an complete binary executable file alone. It's quite different to those ordinary developings. But who said that OIers (people who do OIs) are not able to have a project manager? Usually they may need to compile everything by themselves. In the past, they should write everything by themselves, includeing #include
s and using
s. But with the codegen ability of oi_helper
, they are no longer need to do this because oi_helper
will help them generate what they want, for example, the default template is:
// <file_name>
// Template generated by oi_helper (https://github.com/onion108/oi_helper)
//
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <stack>
#include <queue>
using namespace std;
static const int MAXN = 1e5+114514;
int main() {
return 0;
}
You can see that oi_helper
included some header files that OIers may want to use, and also generates the MAXN
constant, which is very useful when doing DP or other algorithms that needs arrays.
If you want to install it easily, just type:
cargo install oi_helper
If you are interested in building it by yourself, then type:
cargo build
Before doing this you should install rust from here.
Also, there is a special kind of versions called developement previews
, where the version number will end with devpreview
. devpreview
s are unstable and may cause some problems, and even may fails the compiling, but the devpreview
have the newest changes. If you really want to use the features that only work with the devpreview
, you can type the following command after cloning this repository:
git switch dev
cargo install --path .
If it builds, you will now have the devpreview
version instead of your normal release.
There are another way to install devpreview
s, that is using cargo install oi_helper
and add --version
and pass the version number to it (e.g., cargo install oi_helper --version 2.0.0-1-devpreview
will install the second stable devpreview). devpreview
s that can be installed in this way are called stable devpreview
s.
Current devpreview
's features:
- Added local test cases pending. (Currently supports
AC
,WA
andTLE
. ) - Added experimental support for fetching example test cases from Luogu with given problem id.
Current devpreview
's todo:
- Add result comparations.