Arnab Chakraborty has Published 4452 Articles

C++ Program to find table plate ordering maintaining given conditions

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 11:12:45

135 Views

Suppose we have two numbers h and w. The height and width of a table. The table is divided into h × w cells. Into each cell of the table, we can either put a plate or keep it empty. As each guest has to be seated next to their ... Read More

C++ Program to find minimal sum of all MEX of substrings

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 11:08:42

176 Views

Suppose we have a binary string S with n bits. Let an operation MEX of a binary string be the smallest digit among 0, 1, or 2 that does not occur in the string. For example, MEX(001011) is 2, because 0 and 1 occur in the string at least once, ... Read More

C++ Program to get difference between maximum and minimum water in barrels

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 11:04:27

198 Views

Suppose we have an array A with n elements and another value k. We have n barrels lined up in a row, they are numbered from left to right from one. Initially, the i-th barrel contains A[i] liters of water. We can pour water from one barrel to another. In ... Read More

C++ Program to find array after removal from maximum

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 11:01:00

79 Views

Suppose we have an array A with n elements and another value k. We want to perform k following operations. One operation is like −Let d is the maximum value of the arrayFor every index i from 1 to n, replace A[i] with d - A[i]We have to find the ... Read More

C++ Program to count number of teams can be formed for coding challenge

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:57:10

242 Views

Suppose we have two numbers a and b. In a coding challenge, there are 4 slots for participants in a team. There are a number of programmers and b number of mathematicians. We have to count how many teams can be formed, if: each team must have at lease one ... Read More

C++ Program to find length of substring song from main song

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:54:27

83 Views

Suppose we have a string S with n characters and two values l and r. Amal has written song and shared it to Bimal. The song is a string consisting of lowercase English letters. Bimal made up a question about this song. The question is about a subsegment of the ... Read More

C++ Program to find how many pawns can reach the first row

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:51:02

193 Views

Suppose we have two binary strings S and T of size n. Consider there is a chessboard of size n by n.Currently, there are some pawns in the n-th row. There are also enemy pawns in the 1-st row. On one move, we can move one of our pawns. A ... Read More

C++ Program to find maximal achievable diversity of music notes

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:46:58

94 Views

Suppose we have a string S with n elements. Amal's song consists of n notes, which we will treat as positive integers. The diversity of a song is the number of different notes it contains. We want to make it more diverse. We cannot arbitrarily change the song. Instead, for ... Read More

C++ Program to count minimum problems to be solved to make teams

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:44:07

249 Views

Suppose we have an array A with n elements. There are n students in a university, n is even. The i-th student has programming skill equal to A[i]. The team leader wants to form n/2 teams. Each team should consist of exactly two students, and each student should belong to ... Read More

C++ Program to count square root cube root and both in given range

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 10:40:08

319 Views

Suppose we have a number n. We have to count the number of integers x, in range 1 to n such that, that x is a square of a positive integer number or a cube of a positive integer number (or both a square and a cube simultaneously).Problem CategoryVarious problems ... Read More

Advertisements