Giter Club home page Giter Club logo

cp-template's Introduction

CP-template

Java competitive template This will help you create and run codes from templates automatically for java and cpp.

FOR WINDOWS OS (Using CMD)

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.

  1. Create shortcut of alias.cmd
  2. press Windows+R and type "shell:startup"
  3. Put your shortcut into that folder. Now you can use alias defined in the alias.cmd.

How to create codes

  1. Open create.cmd and edit the line 2 to the path of your templates folder.
  2. 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.

How to run codes

NOTE: You need to have in.txt file in the same folder as the code. in.txt will have inputs given to the code

  1. 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

How to create contest folder

  1. 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

Maybe future update: To analyse the bytecode using asm or something to get the variable name. Current verdict is that it cannot be done and I think that is true (and No, reflection does not work for local variables).

cp-template's People

Contributors

bitsy-chuck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.