/oj-solution-templates

A repository containing solution templates for problems of various automated online judges.

Primary LanguageJava

OJ Solution Templates

A repository containing solution templates for problems of various automated online judges.

Project Structure

oj-solution-templates/
├─ .gitignore
├─ README.md
├─ src/
   ├─ io/
      ├─ github/
         ├─ tahanima/
            ├─ codechef/
               ├─ ...
            ├─ uva/
               ├─ ...
            ...

Usage

  1. Get a copy of oj-solution-templates by clicking the Fork button.
  2. Clone, i.e, download your copy of the repository to your local machine using
git clone https://github.com/[your_username]/oj-solution-templates.git
  1. Open the project in IntelliJ IDEA.
  2. Code the solution for your preferred problem.
  3. Make sure to remove the package definition in the online judge's code editor while submitting the solution in order to avoid any compilation error.

Example Solution

Solution using the UVa 13025 - Back to the Past template.

package io.github.tahanima.uva._13025;

public class Main {

    /**
     * @return a string containing the answer
     */
    public static String solve() {
        // Implement this method

        return "May 29, 2013 Wednesday";
    }

    /**
     * Takes care of the problem's input and output.
     */
    public static void main(String[] args) {
        System.out.println(solve());
    }
}

Available Templates

beecrowd
# Problem Title Solution Template
1000 Hello World! [Link]
1001 Extremely Basic [Link]
1002 Area of a Circle [Link]
1003 Simple Sum [Link]
1004 Simple Product [Link]
1005 Average 1 [Link]
1006 Average 2 [Link]
1007 Difference [Link]
1008 Salary [Link]
1009 Salary with Bonus [Link]
1010 Simple Calculate [Link]
1011 Sphere [Link]
1012 Area [Link]
1013 The Greatest [Link]
1014 Consumption [Link]
1015 Distance Between Two Points [Link]
1016 Distance [Link]
1017 Fuel Spent [Link]
1018 Banknotes [Link]
1019 Time Conversion [Link]
1020 Age in Days [Link]
1021 Banknotes and Coins [Link]
1035 Selection Test 1 [Link]
1036 Bhaskara's Formula [Link]
1037 Interval [Link]
1038 Snack [Link]
1042 Simple Sort [Link]
1044 Multiples [Link]
1052 Month [Link]
1059 Even Numbers [Link]
1066 Even, Odd, Positive and Negative [Link]
1067 Odd Numbers [Link]
1070 Six Odd Numbers [Link]
1071 Sum of Consecutive Odd Numbers I [Link]
1073 Even Square [Link]
1095 Sequence IJ 1 [Link]
1096 Sequence IJ 2 [Link]
1097 Sequence IJ 3 [Link]
1098 Sequence IJ 4 [Link]
1132 Multiples of 13 [Link]
1143 Squared and Cubic [Link]
1144 Logical Sequence [Link]
1145 Logical Sequence 2 [Link]
1149 Summing Consecutive Integers [Link]
1151 Easy Fibonacci [Link]
1153 Simple Factorial [Link]
1154 Ages [Link]
1155 S Sequence [Link]
1156 S Sequence II [Link]
1157 Divisors I [Link]
1165 Prime Number [Link]
1173 Array fill I [Link]
1177 Array fill II [Link]
1180 Lowest Number and Position [Link]
CodeChef
# Problem Title Solution Template
BATTERYLOW Battery Low [Link]
COURSEREG Course Registration [Link]
CREDSCORE Credit score [Link]
EMAILREM Email Reminders [Link]
FBC Fill the Bucket [Link]
INCRIQ Increase IQ [Link]
INSTNOODLE Chef and Instant Noodles [Link]
JCOINS Janmansh and Coins [Link]
NOTEBOOK Count the Notebooks [Link]
TYRE Tyre problem [Link]
VOLCONTROL Volume Control [Link]
UVa
# Problem Title Solution Template
401 Palindromes [Link]
1124 Celebrity jeopardy [Link]
11044 Searching for Nessy [Link]
11172 Relational Operator [Link]
11547 Automatic Answer [Link]
11614 Etruscan Warriors Never Play Chess [Link]
11727 Cost Cutting [Link]
12250 Language Detection [Link]
13025 Back to the Past [Link]