This repository serves as the go to backup of almost all my submissions on online judges. It also contains templates and cookbook.
g++ -Wall -O2 -std=c++17 template.cpp
g++ -Wall -Wextra -pedantic -std=c++17 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector template.cpp
Use ./a.out < test.in |& tee test.out
- Go to contest folder
cd round_base
- Copy stdc++.h to contest folder
cp /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h bits/
- Go to bits/
cd bits
- Compile the header
g++ -Wall -O2 -std=c++17 stdc++.h
Note that the header should be compiled with the same flags as the solution.