{"id":27555,"date":"2024-10-27T14:41:51","date_gmt":"2024-10-27T14:41:51","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=27555"},"modified":"2024-11-26T07:17:20","modified_gmt":"2024-11-26T07:17:20","slug":"c-%ec%bd%94%eb%94%a9%ed%85%8c%ec%8a%a4%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ea%b2%bd%eb%a1%9c-%ec%b0%be%ea%b8%b0-2","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/27555\/","title":{"rendered":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30"},"content":{"rendered":"<p><body><\/p>\n<p>\n        \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\uc5d0\uc11c \uacbd\ub85c\ub97c \ucc3e\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4.<br \/>\n        \ud2b9\ud788 BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9)\ub97c \uc774\uc6a9\ud558\uc5ec \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0\uc790 \ud569\ub2c8\ub2e4.<br \/>\n        \uc774 \uacfc\uc815\uc5d0\uc11c \uc2e4\uc81c \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ucd9c\uc81c\ub418\ub294 \ubb38\uc81c\ub97c \ud480\uc774\ud558\uba70,<br \/>\n        \uc54c\uace0\ub9ac\uc998 \uc774\ub860\uacfc \uad6c\ud604\uc744 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>\ubb38\uc81c \uc124\uba85<\/h2>\n<p>\n        \uc8fc\uc5b4\uc9c4 \uadf8\ub798\ud504\uc5d0\uc11c \ub450 \uc9c0\uc810 \uc0ac\uc774\uc758 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubb38\uc81c\ub97c \ud574\uacb0\ud574\uc57c \ud569\ub2c8\ub2e4.<br \/>\n        \uadf8\ub798\ud504\ub294 \ub178\ub4dc\uc640 \uc5d0\uc9c0\ub85c \uad6c\uc131\ub418\uba70, \uac01 \ub178\ub4dc\ub294 \uc11c\ub85c \uc5f0\uacb0\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n        \uc77c\ubc18\uc801\uc73c\ub85c \uc774 \ubb38\uc81c\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \uc8fc\uc5b4\uc9d1\ub2c8\ub2e4:\n    <\/p>\n<pre>\n    \uc785\ub825:\n    6 7\n    0 1\n    0 2\n    1 3\n    1 4\n    2 5\n    4 5\n    3 5\n    0 5\n\n    \ucd9c\ub825:\n    2\n    <\/pre>\n<p>\n        \uccab \ubc88\uc9f8 \uc904\uc740 \ub178\ub4dc \uc218(\uc815\uc810)\uc640 \uc5d0\uc9c0 \uc218(\uac04\uc120)\uc758 \uc218\ub97c \ub098\ud0c0\ub0b4\uba70,<br \/>\n        \ub450 \ubc88\uc9f8 \uc904\ubd80\ud130\ub294 \uac01 \uc5d0\uc9c0\uc758 \uc5f0\uacb0 \uc815\ubcf4\ub97c \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<br \/>\n        \ub9c8\uc9c0\ub9c9 \uc904\uc740 \uc2dc\uc791 \ub178\ub4dc\uc640 \ub3c4\ucc29 \ub178\ub4dc\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.\n    <\/p>\n<h2>\uc54c\uace0\ub9ac\uc998 \uc774\ub860<\/h2>\n<p>\n        \uadf8\ub798\ud504\uc5d0\uc11c\uc758 \uacbd\ub85c \ucc3e\uae30\ub294 DFS(\uae4a\uc774 \uc6b0\uc120 \ud0d0\uc0c9)\uc640 BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9) \ub450 \uac00\uc9c0 \ubc29\ubc95\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n        \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 BFS\ub97c \uc0ac\uc6a9\ud558\uc5ec \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubc29\ubc95\uc5d0 \uc911\uc810\uc744 \ub450\uaca0\uc2b5\ub2c8\ub2e4.<br \/>\n        BFS\ub294 \ub3d9\uc791 \ubc29\uc2dd\uc774 \uc9c1\uad00\uc801\uc774\uba70, \ud050\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubaa8\ub4e0 \uc778\uc811\ud55c \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud558\ub294 \ubc29\uc2dd\uc73c\ub85c \uc9c4\ud589\ub429\ub2c8\ub2e4.\n    <\/p>\n<h3>BFS\uc758 \ub3d9\uc791 \uc6d0\ub9ac<\/h3>\n<p>\n        BFS\uc758 \uae30\ubcf8 \ub3d9\uc791 \uc6d0\ub9ac\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:\n    <\/p>\n<ol>\n<li>\uc2dc\uc791 \ub178\ub4dc\ub97c \ud050\uc5d0 \ucd94\uac00\ud558\uace0 \ubc29\ubb38 \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud050\uc5d0\uc11c \ub178\ub4dc\ub97c \ud558\ub098 \uaebc\ub0b4 \uadf8 \ub178\ub4dc\uc758 \uc778\uc811 \ub178\ub4dc\ub97c \ubaa8\ub450 \ud0d0\uc0c9\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud0d0\uc0c9\ud55c \uc778\uc811 \ub178\ub4dc \uc911 \ubc29\ubb38\ud558\uc9c0 \uc54a\uc740 \ub178\ub4dc\ub97c \ud050\uc5d0 \ucd94\uac00\ud558\uace0 \ubc29\ubb38 \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud050\uac00 \ube4c \ub54c\uae4c\uc9c0 2\ubc88\uacfc 3\ubc88 \uacfc\uc815\uc744 \ubc18\ubcf5\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p>\n        BFS\ub294 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ubcf4\uc7a5\ud558\ub294 \uc774\uc720\ub294 \ubaa8\ub4e0 \ub178\ub4dc\ub97c \uac19\uc740 \ub808\ubca8\uc5d0\uc11c \ucc98\ub9ac\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4.<br \/>\n        \uc774\ub807\uac8c \ub808\ubca8\uc744 \uae30\uc900\uc73c\ub85c \ud0d0\uc0c9\ud558\uae30 \ub54c\ubb38\uc5d0 \ucd5c\ub2e8 \uacbd\ub85c\uac00 \ubcf4\uc7a5\ub429\ub2c8\ub2e4.\n    <\/p>\n<h2>\ubb38\uc81c \ud574\uacb0 \uacfc\uc815<\/h2>\n<p>\n        \uc774\uc81c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \ud544\uc694\ud560 \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud558\uaca0\uc2b5\ub2c8\ub2e4.<br \/>\n        \uc544\ub798\ub294 \ubb38\uc81c \ud574\uacb0\uc744 \uc704\ud55c C++ \ucf54\ub4dc\uc785\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\n#include &lt;iostream&gt;\n#include &lt;vector&gt;\n#include &lt;queue&gt;\nusing namespace std;\n\nint bfs(vector<vector<int>&gt;&amp; graph, int start, int end) {\n    queue<int> q;\n    vector<bool> visited(graph.size(), false);\n    vector<int> distance(graph.size(), -1);\n    \n    q.push(start);\n    visited[start] = true;\n    distance[start] = 0;\n\n    while (!q.empty()) {\n        int node = q.front();\n        q.pop();\n        \n        for (int neighbor : graph[node]) {\n            if (!visited[neighbor]) {\n                visited[neighbor] = true;\n                distance[neighbor] = distance[node] + 1;\n                q.push(neighbor);\n                \n                if (neighbor == end) {\n                    return distance[neighbor];\n                }\n            }\n        }\n    }\n    return -1; \/\/ \uacbd\ub85c\uac00 \uc5c6\ub294 \uacbd\uc6b0 \n}\n\nint main() {\n    int n, m;\n    cin &gt;&gt; n &gt;&gt; m;\n    vector<vector<int>&gt; graph(n);\n    \n    for (int i = 0; i &lt; m; i++) {\n        int u, v;\n        cin &gt;&gt; u &gt;&gt; v;\n        graph[u].push_back(v);\n        graph[v].push_back(u); \/\/ undirected graph\n    }\n\n    int start, end;\n    cin &gt;&gt; start &gt;&gt; end;\n\n    int result = bfs(graph, start, end);\n    cout &lt;&lt; result &lt;&lt; endl;\n\n    return 0;\n}\n    <\/vector<int><\/int><\/bool><\/int><\/vector<int><\/code><\/pre>\n<h3>\ucf54\ub4dc \uc124\uba85<\/h3>\n<p>\n        \uc704 \ucf54\ub4dc\ub294 \uadf8\ub798\ud504\uc758 \ub178\ub4dc \uc218\uc640 \uc5d0\uc9c0 \uc218\ub97c \uc785\ub825\ubc1b\uace0,<br \/>\n        \uac01 \uc5d0\uc9c0\uc758 \uc815\ubcf4\ub97c \ud1b5\ud574 \uadf8\ub798\ud504\ub97c \uad6c\ucd95\ud55c \ud6c4 BFS\ub97c \uc774\uc6a9\ud558\uc5ec<br \/>\n        \uc2dc\uc791 \ub178\ub4dc\uc640 \uc885\ub8cc \ub178\ub4dc \uc0ac\uc774\uc758 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.\n    <\/p>\n<ol>\n<li>\uba3c\uc800 \ud544\uc694\ud55c \ud5e4\ub354 \ud30c\uc77c\uc744 \ud3ec\ud568\ud558\uace0, <code>using namespace std;<\/code>\ub97c \uc120\uc5b8\ud569\ub2c8\ub2e4.<\/li>\n<li><code>bfs<\/code> \ud568\uc218\ub294 \uadf8\ub798\ud504, \uc2dc\uc791 \ub178\ub4dc, \uc885\ub8cc \ub178\ub4dc\ub97c \ud30c\ub77c\ubbf8\ud130\ub85c \ubc1b\uc2b5\ub2c8\ub2e4.<\/li>\n<li>\ud050\ub97c \uc120\uc5b8\ud558\uace0, \ubc29\ubb38 \uc5ec\ubd80\ub97c \ub098\ud0c0\ub0b4\ub294 <code>visited<\/code> \ubca1\ud130\ub97c \ucd08\uae30\ud654\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud050\uc5d0 \uc2dc\uc791 \ub178\ub4dc\ub97c \ucd94\uac00\ud558\uace0 \ubc29\ubb38 \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n<li>\ud050\uac00 \ube44\uc5b4\uc788\uc9c0 \uc54a\uc744 \ub54c\uae4c\uc9c0 \ubc18\ubcf5\ud558\uba74\uc11c \ub178\ub4dc\ub97c \uaebc\ub0b4\uace0 \uc778\uc811 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud569\ub2c8\ub2e4.<\/li>\n<li>\ubc29\ubb38\ud558\uc9c0 \uc54a\uc740 \uc778\uc811 \ub178\ub4dc\ub97c \ud050\uc5d0 \ucd94\uac00\ud558\uace0 \uac70\ub9ac \uc815\ubcf4\ub97c \uc5c5\ub370\uc774\ud2b8\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc885\ub8cc \ub178\ub4dc\uc5d0 \ub3c4\ub2ec\ud558\uba74 \ud574\ub2f9 \uac70\ub9ac\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<li>\uac70\ub9ac \uc815\ubcf4\ub294 <code>-1<\/code>\ub85c \ucd08\uae30\ud654\ub429\ub2c8\ub2e4; \uacbd\ub85c\uac00 \uc5c6\uc73c\uba74 <code>-1<\/code>\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<h2>\uacb0\uacfc \ubc0f \ubd84\uc11d<\/h2>\n<p>\n        \uc704 \ucf54\ub4dc\ub97c \ucef4\ud30c\uc77c\ud558\uace0 \uc785\ub825 \uc608\uc2dc\ub97c \ud1b5\ud574 \uc2e4\ud589\ud558\uba74,<br \/>\n        \uc2dc\uc791 \ub178\ub4dc\uc640 \uc885\ub8cc \ub178\ub4dc \uac04\uc758 \ucd5c\ub2e8 \uacbd\ub85c\uac00 \ucd9c\ub825\ub429\ub2c8\ub2e4.<br \/>\n        BFS\ub294 \ubaa8\ub4e0 \uc778\uc811 \ub178\ub4dc\ub97c \ud0d0\uc0c9\ud558\ubbc0\ub85c, \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ubcf4\uc7a5\ud569\ub2c8\ub2e4.<br \/>\n        \uadf8\ub798\ud504\uc758 \ud06c\uae30\uac00 \ucee4\uc9c8\uc218\ub85d \ud0d0\uc0c9 \uc2dc\uac04\uc774 \ube44\ub840\ud558\uc5ec \uc99d\uac00\ud558\uc9c0\ub9cc,<br \/>\n        BFS\ub294 \ub300\ubd80\ubd84\uc758 \uadf8\ub798\ud504 \ubb38\uc81c\uc5d0 \uc801\ud569\ud55c \uc54c\uace0\ub9ac\uc998\uc785\ub2c8\ub2e4.\n    <\/p>\n<h3>\ubcf5\uc7a1\ub3c4 \ubd84\uc11d<\/h3>\n<p>\n        BFS\uc758 \uc2dc\uac04 \ubcf5\uc7a1\ub3c4\ub294 <code>O(V + E)<\/code>\uc785\ub2c8\ub2e4. \uc5ec\uae30\uc11c <code>V<\/code>\ub294 \ub178\ub4dc\uc758 \uc218,<br \/>\n        <code>E<\/code>\ub294 \uc5d0\uc9c0\uc758 \uc218\uc785\ub2c8\ub2e4. \uba54\ubaa8\ub9ac \ubcf5\uc7a1\ub3c4 \ub610\ud55c <code>O(V)<\/code>\uc785\ub2c8\ub2e4.<br \/>\n        \uc774 \ubcf5\uc7a1\ub3c4\ub294 \uadf8\ub798\ud504\uc758 \uad6c\uc870\uc5d0 \ub530\ub77c \ub2ec\ub77c\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n        \ub098\uc05c \uacbd\uc6b0(\uc608: \uc644\uc804 \uadf8\ub798\ud504)\uc5d0\ub294 <code>E<\/code>\uac00 <code>V^2<\/code>\uac00 \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>\ub9c8\ubb34\ub9ac<\/h2>\n<p>\n        \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\uc5d0\uc11c \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubb38\uc81c\ub97c<br \/>\n        BFS \uc54c\uace0\ub9ac\uc998\uc744 \ud1b5\ud574 \ud574\uacb0\ud588\uc2b5\ub2c8\ub2e4. BFS\uc758 \uc774\ud574\uc640 \uadf8 \uad6c\ud604\uc740<br \/>\n        \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc911\uc694\ud55c \ubd80\ubd84\uc774\ubbc0\ub85c \ucda9\ubd84\ud788 \uc5f0\uc2b5\ud558\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.<br \/>\n        \ud5a5\ud6c4 \ub354 \ub2e4\uc591\ud55c \ubb38\uc81c\ub97c \ud1b5\ud574 \uc2e4\ub825\uc744 \uc313\uc544 \ub098\uac00\uc2dc\uae30\ub97c \ubc14\ub78d\ub2c8\ub2e4.\n    <\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc774 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\uc5d0\uc11c \uacbd\ub85c\ub97c \ucc3e\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4. \ud2b9\ud788 BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9)\ub97c \uc774\uc6a9\ud558\uc5ec \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0\uc790 \ud569\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \uc2e4\uc81c \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ucd9c\uc81c\ub418\ub294 \ubb38\uc81c\ub97c \ud480\uc774\ud558\uba70, \uc54c\uace0\ub9ac\uc998 \uc774\ub860\uacfc \uad6c\ud604\uc744 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uadf8\ub798\ud504\uc5d0\uc11c \ub450 \uc9c0\uc810 \uc0ac\uc774\uc758 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubb38\uc81c\ub97c \ud574\uacb0\ud574\uc57c \ud569\ub2c8\ub2e4. \uadf8\ub798\ud504\ub294 \ub178\ub4dc\uc640 \uc5d0\uc9c0\ub85c \uad6c\uc131\ub418\uba70, \uac01 \ub178\ub4dc\ub294 \uc11c\ub85c \uc5f0\uacb0\ub418\uc5b4 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/27555\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-27555","post","type-post","status-publish","format-standard","hentry","category-c---2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/27555\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc774 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\uc5d0\uc11c \uacbd\ub85c\ub97c \ucc3e\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4. \ud2b9\ud788 BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9)\ub97c \uc774\uc6a9\ud558\uc5ec \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0\uc790 \ud569\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \uc2e4\uc81c \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ucd9c\uc81c\ub418\ub294 \ubb38\uc81c\ub97c \ud480\uc774\ud558\uba70, \uc54c\uace0\ub9ac\uc998 \uc774\ub860\uacfc \uad6c\ud604\uc744 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uadf8\ub798\ud504\uc5d0\uc11c \ub450 \uc9c0\uc810 \uc0ac\uc774\uc758 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubb38\uc81c\ub97c \ud574\uacb0\ud574\uc57c \ud569\ub2c8\ub2e4. \uadf8\ub798\ud504\ub294 \ub178\ub4dc\uc640 \uc5d0\uc9c0\ub85c \uad6c\uc131\ub418\uba70, \uac01 \ub178\ub4dc\ub294 \uc11c\ub85c \uc5f0\uacb0\ub418\uc5b4 &hellip; \ub354 \ubcf4\uae30 &quot;C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/27555\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T14:41:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:17:20+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30\",\"datePublished\":\"2024-10-27T14:41:51+00:00\",\"dateModified\":\"2024-11-26T07:17:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/\"},\"wordCount\":18,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/\",\"url\":\"https:\/\/atmokpo.com\/w\/27555\/\",\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T14:41:51+00:00\",\"dateModified\":\"2024-11-26T07:17:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/27555\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/27555\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/27555\/","og_locale":"ko_KR","og_type":"article","og_title":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc774 \uac15\uc88c\uc5d0\uc11c\ub294 C++\ub97c \uc0ac\uc6a9\ud558\uc5ec \uadf8\ub798\ud504\uc5d0\uc11c \uacbd\ub85c\ub97c \ucc3e\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4. \ud2b9\ud788 BFS(\ub108\ube44 \uc6b0\uc120 \ud0d0\uc0c9)\ub97c \uc774\uc6a9\ud558\uc5ec \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0\uc790 \ud569\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \uc2e4\uc81c \ucf54\ub529 \ud14c\uc2a4\ud2b8\uc5d0\uc11c \uc790\uc8fc \ucd9c\uc81c\ub418\ub294 \ubb38\uc81c\ub97c \ud480\uc774\ud558\uba70, \uc54c\uace0\ub9ac\uc998 \uc774\ub860\uacfc \uad6c\ud604\uc744 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ubb38\uc81c \uc124\uba85 \uc8fc\uc5b4\uc9c4 \uadf8\ub798\ud504\uc5d0\uc11c \ub450 \uc9c0\uc810 \uc0ac\uc774\uc758 \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ucc3e\ub294 \ubb38\uc81c\ub97c \ud574\uacb0\ud574\uc57c \ud569\ub2c8\ub2e4. \uadf8\ub798\ud504\ub294 \ub178\ub4dc\uc640 \uc5d0\uc9c0\ub85c \uad6c\uc131\ub418\uba70, \uac01 \ub178\ub4dc\ub294 \uc11c\ub85c \uc5f0\uacb0\ub418\uc5b4 &hellip; \ub354 \ubcf4\uae30 \"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30\"","og_url":"https:\/\/atmokpo.com\/w\/27555\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T14:41:51+00:00","article_modified_time":"2024-11-26T07:17:20+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/27555\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/27555\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30","datePublished":"2024-10-27T14:41:51+00:00","dateModified":"2024-11-26T07:17:20+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/27555\/"},"wordCount":18,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/27555\/","url":"https:\/\/atmokpo.com\/w\/27555\/","name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T14:41:51+00:00","dateModified":"2024-11-26T07:17:20+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/27555\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/27555\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/27555\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"C++ \ucf54\ub529\ud14c\uc2a4\ud2b8 \uac15\uc88c, \uacbd\ub85c \ucc3e\uae30"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=27555"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27555\/revisions"}],"predecessor-version":[{"id":27556,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/27555\/revisions\/27556"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=27555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=27555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=27555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}