PARATA SPOJ (divide and conquer)

spoj question of making Parata ,i am getting difficulty in writting the code of that ,
need some hint .

@souravraj024