Generation Gap

There are n people standing in a queue. The age of the ith person is ai. The more the age gap betwe...

LIDS

We all know about LIS ( Longest Increasing Sub sequence). The task to find the length of the longest...

Buildings

There are n buildings in a row. The height of the i’th building is hi. You have ৳k. It is the amoun...

Ekupai

Hacker robot Ekupai is trying to hack a supercomputer. He needs a cheat code X to hack this computer...

Burger King

Every day, more than 11 million guests visit BURGER KING® restaurants around the world. And they do ...

Lexicographical Smallest String

There is a string s of length n containing lowercase letters and an integer k. Among the letters tho...

A Journey Towards One

Given N. You can perform 3 types of operations: Increase N by 1. Decrease N by 1. Divide N by 2 (O...

Counting Murgis

Ever since that wicked thief took away some of her murgis (hens, that is), Meena was ever anxious th...

Third Dimension

Mr. J wants to learn about combinatorics. He started reading a book on combinatorics and came across...

Diagonal Sum

Given an N*N size matrix, you have to re-arrange the elements of the matrix in such a way that the d...

I Hate Combinatorics!

Rick and Morty are being hunted by the galactic government. They ran away to the cell dimension. The...

String Is Not That Easy

Let’s consider a string S which is obtained by concatenating the non-negative integers from 0 to 102...

Pathetic Interview II

You all know about the story of Pathetic Interview-I. Today, I am sharing a story of my close friend...

Harry Potter and the Vault of Gringotts

“There was a break-in of Gringotts Wizarding Bank on 1 May, 1998, during the height of the Second Wi...

Convert String Into Palindrome

A palindrome is a word, number, phrase, or other sequence of characters which reads the same backwar...

Train Hijack

You and your friend Daneliya Tuleshova are planning to hijack a train. Your friend will go inside a...

Flow on Tree

Mr. Kaboom has recently learned about maximum flow. Now his friend Mr. Taboom gave him this problem....

Passwords

Alice wants to extract some passwords from a random string. A password can have any number of charac...

Road Minister Techboy

Techboy is appointed as the minister of roads and highway in his country Better-Not-Name-It. Now he ...

Is This a Give-Away?

Once there lived an ancient mage named Farabi. He could always give perfect weather forecast. He nev...

Subset AND

You are given an array A of n integers and an integer k. You need to find if there is any non-empty ...

Birthday Gifts

Today is Luke’s birthday. Mr. Phil Dunphy (Luke’s father) has thrown a birthday party for him and de...

Find the Good Sequence

Let’s say two numbers are called “good” if their difference is at least 2. Similarly, a sequence is...

Easy

This problem is very easy. As my mood is not so good, I will not elaborate the statement unnecessari...

Naming Convention

Tony works in a multinational technology company named Voogle LLC. The employees of Voogle follow ce...

Polygon Construction (Hard)

Meera in going to picnic with her friends. They are going to have lots of fun. They will be doing va...

No GCD

You are given N integers. Each integer is square free (i.e. it has no divisor which is a square numb...

OCD Returns!

This problem author has OCD (obsessive–compulsive disorder). One day his teacher gave him an array o...

Easy Sequence 1

Let’s define an easy sequence F. Where $ F(1) = 1 $ $ F(2X) = F(X)^2 + 1 $ $ F(2X+1) = F(X) \time...

Easy Sequence 2

Let’s define a easy sequence F. Where $ F(1) = 1 $ $ F(2X) = F(X)^2 + 1 $ $ F(2X+1) = F(X) \times...

The Game of Rocks

Alice and Bob have come up with a new game. Bob gives Alice a NxM grid that contains N rows and M c...

Gaaner Koli

The protagonists of this problem are two great programmers of a certain institution Omanush and Ordi...