Tree Queries
You are given a tree of n vertices. Each vertex contains an integer. Vertex 1 is the root of the tre...
Taofiq the House Prefect
Tomorrow is a very special day for Taofiq. He is participating in an intra school quiz contest. As h...
War in the Wizarding World
There is a deadly war going on between two countries (Bitland and Byteland) in the wizarding world. ...
Cheap Tourist
The country of Byteland is divided into N provinces numbered from 1 to N. The provinces are connecte...
Zoba the Misleader
Zoba has 3 strings, named S1​, S2​ and S3​. He wanted to make a tough problem for Mihaf with these s...
Bad XOR 2 (Hard)
So after successfully becoming many people's nightmare, XOR has struck again, this time to haunt you...
Preparing for War
There were N cities in England. Each contained a warrior with skillset equal to X. All the cities we...
Scary Tree
Recently Alex has been learning about the tree data structure. And, he has been struggling to write ...
Kingdom of Code
Kingdom CODE is the most peaceful place in the universe. King NOVOSH and Queen ALMIDA is ruling this...
Flow Finder
Last summer, Carla the Cartographer went on an expedition on behalf of the National Center for Posit...
DFS, Flow Moderate 8/12/88
Haunting of Herobrine
Herobrine's horror stories are known by many, but only a few dares to speak that name out loud, for ...
Lets Play Pipeline
In this problem you will have to solve a puzzle game named "Pipeline". 90's kids knows this game ver...
Village Fair 2
There are N houses in a village far away from here. They are numbered from 1 to N. For this problem ...
Simple And
You are given a tree containing $N$ nodes. The nodes are numbered from $1$ to $N$. The root node of ...
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...
Pretty Diabolical
TRAOMBINNAA is going to be Billy Butcher's base for the next season of the boys. He is going to buil...
Change Queries
Today is a very special day for Rubel. Recently he got a job in a software company. Now today is the...
Unfair Robot Race
Two teams of robots, Team A and Team B, are racing in a 2D grid. There will be a total of 6 rounds. ...
MangoSmash
Your friend has come to visit the RUET campus. As the Mango season goes on ⋯, he/she said “Mama Aam ...
MEXimum
Let’s get straight to the point. You are given a tree. In the tree, each node u has a number au​ ass...
Shortest Path?
Given an unweighted, undirected and connected graph consists of $N$ nodes numbered from $1$ to $N$. ...
Gold Mines
The city of gridland is a grid with n rows and m columns. The city can be divided into n*m cells. A ...
DFS, Graph Moderate 53/68/260
A Boring Game
Alice and Bob are playing a game with a tree with n nodes. Alice always plays first, and the two pla...
Darth Vader and 3PO on a Tree!
Did you watch Star Wars yet? No? You should in your free time. Now back to Darth Vader and 3PO. Dart...
Explosion
There is a house named Larcana. It is a very weird house. There are exactly N rooms in total and bet...
Toph uses cookies. By continuing you agree to our Cookie Policy.