Help me in solving EXAMTIME problem

My issue

i don’t know how to solve this type of problems

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

}

Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP300A/problems/EXAMTIME