From 5ef94afc5177629bd31391b32b96348052a81bff Mon Sep 17 00:00:00 2001 From: Baoshuo Ren Date: Sun, 23 Jan 2022 20:11:30 +0800 Subject: [PATCH] C - Route Map https://atcoder.jp/contests/abc236/submissions/28733433 --- AtCoder/ABC236/C/C.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 AtCoder/ABC236/C/C.cpp diff --git a/AtCoder/ABC236/C/C.cpp b/AtCoder/ABC236/C/C.cpp new file mode 100644 index 00000000..b9ae0bcd --- /dev/null +++ b/AtCoder/ABC236/C/C.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +using std::cin; +using std::cout; +using std::endl; + +int n, m; +std::string s[100005], a; +std::map map; + +int main() { + cin >> n >> m; + for (int i = 1; i <= n; i++) { + cin >> s[i]; + } + for (int i = 1; i <= m; i++) { + cin >> a; + map[a] = true; + } + for (int i = 1; i <= n; i++) { + cout << (map[s[i]] ? "Yes" : "No") << endl; + } + return 0; +}