Java Template for Competitive Programming
- Install the JDK for your target Java version. You can download it here.
- Optionally, install a text editor. I like using Visual Studio Code.
- Put your files in the
src/folder. I prefer to put them in subfolders, likesrc/codeforcesorsrc/topcoder. - If your program reads from
stdin, then you can use the templates insrc/#templates/, which have wrappers for readingstdinand printing tostdout. - Put your input in
io/in.txt. - To run the most recently modified file, run the command
.\run_latest.bat. - The program output and build errors will be printed in the console, but you can also look at
io/out.txtandio/err.txt.