Letter Islands

Cerinta completa You are given string and number . Consider a substring of string . For each position of string mark it if there is an occurence of the substring that covers the position. More formally, position will be marked

Interval Selection

Cerinta completa Given a set of intervals, find the size of its largest possible subset of intervals such that no three intervals in the subset share a common point. Input Format The first line contains an integer, , denoting the

Larry’s Array

Cerinta completa Larry has been given a permutation of a sequence of natural numbers incrementing from as an array. He must determine whether the array can be sorted using the following operation any number of times: Choose any consecutive indices

K Factorization

Cerinta completa At the time when Pythagoreanism was prevalent, people were also focused on different ways to factorize a number. In one class, Pythagoras asked his disciples to solve one such problem, Reverse Factorization. They were given a set of

Ice Cream Parlor

Cerinta completa Two friends like to pool their money and go to the ice cream parlor. They always choose two distinct flavors and they spend all of their money. Given a list of prices for the flavors of ice cream,

Kingdom Connectivity

Cerinta completa It has been a prosperous year for King Charles and he is rapidly expanding his empire. In fact, he recently invaded his neighboring country and set up a new kingdom! This kingdom has many cities connected by one-way

Jim and his LAN Party

Cerinta completa During the Steam Summer Sale, Jim’s friends have purchased games, which are numbered from to . The games are multiplayer. Jim has invited his friends to his basement where they will play by making a LAN-Party. Each friend