Treasure Hunt codechef

Treasure Hunt codechef solution Chef lives in an N×MN×M grid. He is currently participating in a treasure hunt, and has two items left to find. Chef knows that the Manhattan distance between the cells containing these two items is exactly kk. He wants to know, in how many different pairs of cells can…

Read More