Problem Statement

Given an array A1,A2…AN find the minimum number of operations (possibly zero) required to convert all integers in A to 0.

In one operation, you


Problem Statement

In Chefland, the speed of light is c m/s, and acceleration due to gravity is g m/s2.

Find the smallest height (in meters) from which Chef should jump such that during his journey down only under the effect of gravity and independent of any air resistance, he achieves…


Problem Statement

Chefland has 7 days in a week. Chef is very conscious about his work done during the week.

There are two ways he can spend his energy during the week. The first way is to do x units of work every day and the second way is to…


Problem Statement

Chefland has 2 different types of coconut, type A and type B. Type A contains only x milliliters of coconut water and type B contains only xb grams of coconut pulp. Chef’s nutritionist has advised him to consume Xa milliliters of coconut water and Xb grams of coconut…


Problem Statement

Chef is planning a heist in the reserve bank of Chefland. They are planning to hijack the bank for D days and print the money. The initial rate of printing the currency is P dollars per day and they increase the production by Q dollars after every interval…


Problem Statement

Chef has two numbers N and M. Help Chef to find number of integer N-tuples (A1,A2,…,AN) such that 0≤A1,A2,…,AN≤2M−1 and A1&A2&…&AN=0, where & denotes the bitwise AND operator.

Since the number of tuples can be large, output it modulo 10⁹+7.

Input


Problem Statement

For a given N, find the number of ways to choose an integer x from the range [0,2N−1] such that x⊕(x+1)=(x+2)⊕(x+3), where ⊕ denotes the bitwise XOR operator.

Since the number of valid x can be large, output it modulo 10⁹+7.

Input


Problem Statement

It’s a lockdown. You’re bored in your house and are playing golf in the hallway.

The hallway has N+2 tiles numbered from 0 to N+1 from left to right. There is a hole on tile number x. You hit the ball standing on tile 0. When you hit…


Problem Statement

Suppose for a unit rise in temperature, the solubility of sugar in water increases by B*g/100 mL.

Chef does an experiment to check how much sugar (in g) he can dissolve given that he initially has 1 liter of water at X degrees and the solubility of sugar…


Problem Statement

A string is said to be using strong language if it contains at least K consecutive characters ‘*’.

You are given a string S with length N. Determine whether it uses strong language or not.

Input

Anubhav Mishra

Software Developer ,currently pursuing B.Tech in Information Technology. Electronic Dance Music is love.Also like all phone related technologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store