Distinct Dishting

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

A Super Easy Problem - "Array Query"

Let's get into the problem directly without much description this time :D . You are given an arr...

Dengue Affected Areas

Dengue, the talk of the town of Dhaka this year. So many people suffered from dengue fever and a num...

MSIS!

Do you know what MSIS is? MSIS is the abbreviation for Maximum Sum Increasing Subsequence. It is a s...

Set Union

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

Tree Queries

You are given a tree of n vertices. Each vertex contains an integer. Vertex 1 is the root of the tre...

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

Cut the Rope

Fahim is a rope seller. He has a special tool for cutting ropes. But recently this tool is behaving ...

Data Structure

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

Subarray Sum

You are given an array having N integers. You have to select at most K positions in the array and re...

Social Distancing

The country of KhoaNali is structured as a giant road with N (1 \leq N \leq 10^5) buildings on both ...

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

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

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