In contests div 4(<1399) can i know the third and fourth problems are from which topic?

My issue

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
	   Scanner s=new Scanner(System.in);
	   int t=s.nextInt();
	   while(t-->0)
	   {
	       int a=s.nextInt();
	       int b=s.nextInt();
	       int[] arr=new int[b];
	       for(int i=0;i<b;i++)
	       {
	           arr[i]=s.nextInt();
	       }
	       int sum=0;
	       for(int i=0;i<b;i++)
	       {
	           sum+=arr[i];
	       }
	       int mod=sum%a;
	       int ans=sum/a;
	       int[] res=new int[a];
	       Arrays.fill(res,ans);
	       for(int i=0;i<a;i++)
	       {
	           if(mod>0)
	           {
	           res[i]+=1;
	           }
	           else break;
	           mod--;
	       }
	       int c=0;
	       for(int i=0;i<a;i++)
	       {
	           if(res[i]==b) c++;
	       }
	       System.out.println(c);
	   }
	}
}

Problem Link: BLDST Problem - CodeChef

Hi there, topic tags are already updated!