Set Union

Given two sets of integers, print the set containing the union of the two input sets. For example, g...

Not As Hard As It Seems

Sakib and Shamim are good friends. As Sakib is a little naughty, every night before exam he disturbs...

MEXFN

This is a straightforward problem without much story behind the problem. You have to calculate MEXF...

Palindrome Query I

You are given a string of length L. You have Q queries. In each query, you will be asked to either u...

United State of Koanhali

Koanhali is a strange country. The govt. of Koanhali maintain the marriages of this country. If you ...

Byang and War Tactics

Byang is learning about War Tactics from Raat, a famous martial arts master, who has successfully tr...

Sofdor Ali and Bracket Sequence

Sofdor Ali has invented a new game. He asked his assistant Jong Bahadur ( who happens to be a monkey...

Data Structure

The operations that are performed in a data structure can be categorized into two types: query and u...

Distinct Dishting

You are given an array of N integers. Then there will be Q commands of the following type: 1) Change...

Smallest Subarray

You are given an array A of N integers A1, A2, A3, …, AN . If we select two indices (1 ≤ i ≤ j ≤ N) ...

Array Simulation

You are given an array of N elements. Initially all the indices have a value of 0. You have to do fo...

Device ID

A device ID is a distinct number associated with a smartphone or similar handheld device. Every smar...

Primary Key

“Clarity-Lon” is the new awesome e-commerce based startup that went to the top of the chart within f...

Rio and Inversion

One day Rio was returning home from his university and unfortunately lost his phone on the way. He a...

Special Pair

Mr. X is an “array pagla” person. He loves doing different types of things with arrays. Today Mr. X ...

Village Fair 2

There are N houses in a village far away from here. They are numbered from 1 to N. For this problem ...

Maintain the Queue

“Ajob Desh” is a strange country. Anyone who wants to buy train tickets need to go to the railway st...

Subset of Sequences

You will be given a set of sequences. Each sequence is a list of numbers. Two sequences are K-simila...

Perseus and The New Challenge

The life of princess Andromeda, the daughter of King Cepheus and Queen Cassiopeia of Ados, is in dan...

Mario and Princess Peach

The world of Mario can be imagined as 2D grid of N rows and M columns–containing a total of N \times...