From 9affce4e9c1ded3429e211703969b295b70bd798 Mon Sep 17 00:00:00 2001 From: Yeonri Date: Fri, 9 Jan 2026 22:11:19 +0900 Subject: [PATCH] =?UTF-8?q?[Week01]=20BOJ=201920:=20=EC=88=98=20=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lsy1307.cpp" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "weekly/week01/BOJ_1920_\354\210\230 \354\260\276\352\270\260/lsy1307.cpp" diff --git "a/weekly/week01/BOJ_1920_\354\210\230 \354\260\276\352\270\260/lsy1307.cpp" "b/weekly/week01/BOJ_1920_\354\210\230 \354\260\276\352\270\260/lsy1307.cpp" new file mode 100644 index 0000000..5c8f2f9 --- /dev/null +++ "b/weekly/week01/BOJ_1920_\354\210\230 \354\260\276\352\270\260/lsy1307.cpp" @@ -0,0 +1,23 @@ +#include +#include +using namespace std; + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); + int N, num1, M, num2; + cin >> N; + unordered_set numbers; + numbers.reserve(N); + while (N--) { + cin >> num1; + numbers.insert(num1); + } + cin >> M; + while (M--) { + cin >> num2; + if (numbers.find(num2) != numbers.end()) cout << 1 << "\n"; + else cout << 0 << "\n"; + } +} \ No newline at end of file