문제분석: 문제만 잘 이해하면 쉬운문제다. 요점은, 우리는 N마리의 포켓몬중 N/2마리를 뽑고싶은데, 뽑아도 최대한 많이, 중복없이 뽑고싶어한다. 그래서 중복없이 최대한 몇마리를 뽑을수 있느냐를 묻는 문제다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import java.util.*; class Solution { public int solution(int[] nums) { int answer = 0; int max_choice =nums.length/2; Set set =new HashSet(); for(int data:nums){ set.add(data); } if(set.size()>=max_choice){ answer=max_choice; } else{ an..