Cerinta completa Lisa just got a new math workbook. A workbook contains exercise problems, grouped into chapters. Lisa believes a problem to be special if its index (within a chapter) is the same as the page number where it’s located.
Kingdom Division
Cerinta completa King Arthur has a large kingdom that can be represented as a tree, where nodes correspond to cities and edges correspond to the roads between cities. The kingdom has a total of cities numbered from to . The
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
Iterate It
Cerinta completa Consider the following pseudocode, run on an array of length : rep := 0 while A not empty: B := [] for x in A, y in A: if x != y: append absolute_value(x – y) to B
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
Journey to the Moon
Cerinta completa The member states of the UN are planning to send people to the moon. They want them to be from different countries. You will be given a list of pairs of astronaut ID’s. Each pair is made 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,
Jumping on the Clouds: Revisited
Cerinta completa A child is playing a cloud hopping game. In this game, there are sequentially numbered clouds that can be thunderheads or cumulus clouds. The character must jump from cloud to cloud until it reaches the start again. There
