* Chef likes all arrays equally. But he likes some arrays more equally than others. In particular, he loves Rainbow Arrays. An array is Rainbow if it has the following structure: First a1 elements ...
/* int dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction /* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight ...
I participated in CodeChef Starters 157 and solved 3 problems and achieved a global rank of 387. Problem 1: Not-too-far Replacement (TWOCLOSE): Take the 𝑛+1 th value in the array into a temp variable ...