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...
Sofdor Ali and Bracket Sequence
Sofdor Ali has invented a new game. He asked his assistant Jong Bahadur ( who happens to be a monkey...
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 ...
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 ...
Village Fair 2
There are N houses in a village far away from here. They are numbered from 1 to N. For this problem ...
MSIS!
Do you know what MSIS is? MSIS is the abbreviation for Maximum Sum Increasing Subsequence. It is a s...
C++ Vector Simulation
Array is an important data structure in computer science. It is also very important when it comes fo...
Restore Missing Values
Consider an array of 'N' integers which is indexed from '1' to 'N'. Exactly 'Q' queries numbered fr...
Array Simulation
You are given an array of N elements. Initially all the indices have a value of 0. You have to do fo...
Powerful Array
You are given an array A of N integers . Now you have to process Q queries in this array. Each query...
Laser Light
A 2D grid consists of a lot of special lights bulbs, which turns on upon the incidence of a laser li...
Subset of Sequences
You will be given a set of sequences. Each sequence is a list of numbers. Two sequences are K-simila...
Hablu's Team
This year Hablu wants to participate in ICPC. He studies in “Habagoba University” along with $n$ oth...
Yet Another Xinversion
The problem statement is simple. You are given a rooted tree (1 is the root) and every node has a co...
MEXFN
This is a straightforward problem without much story behind the problem. You have to calculate MEXF...
Social Distancing
The country of KhoaNali is structured as a giant road with N buildings on both sides, the northern b...
Tree Queries
You are given a tree of n vertices. Each vertex contains an integer. Vertex 1 is the root of the tre...
Byang and War Tactics
Byang is learning about War Tactics from Raat, a famous martial arts master, who has successfully tr...
Data Structure
The operations that are performed in a data structure can be categorized into two types: query and u...
Device ID
A device ID is a distinct number associated with a smartphone or similar handheld device. Every smar...
Perseus and The New Challenge
The life of princess Andromeda, the daughter of King Cepheus and Queen Cassiopeia of Ados, is in dan...
Another Query on String
You are given a string S (of length n) consisting of alphabets only. You need to perform m queries o...
Hide and Seek
You know how to play hide-and-seek, right? In a group of kids, one of them is selected to be the see...
Toph uses cookies. By continuing you agree to our Cookie Policy.