Binary Search Problems

 Exists or Not ExistsYou will be given some numbers. Then there will contain some queries. In every query there will be g... Largest PrimeA positive integer number n is called a prime number, if it is only divisible by 1 and n itself, whe... Average the ArrayYou are given an array A of length N. You have to choose a subset S from given array A, such that av... Very Easy 59/71/181 Kitorp and His LoveKitorp loves his wife Asiar(who is a problem solver as well) but he loves math more. To get his atte... An Obvious Interactive ProblemI pick a number. You guess it. You can guess at most 25 times. For every guess you make, I will tell... Very Easy 406/489/2k Eet Izz Phet!A long long time ago, I left the country that was my home and with my head full of brains and shoes ... Be Like HasibHasib, the famous programmer, uses a little game when he teaches Binary Search to his students. He r... Angels and DemonsYou are walking at midnight along a road that has N checkpoints numbered from 1 to N from left to ri... Moderate 19/33/175 Penguins of MadagascarOne day the penguins of Madagascar found a string S... Wait... Wait. Actually the setter of the prob... Moderate 157/242/681 Complex OperationsYou are given an array A of length N. You have to perform two different types of operations. In the ... Moderate 235/332/1k Master PlanGakra Miah is a Wollywood movie lover. He watches movies almost everyday. He has watched so many mov... Moderate 40/46/82 Poltu and Interesting NumberPoltu Loves interesting number. So he wants to find this type of number. The definition of an intere... Moderate 22/40/170 I Scream, You Scream!Meem loves ice cream cones. So much so that she created an ice cream stand to share the joy of ice c... Moderate 96/105/201 Spot It!Have you played the game Spot it!? Though there are many ways to play this game, the basic rule is t... The Story of StringlandThe king of Stringland is employing an elite force of undercover agents to protect the kingdom from ... The Multiplayer Action GameHave you played the game Agar.io? According to wikipedia, Agar.io is a massively multiplayer action ... Most Difficult Problem EverYou are given a function like below: long long F(int A, int B, int C, long long x) { long long res =... Moderate 88/123/485 Answer the QueriesGiven an array of N elements, indexed from 0 to N−1. Now you are given some queries in the form [L,R... XOR PartitionNeo has a hidden array A of n integers where 0 ≤ Ai ≤ 109 is satisfied for each i from 1 to n . You ... Moderate 27/33/118 Lucky ShirtMarjokes is a very famous comedy personality in Byteland. He is a poet, a writer, a singer and an ac... M-SequenceA sequence is called M-sequence if after removing zero or more elements from the sequence the GCD of... Jenga TowerMaybe you all are familiar with Jenga Game. "Jenga is played with 54 wooden blocks. Each block is th... N CitiesIn a country there are N cities numbered from 1 to N. To Travel along the cities there are total N b... BuildingsThere are n buildings in a row. The height of the i-th building is hi​. You have ৳k. It is the amoun... Moderate 263/375/988 Balanced ReliefThanos just finished his relief work. We all know that Thanos loves balanced things. So he finds som...