Help me in solving SESO05 problem

My issue

not able to solve

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n;
	cin>>n;

}

Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-aiml-dsa-c/MUJADSAC10/problems/SESO05