Sasta Shark Tank Codechef Solution

Sasta Shark Tank Codechef Solution

Sasta Shark Tank Codechef Solution Devendra just had a million-dollar idea and he needs funds to startup. He was recently invited to Sasta Shark Tank (A TV show where entrepreneurs pitch their ideas to investors hoping to get investment in return). He was offered deals from two investors. The first investor offers A dollars for … Read more

Pseudo Sorted Array Codechef Solution

Pseudo Sorted Array Codechef Solution

Pseudo Sorted Array Codechef Solution An array A of length N is said to be pseudo-sorted if it can be made non-decreasing after performing the following operation at most once. Choose an i such that 1≤i≤N−1 and swap Ai and Ai+1Given an array A, determine if it is pseudo-sorted or not. Input FormatThe first line … Read more

Geometric Mean Inequality Codechef Solution

Geometric Mean Inequality Codechef Solution

Geometric Mean Inequality Codechef Solution You are given an array A of length N containing the elements −1 and 1 only. Determine if it is possible to rearrange the array A in such a way that Ai is not the geometric mean of Ai−1 and Ai+1, for all i such that 2≤i≤N−1. Y is said … Read more

Best Coupon CHEAPFOOD Codechef Solution

Best Coupon CHEAPFOOD Codechef Solution

Best Coupon CHEAPFOOD Codechef Solution Chef is ordering food online (instead of cooking) and the bill comes out to be Rs. X. Chef can use one of the following two coupons to avail a discount. Get 10 percent off on the bill amountGet a flat discount of Rs. 100 on the bill amountWhat is the … Read more