Special Pair
Mr. X is an “array pagla” person. He loves doing different types of things with arrays. Today Mr. X ...
Another Update-Query Problem
You will be given an array A of length N and you will have to perform Q operations on that array. Th...
Mad Engineer Aksir
Can you imagine? Mad Engineer Aksir finally got the job. His job is to set up toggle switch for a se...
Tree Queries
You are given a tree of n vertices. Each vertex contains an integer. Vertex 1 is the root of the tre...
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 ...
Taju Kage Bunshin No Jutsu
Naruto Uzumaki is one of the strongest ninja of RUET (Rasengan University of Ebisu and Tobi), posses...
Distinctness
A substring of string S is another string S' which occurs in string S. For example: S = aaba and one...
Smart Query Handler
Bit operators perform bit-wise operations between two binary numbers. Wikipedia says, binary operati...
Dynamic Tree
You are given a tree containing N vertices. The vertices are numbered from 1 to N. A tree with N ver...
Battle of Endor
After myriad battles and death of million rebel soldiers, it is high time to destroy the imperial ar...
Composite Facts
Let's define two functions F and S: F(n) = 1 + n! S(n,m) = Sum of first m non-prime integers which ...
Expandable ListView
Minas is working on his new language. He want to add a feature call expandable listview. Here he exp...
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...
Rio and Inversion
One day Rio was returning home from his university and unfortunately lost his phone on the way. He a...
Hamming Distance
Hamming distance between two binary strings of equal length is the number of mismatches between ever...
Subarray Sum
You are given an array having N integers. You have to select at most K positions in the array and re...
Memes vs. Social Media
In this era of modern technology social media is the most powerful weapon and the viral issue is the...
Static Tree
You are given a tree containing N vertices. The vertices are numbered from 1 to N. A tree with N ver...
Cut the Rope
Fahim is a rope seller. He has a special tool for cutting ropes. But recently this tool is behaving ...
C++ Vector Simulation
Array is an important data structure in computer science. It is also very important when it comes fo...
Array Simulation
You are given an array of N elements. Initially all the indices have a value of 0. You have to do fo...
Maintain the Queue
“Ajob Desh” is a strange country. Anyone who wants to buy train tickets need to go to the railway st...
City of Atlantis
Have you ever heard of The Atlantis City? It’s a Greek mythological city. Its existence doesn’t matt...
Laser Light
A 2D grid consists of a lot of special lights bulbs, which turns on upon the incidence of a laser li...
Village Fair 2
There are N houses in a village far away from here. They are numbered from 1 to N. For this problem ...
Toph uses cookies. By continuing you agree to our Cookie Policy.