Cerinta completa A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides the fairest way to divide the treats is to seat the prisoners around a circular table in sequentially
Road Network
Cerinta completa Chinese Fedor is a research scientist, who has recently found a road map of Ancient Berland. Ancient Berland consisted of N cities that were connected by M bidirectional roads. The road builders weren’t knowledgable. Hence, the start city
Smart Number
Cerinta completa In this challenge, the task is to debug the existing code to successfully execute all provided test files. A number is called a smart number if it has an odd number of factors. Given some numbers, find whether
Short Palindrome
Cerinta completa Consider a string, , of lowercase English letters where each character, (, denotes the letter at index in . We define an palindromic tuple of to be a sequence of indices in satisfying the following criteria: , meaning
Repetitive K-Sums
Cerinta completa Alice thinks of a non-decreasing sequence of non-negative integers and wants Bob to guess it by providing him the set of all its K-sums with repetitions. What is this? Let the sequence be {A[1], A[2], …, A[N]} and
Sam and substrings
Cerinta completa Samantha and Sam are playing a numbers game. Given a number as a string, no leading zeros, determine the sum of all integer values of substrings of the string. Given an integer as a string, sum all of
Red John is Back
Cerinta completa Red John has committed another murder. This time, he doesn’t leave a red smiley behind. Instead he leaves a puzzle for Patrick Jane to solve. He also texts Teresa Lisbon that if Patrick is successful, he will turn
Sherlock and Squares
Cerinta completa Watson likes to challenge Sherlock’s math ability. He will provide a starting and ending value that describe a range of integers, inclusive of the endpoints. Sherlock must determine the number of square integers within that range. Note: A
Simple Array Sum
Cerinta completa Given an array of integers, find the sum of its elements. For example, if the array , , so return . Function Description Complete the function with the following parameter(s): : an array of integers Returns : the
Robot
Cerinta completa You have two arrays of integers, and , where both have number of elements. Consider the following function: score = 0 int Go(step, energy) { if (step == N) { score += V[step]; return (score); } else {
