Generally we used to use Code Blocks for practicing competitive programming back then (2018). It has everything build in there. You just need to create the .cpp or .c file and run the code by pressing ...
The following is a CMake C++ Template for use with VS Code. It has been designed around Windows and the MSVC compiler, but would work perfectly with other compilers and on a Linux/Mac installation too ...