Race in DomKi
There is a kingdom called DomKi. DomKi has N city and N-1 two-way road. Each city is numbered with 1...
Rational Monkey
There lived a wise monkey in the forest of Amazon. One day he started searching the jungle for banan...
Remember the Name...
There's a famous song written by Mike Shinoda, which has these lines: This is 10% luck, 20% skill, ...
Restore Missing Values
Consider an array of 'N' integers which is indexed from '1' to 'N'. Exactly 'Q' queries numbered fr...
Rio and Inversion
One day Rio was returning home from his university and unfortunately lost his phone on the way. He a...
Rivalry Friends
Ryo and his girlfriend love to think about challenges. One day his girlfriend gave him a challenge t...
Set Union
Given two sets of integers, print the set containing the union of the two input sets. For example, g...
Smallest Subarray
You are given an array A of N integers A1, A2, A3, ..., AN . If we select two indices (1 ≤ i ≤ j ≤ N...
Smart Query Handler
Bit operators perform bit-wise operations between two binary numbers. Wikipedia says, binary operati...
Social Distancing
The country of KhoaNali is structured as a giant road with N buildings on both sides, the northern b...
Sofdor Ali and Bracket Sequence
Sofdor Ali has invented a new game. He asked his assistant Jong Bahadur ( who happens to be a monkey...
So Long
As all people know ICPC can be very dull sometimes for people other than contestants. Jodu, Modu, an...
Special Pair
Mr. X is an “array pagla” person. He loves doing different types of things with arrays. Today Mr. X ...
StackLang
StackLang is a stack-based programming language. Here, each program contains a series of commands th...
Static Tree
You are given a tree containing N vertices. The vertices are numbered from 1 to N. A tree with N ver...
Straightforward
No gossip. In this problem I will just say what to do. Initially, you will be given a bracket sequen...
Subarray Sum
You are given an array having N integers. You have to select at most K positions in the array and re...
Subset of Sequences
You will be given a set of sequences. Each sequence is a list of numbers. Two sequences are K-simila...
Subtree MEX
You will be given a balanced binary tree of N nodes. Each of the nodes of the tree will contain a no...
Taju Kage Bunshin No Jutsu
Naruto Uzumaki is one of the strongest ninja of RUET (Rasengan University of Ebisu and Tobi), posses...
Tree Queries
You are given a tree of n vertices. Each vertex contains an integer. Vertex 1 is the root of the tre...
United State of Koanhali
Koanhali is a strange country. The govt. of Koanhali maintain the marriages of this country. If you ...
Video Game Pro
Shefin is playing a video game. In this game, there will be $N$ buildings in a row. $i^{th}$ buildin...
Village Fair 2
There are N houses in a village far away from here. They are numbered from 1 to N. For this problem ...
Water in a Tree
There is a tree consist of N nodes and N−1 edges. The ith node contains Si​ liters of water with a t...
Toph uses cookies. By continuing you agree to our Cookie Policy.