import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class boj1822 {
static int N;
static int M;
static TreeSet<Integer> setA = new TreeSet<>();
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
N = Integer.parseInt(st.nextToken());
M = Integer.parseInt(st.nextToken());
st = new StringTokenizer(br.readLine());
for(int i = 0; i < N; i++) {
setA.add(Integer.parseInt(st.nextToken()));
}
st = new StringTokenizer(br.readLine());
for(int i = 0; i < M; i++) {
Integer newtmp = Integer.parseInt(st.nextToken());
setA.remove(newtmp);
}
if(setA.isEmpty()){
System.out.println(0);
}else{
System.out.println(setA.size());
for(Integer i : setA) System.out.print(i + " ");
}
}
}
Leave a comment