dh-winternagi 님의 블로그
(10815) 숫자 카드 본문
https://www.acmicpc.net/problem/10815
단계별로 풀어보기
14단계(집합과 맵) 1번째

#include <iostream>
#include <set>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
set<int> s;
cin >> n;
while(n--){
int t;
cin >> t;
s.insert(t);
}
cin >> m;
while(m--){
int t;
cin >> t;
cout << s.count(t) << " ";
}
return 0;
}'백준 (C++) > Solve' 카테고리의 다른 글
| (7785) 회사에 있는 사람 (0) | 2026.04.14 |
|---|---|
| (14425) 문자열 집합 (0) | 2026.04.14 |
| (10814) 나이순 정렬 (0) | 2026.04.14 |
| (1181) 단어 정렬 (0) | 2026.04.14 |
| (11651) 좌표 정렬하기 2 (0) | 2026.04.14 |
