## IOI 2019 – Broken Line Problem and Solution

The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Broken Line Problem and Solution below. Problem : Solution : Explanation :  56 total

## IOI 2019 – Rectangles Problem and Solution

The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Rectangles Problem and Solution below. Problem : Solution : Explanation :  42 total

## IOI 2019 – Split the Attractions Problem and Solution

The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Split the Attractions Problem and Solution below. Problem : Solution : Explanation :

## IOI 2019 – Arranging Shoes Problem and Solution

The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Arranging Shoes Problem and Solution below. Problem : Solution : Explanation :

## Java Loops I – HackerRank Solution

Problem : Objective : In this challenge, we’re going to use loops to help us do some simple math. Task : Given an integer, N, print its first 10 multiples. Each multiple N * i (where 1 <= i <= 10) should be printed on a new line in the form: N x i = result. Input

## Java Output Formatting – HackerRank Solution

Problem : Java’s System.out.printf function can be used to print formatted output. The purpose of this exercise is to test your understanding of formatting output using printf. To get you started, a portion of the solution is provided for you in the

## Java Stdin and Stdout II – HackerRank Solution

Problem : In this challenge, you must read an integer, a double, and a String from stdin, then print the values according to the instructions in the Output Format section below. To make the problem a little easier, a portion of the code is

## Java If-Else – HackerRank Solution

Problem : In this challenge, we test your knowledge of using if-else conditional statements to automate decision-making processes. An if-else statement has the following logical flow: Source: Wikipedia Task : Given an integer, n, perform the following conditional actions:

## Java Stdin and Stdout I – HackerRank solution

Problem : Most HackerRank challenges require you to read input from stdin (standard input) and write output to stdout (standard output). One popular way to read input from stdin is by using the Scanner class and specifying the Input

## Welcome to Java! – HackerRank Solution

Problem : Welcome to the world of Java! In this challenge, we practice printing to stdout. The code stubs in your editor declare a Solution class and a main method. Complete the main method by copying the two lines of code below and pasting them

## List Comprehensions – HackerRank Solution

Problem : Let’s learn about list comprehensions! You are given three integers x, y and z representing the dimensions of a cuboid along with an integer n. Print a list of all possible coordinates given by (i,j,k) on a 3D grid where the sum of i + j + k is not equal

## Print Function – HackerRank Solution

Problem : The included code stub will read an integer, n, from STDIN. Without using any string methods, try to print the following: 123...n Note that “...” represents the consecutive values in between. Example : n = 5 Print the string 12345. Input Format : The

## Write a function – HackerRank Solution

Problem : An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day. In the

## Loops – HackerRank Solution

Problem : Task : The provided code stub reads and integer, n, from STDIN. For all non-negative integers i < n, print i2. Example : n = 3 The list of non-negative integers that are less than n = 3 is [0, 1, 2]. Print the square of each number on a separate line. Input

## Maps-STL – HackerRank Solution

Problem : Maps are a part of the C++ STL.Maps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order.The mainly used member functions of maps are: Map Template : Declaration : Size : Insert :

## Sets-STL – HackerRank Solution

Problem : Sets are a part of the C++ STL. Sets are containers that store unique elements following a specific order. Here are some of the frequently used member functions of sets: Declaration : Size : Insert : Erasing an element : Finding an element : To know more about

## Lower Bound-STL – HackerRank

You are given N integers in sorted order. Also, you are given Q queries. In each query, you will be given an integer and you have to tell whether that integer is present in the array. If so, you have to tell at which index it is present and if it is not

## Vector-Erase – HackerRank Solution

You are provided with a vector of N integers. Then, you are given 2 queries. For the first query, you are provided with 1 integer, which denotes a position in the vector. The value at this position in the vector needs to be erased. The next