Java competitive template This will help you create and run codes from templates automatically for java and cpp.
Support has been added for codeforces, codechef and atcoder.
for codeforces use cf
for codechef use cc
for atcoder use atc
(in platform field)
To run you need to do the following on windows, you need to run alias.cmd everytime your cmd boots up.
- Create shortcut of alias.cmd
- press Windows+R and type "shell:startup"
- Put your shortcut into that folder. Now you can use alias defined in the alias.cmd.
- Open create.cmd and edit the line 2 to the path of your templates folder.
- Syntax is
c <filename> <platform> <cpp or java>
(default platform is cc, change in create.cmd to change default and default language is java. You need to type cpp everytime to create from cpp template bcz we already type a lot in java :) )
NOTE: c is defined as alias for creating. You can go to alias.cmd to change it to whatever you like.
NOTE: You need to have in.txt file in the same folder as the code. in.txt will have inputs given to the code
- Syntax is
r <filename> <platform> <cpp or java>
(default platform is cc, change in create.cmd to change default and default language is java. You need to type cpp everytime to create from cpp template bcz we already type a lot in java :) )
NOTE: for codeforces the java template would replace the class name as the filename and would declare the class as public
- ccon
<contest name>
Note: This will create a folder "contest name" and an input file names in.txt and change directory to that folder. :) Template has all the templates. You can read them at your convinence. Top are ProblemSolver class, InputReader, OutputWriter, Number Theory and Debug class and timeit.
To get the execution time, in the main function set
checkTimeELAPSED=0
to 1