codechef

CodeChef: April Long Challenge | Worthy Matrix | KAVGMAT | Solution

View on Codechef Chef found a matrix AA with NN rows (numbered 11 through NN) and MM columns (numbered 11 through MM), where for each row rr and column cc, the cell in row rr and column cc (denoted by (r,c)(r,c)) contains an integer Ar,cAr,c. This matrix has two interesting properties: The integers in each row form a non-decreasing sequence, i.e. for each valid ii, Ai,1≤Ai,2≤…≤Ai,MAi,1≤Ai,2≤…≤Ai,M. The integers in each column also form a non-decreasing sequence, i.e. for …

CodeChef: April Long Challenge | Worthy Matrix | KAVGMAT | Solution Read More »

CodeChef: April Long Challenge | Strong Language | SSCRIPT | Solution

View on Codechef A string is said to be using strong language if it contains at least KK consecutive characters ‘*’. You are given a string SS with length NN. Determine whether it uses strong language or not. Input The first line of the input contains a single integer TT denoting the number of test cases. The description of TT test cases follows. The first line …

CodeChef: April Long Challenge | Strong Language | SSCRIPT | Solution Read More »

CodeChef: April Long Challenge | World Record |BOLT | Solution

View on Codechef This news headline has been echoing in Chef’s mind since 2009 when he started his career in sprinting. This time in the 20212021 Tokyo Olympics he is determined to make a new world record. There are mainly 33 important factors that result in the variation in speed during practice and during competition. The first factor is a difference …

CodeChef: April Long Challenge | World Record |BOLT | Solution Read More »

x