Skip to content

Commit

Permalink
이슈 #397에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 28, 2024
1 parent 9de522f commit 7cfc3a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Programmers/폰켓몬.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <vector>
#include <unordered_set>

using namespace std;

int solution(vector<int> nums) {
unordered_set<int> s(nums.begin(), nums.end());

return nums.size() / 2 < s.size() ? nums.size() / 2 : s.size();
}

0 comments on commit 7cfc3a5

Please sign in to comment.