import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
int n_1 = 8;
int m_1 = 4;
int[] section_1 = {2, 3, 6};
int n_2 = 5;
int m_2 = 4;
int[] section_2 = {1, 3};
int n_3 = 4;
int m_3 = 1;
int[] section_3 = {1, 2, 3, 4};
int a = solution(n_1, m_1, section_1);
System.out.println(a+"\n========");
int b = solution(n_2, m_2, section_2);
System.out.println(b+"\n========");
int c = solution(n_3, m_3, section_3);
System.out.println(c+"\n========");
}
public static int solution(int n, int m, int[] section) {
int answer = 0;
List<Integer> list = new ArrayList<>();
for (int i = 0; i < n; i++) {
list.add(0);
}
for (int se : section) {
list.set(se, 1);
}
return answer;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: