Prefix Tree Problems

The Punishment of Hasinur

Hasinur studies at X School &amp; College situated in Chittagong. AA Sir is one of the toughest and ...

Very Easy 41/86/336

MaxXOR

You are given an array AAA of n integers (A1A_1A1​, A2A_2A2​, ..., AnA_nAn​) and some queries. In ea...

Moderate 49/68/194

New Year Couple

The new year 2017 is here. To celebrate the 31st night, Mr Rio has thrown a big party at his house. ...

Moderate 17/26/156

Undo History

Robin is using a peculiar text editor to write a sequence of lines of text. The editor consists of t...

Moderate 20/28/62

Yet Another XOR Problem

Given a rooted tree with N nodes where each node has a value, find a pair of nodes (u, v) so that u ...

Very Easy 35/49/193

Another String Query Problem

This time I'm going to introduce you to a new land, called String Land. In String Land there are N ...

Moderate 9/12/38

Yet another Real Life Problem

Akash is one of the finest programmers of AUST. His closest senior Shuvro asked him if he can solve ...

Moderate 25/31/156

Spam Me Not

Your team has been tasked to build a section of a web app where users can choose whether and how the...

Fabby and Her Wedding Dress

You all remember Fabby, the princess of Byteland. People of Byteland are waiting for the biggest cel...

Moderate 11/18/257

Yet Another XOR Tree Problem

You are given a tree with NNN nodes. A non-negative weight is assigned to each edge of the tree. Let...

Subtree MEX

You will be given a balanced binary tree of NNN nodes. Each of the nodes of the tree will contain a ...

Moderate 7/13/98

XOR Is Fun

Efa hates numbers. But she loves the XOR operation. This time, you have to solve another problem for...

Moderate 4/9/74