Passwords

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

Train Hijack

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

BAPG

Russell loves solving math problems and also playing online games. Recently, he has started playing ...

Burger King

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

Game of Tic-Tac-Toe

Alice and Bob is a playing a game of tic-tac-toe, to be precise a variant of tic-tac-toe called Nota...

Make It Big!

You are given a number N (10 ≤ N ≤ 2×109). You have to perform exactly two swap operation. You can c...

Find the Good Sequence

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

Who Ate the Pizza Slices?

Misty’s life is very dramatic. No matter how careful she is, some interesting and sometimes unfortun...

Messy Table

Akib is a very good student but his reading table is very messy. One Friday afternoon, Akib is sitti...

Fivefold Removals

Alice and Bob are playing a simple game on marbles. They have a bucket containing N marbles, and the...

Flow on Tree

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

Another Update-Query Problem

You will be given an array A of length N and you will have to perform Q operations on that array. Th...

Polygon Construction (Hard)

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

Flyover in Twinland

Rio has become the president of Twinland. Now he wants to develop his country to fulfill his promise...

I Am Good 2.0

I am trying to become a good guy, giving contestants as little pain as possible. So, this problem is...

Third Dimension

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

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...

Hizitizi's Array Cutting

Hizitizi is a new character in our story. In every episode, he gets a task to do from his imaginary ...

No GCD

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

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...